Commit 6cb5be27 authored by Lucas Nussbaum's avatar Lucas Nussbaum

sources_facts: fix location for P-A-S

parent 793883f8
......@@ -4,16 +4,22 @@ $:.unshift('../../rlibs')
require 'udd-db'
require 'pp'
require 'json'
require 'fileutils'
puts "Content-type: text/plain\n\n"
def get_pas
td = `mktemp -d`.chomp
system("cd #{td} && git clone --no-checkout https://buildd.debian.org/git/packages-arch-specific.git > /dev/null 2>&1") or raise
pas = `cd #{td}/packages-arch-specific && git show HEAD:Packages-arch-specific`
raise "error" if $? != 0
FileUtils::rm_rf(td)
return pas
end
# calculate $archs
$archs = {}
pas = `wget --ca-directory /etc/ssl/ca-debian -q -O - "https://anonscm.debian.org/cgit/mirror/packages-arch-specific.git/plain/Packages-arch-specific"`
if $? != 0
puts "unable to fetch Packages-arch-specific from anonscm"
exit 1
end
pas = get_pas
arr = pas.split(/\n/).grep(/^%?[a-z0-9]/).map { |l| l.gsub(/\s*#.*$/,'') }
allarchs=['amd64','i386']
arr.each do |l|
......
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