rpmvercmp > rpmEVRcmp, for unknown reason rpmvercmp not working in ruby
This commit is contained in:
parent
b8841e78c7
commit
b46a1ab4d5
|
@ -394,7 +394,7 @@ class BuildList < ActiveRecord::Base
|
||||||
source_packages.each do |nsp|
|
source_packages.each do |nsp|
|
||||||
sp = last_bl.source_packages.find{ |sp| nsp.name == sp.name }
|
sp = last_bl.source_packages.find{ |sp| nsp.name == sp.name }
|
||||||
return true unless sp
|
return true unless sp
|
||||||
comparison = nsp.rpmvercmp(sp)
|
comparison = nsp.rpmEVRcmp(sp)
|
||||||
return true if comparison == 1
|
return true if comparison == 1
|
||||||
return comparison == 0 && ( !save_to_platform.released? || save_to_platform.distrib_type == 'rhel' )
|
return comparison == 0 && ( !save_to_platform.released? || save_to_platform.distrib_type == 'rhel' )
|
||||||
end
|
end
|
||||||
|
|
|
@ -33,8 +33,8 @@ class BuildList::Package < ActiveRecord::Base
|
||||||
# @param [BuildList::Package] other
|
# @param [BuildList::Package] other
|
||||||
# @return [Number] -1 if +other+ is greater than, 0 if +other+ is equal to,
|
# @return [Number] -1 if +other+ is greater than, 0 if +other+ is equal to,
|
||||||
# and +1 if other is less than version.
|
# and +1 if other is less than version.
|
||||||
def rpmvercmp(other)
|
def rpmEVRcmp(other)
|
||||||
RPM::C.rpmvercmp to_vre_epoch_zero, other.to_vre_epoch_zero
|
RPM::C.rpmEVRcmp to_vre_epoch_zero, other.to_vre_epoch_zero
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.by_repository(repository, &block)
|
def self.by_repository(repository, &block)
|
||||||
|
|
|
@ -13,7 +13,7 @@ module RPM
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
attach_function 'rpmvercmp', [:string, :string], :int
|
attach_function 'rpmEVRcmp', [:string, :string], :int
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue