--- rpm-0.0.5/usr/share/gems/gems/rpm-0.0.5/lib/rpm/c/rpmmacro.rb 2017-09-09 22:19:09.660000000 +0100 +++ rpm-0.0.5/lib/rpm/c/rpmmacro.rb 2017-09-09 22:21:21.150000000 +0100 @@ -17,10 +17,10 @@ RMIL_GLOBAL = 0 # ... - attach_function 'addMacro', [:pointer, :string, :string, :string, :int], :void - attach_function 'delMacro', [:pointer, :string], :void + attach_function 'rpmPushMacro', [:pointer, :string, :string, :string, :int], :void + attach_function 'rpmPopMacro', [:pointer, :string], :void # ... - attach_function 'expandMacros', [:pointer, :pointer, :pointer, :size_t], :int + attach_function 'rpmExpandMacros', [:pointer, :pointer, :pointer, :size_t], :int # ... attach_function 'rpmInitMacros', [:pointer, :string], :void # ... --- rpm-0.0.5/lib/rpm/c/header.rb 2017-09-09 22:23:46.630000000 +0100 +++ rpm-0.0.5/lib/rpm/c/header.rb 2017-09-09 22:28:31.960000000 +0100 @@ -22,8 +22,6 @@ # ... attach_function 'headerFormat', [:header, :string, :pointer], :pointer # ... - attach_function 'headerNVR', [:header, :pointer, :pointer, :pointer], :int - # ... attach_function 'headerGetAsString', [:header, :rpmTagVal], :string # ... attach_function 'headerPutString', [:header, :rpmTagVal, :string], :int @@ -34,4 +32,4 @@ end -end \ No newline at end of file +end --- rpm-0.0.5/lib/rpm/package.rb 2017-09-09 22:23:46.640000000 +0100 +++ rpm-0.0.5/lib/rpm/package.rb 2017-09-09 22:34:26.210000000 +0100 @@ -270,15 +270,8 @@ # @return [Version] Version for this package def version - v_ptr = ::FFI::MemoryPointer.new(:pointer, 1) - r_ptr = ::FFI::MemoryPointer.new(:pointer, 1) - RPM::C.headerNVR(ptr, nil, v_ptr, r_ptr) - v = v_ptr.read_pointer.read_string - r = r_ptr.read_pointer.read_string - v_ptr.free - r_ptr.free - Version.new(v, r, self[:epoch]) + Version.new(self[:version], self[:release], self[:epoch]) end # String representation of the package: "name-version-release-arch"