Commit 870149f0 authored by Kaarle Ritvanen's avatar Kaarle Ritvanen

apkbuild-gem-resolver: use the << operator to append to arrays

parent 3567ee3f
...@@ -42,7 +42,7 @@ class Aport ...@@ -42,7 +42,7 @@ class Aport
fail if aug.match("/augeas#{apath}//error").length > 0 fail if aug.match("/augeas#{apath}//error").length > 0
repos = ['main'] repos = ['main']
repos.push 'testing' if testing repos << 'testing' if testing
for repo in repos for repo in repos
for aport in aug.match "#{apath}/#{repo}/*" for aport in aug.match "#{apath}/#{repo}/*"
FileAport.new(aug, aport) unless aport.end_with? '/ruby' FileAport.new(aug, aport) unless aport.end_with? '/ruby'
...@@ -57,7 +57,7 @@ class Aport ...@@ -57,7 +57,7 @@ class Aport
for dep in deps for dep in deps
aport.add_dependency dep aport.add_dependency dep
end end
@@subpackages.push aport @@subpackages << aport
end end
end end
...@@ -88,7 +88,7 @@ class Aport ...@@ -88,7 +88,7 @@ class Aport
end end
def add_dependency name def add_dependency name
@depends.push name @depends << name
end end
attr_reader :gem, :name, :version attr_reader :gem, :name, :version
...@@ -109,7 +109,7 @@ class Aport ...@@ -109,7 +109,7 @@ class Aport
end end
def add_user user def add_user user
@users.push user @users << user
end end
end end
...@@ -143,7 +143,7 @@ class Update ...@@ -143,7 +143,7 @@ class Update
aport = Aport.get name aport = Aport.get name
raise 'Invalid package name: ' + name unless aport raise 'Invalid package name: ' + name unless aport
gem = assign(aport.gem, name) gem = assign(aport.gem, name)
@deps.push gem.dependency if gem.require_version version @deps << gem.dependency if gem.require_version version
end end
def resolve def resolve
...@@ -250,7 +250,7 @@ class Update ...@@ -250,7 +250,7 @@ class Update
gem = @update.assign(dep.gem, dep.name) gem = @update.assign(dep.gem, dep.name)
gem.check_deps gem.check_deps
unless deps.reject! { |sdep| sdep.match? dep.gem, gem.version } unless deps.reject! { |sdep| sdep.match? dep.gem, gem.version }
@obsolete_deps.push dep.name @obsolete_deps << dep.name
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment