Skip to content
Browse files

fixed small bug in version check

  • Loading branch information...
1 parent 1d9b1c0 commit 01791da6e1048b6770865dbcf4cfb289932009e8 @floriansp committed May 11, 2012
Showing with 4 additions and 2 deletions.
  1. +3 −1 lib/repomate/base.rb
  2. +1 −1 repomate.gemspec
View
4 lib/repomate/base.rb
@@ -99,16 +99,18 @@ def check_versions(workload)
Dir.glob("#{entry[:destination_dir]}/#{source_package.name}*.deb") do |target_fullname|
target_package = Package.new(target_fullname, entry[:suitename], entry[:component] )
- if system("#{dpkg} --compare-versions #{source_package.version} gt #{target_package.version}")
+ if system("#{dpkg} --compare-versions #{source_package.version} gt #{target_package.version}")
puts "Package: #{target_package.newbasename} will be replaced with #{source_package.newbasename}"
unlink_workload << {
:destination_fullname => target_fullname,
:newbasename => target_package.newbasename
}
elsif system("#{dpkg} --compare-versions #{source_package.version} eq #{target_package.version}")
puts "Package: #{source_package.newbasename} already exists with same version"
+ return
elsif system("#{dpkg} --compare-versions #{source_package.version} lt #{target_package.version}")
puts "Package: #{source_package.newbasename} already exists with higher version"
+ return
end
end
View
2 repomate.gemspec
@@ -1,7 +1,7 @@
Gem::Specification.new do |spec|
spec.license = 'MIT'
spec.name = 'repomate'
- spec.version = '0.0.7'
+ spec.version = '0.0.8
spec.files = Dir["bin/*"] + Dir["etc/*"] + Dir["lib/**/*"]
spec.summary = 'A tool to manage Debian repositories'
spec.description = File.read(File.expand_path('README.md'))

0 comments on commit 01791da

Please sign in to comment.
Something went wrong with that request. Please try again.