apkbuild-gem-resolver: fix -u option

overlapping variable names
This commit is contained in:
Kaarle Ritvanen 2015-07-13 15:57:23 +03:00
parent feca037655
commit 09e42ef6c0

View File

@ -326,13 +326,13 @@ end
testing = false
update = false
update_files = false
OptionParser.new do |opts|
opts.on('-t', '--testing') do |t|
testing = t
end
opts.on('-u', '--update') do |u|
update = u
update_files = u
end
end.parse! ARGV
Package.initialize testing
@ -360,7 +360,7 @@ for pkg in update
nil : " (obsolete dependencies: #{obsolete.join ', '})"
puts "#{pkg[:name]}-#{pkg[:version]}#{obs}"
if update
if update_files
package = Package.get(pkg[:name])
package.version = pkg[:version]
for dep in obsolete
@ -369,6 +369,6 @@ for pkg in update
end
end
if update
if update_files
Package.save
end