apkbuild-gem-resolver: support community repo
This commit is contained in:
parent
c85fc5b5c4
commit
4329ca2784
@ -12,7 +12,7 @@ require 'rubygems/spec_fetcher'
|
||||
class Package
|
||||
@@packages = {}
|
||||
|
||||
def self.initialize testing
|
||||
def self.initialize level
|
||||
@@augeas = Augeas::open(nil, nil, Augeas::NO_MODL_AUTOLOAD)
|
||||
dir = Dir.pwd
|
||||
@@augeas.transform(
|
||||
@ -23,8 +23,8 @@ class Package
|
||||
apath = '/files' + dir
|
||||
fail unless @@augeas.match("/augeas#{apath}//error").empty?
|
||||
|
||||
repos = ['main']
|
||||
repos << 'testing' if testing
|
||||
repos = ['main', 'community', 'testing']
|
||||
repos = repos[0..repos.index(level)]
|
||||
for repo in repos
|
||||
for pkg in @@augeas.match "#{apath}/#{repo}/*"
|
||||
Aport.new(pkg) unless pkg.end_with? '/ruby'
|
||||
@ -346,17 +346,20 @@ class Update
|
||||
end
|
||||
|
||||
|
||||
testing = false
|
||||
level = 'main'
|
||||
update_files = nil
|
||||
OptionParser.new do |opts|
|
||||
opts.on('-c', '--community') do |c|
|
||||
level = 'community'
|
||||
end
|
||||
opts.on('-t', '--testing') do |t|
|
||||
testing = t
|
||||
level = 'testing'
|
||||
end
|
||||
opts.on('-u', '--update') do |u|
|
||||
update_files = []
|
||||
end
|
||||
end.parse! ARGV
|
||||
Package.initialize testing
|
||||
Package.initialize level
|
||||
|
||||
latest = {}
|
||||
for source, gems in Gem::SpecFetcher::fetcher.available_specs(:latest)[0]
|
||||
|
Loading…
x
Reference in New Issue
Block a user