apkbuild-gem-resolver: use the << operator to append to arrays
This commit is contained in:
parent
3567ee3f49
commit
870149f01d
|
@ -42,7 +42,7 @@ class Aport
|
|||
fail if aug.match("/augeas#{apath}//error").length > 0
|
||||
|
||||
repos = ['main']
|
||||
repos.push 'testing' if testing
|
||||
repos << 'testing' if testing
|
||||
for repo in repos
|
||||
for aport in aug.match "#{apath}/#{repo}/*"
|
||||
FileAport.new(aug, aport) unless aport.end_with? '/ruby'
|
||||
|
@ -57,7 +57,7 @@ class Aport
|
|||
for dep in deps
|
||||
aport.add_dependency dep
|
||||
end
|
||||
@@subpackages.push aport
|
||||
@@subpackages << aport
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -88,7 +88,7 @@ class Aport
|
|||
end
|
||||
|
||||
def add_dependency name
|
||||
@depends.push name
|
||||
@depends << name
|
||||
end
|
||||
|
||||
attr_reader :gem, :name, :version
|
||||
|
@ -109,7 +109,7 @@ class Aport
|
|||
end
|
||||
|
||||
def add_user user
|
||||
@users.push user
|
||||
@users << user
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -143,7 +143,7 @@ class Update
|
|||
aport = Aport.get name
|
||||
raise 'Invalid package name: ' + name unless aport
|
||||
gem = assign(aport.gem, name)
|
||||
@deps.push gem.dependency if gem.require_version version
|
||||
@deps << gem.dependency if gem.require_version version
|
||||
end
|
||||
|
||||
def resolve
|
||||
|
@ -250,7 +250,7 @@ class Update
|
|||
gem = @update.assign(dep.gem, dep.name)
|
||||
gem.check_deps
|
||||
unless deps.reject! { |sdep| sdep.match? dep.gem, gem.version }
|
||||
@obsolete_deps.push dep.name
|
||||
@obsolete_deps << dep.name
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue