X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fgenerate_releases.py;h=137c84472beb08369230b444e97687ffba563366;hb=28034de51f4a896773545e90041476aba700efbf;hp=1c258bd5c511d292757d59f678d86fcbab0f56b3;hpb=cd5b29ddfd8de263c085f494b9573d683913f6f3;p=dak.git diff --git a/dak/generate_releases.py b/dak/generate_releases.py index 1c258bd5..137c8447 100755 --- a/dak/generate_releases.py +++ b/dak/generate_releases.py @@ -26,6 +26,7 @@ import sys, os, stat, time, pg import gzip, bz2 import apt_pkg from daklib import utils +from daklib import database from daklib.dak_exceptions import * ################################################################################ @@ -149,6 +150,7 @@ def main (): apt_pkg.ReadConfigFileISC(AptCnf, Options["Apt-Conf"]) projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"])) + database.init(Cnf, projectB) if not suites: suites = Cnf.SubTree("Suite").List() @@ -157,7 +159,7 @@ def main (): print "Processing: " + suite SuiteBlock = Cnf.SubTree("Suite::" + suite) - if SuiteBlock.has_key("Untouchable") and not Options["Force-Touch"]: + if database.get_suite_untouchable(suite) and not Options["Force-Touch"]: print "Skipping: " + suite + " (untouchable)" continue @@ -176,6 +178,10 @@ def main (): if qs[0][0] != "-": version = qs[0][0] if qs[0][1]: description = qs[0][1] + architectures = database.get_suite_architectures(suite) + if architectures == None: + architectures = [] + if SuiteBlock.has_key("NotAutomatic"): notautomatic = "yes" else: @@ -221,7 +227,7 @@ def main (): if notautomatic != "": out.write("NotAutomatic: %s\n" % (notautomatic)) - out.write("Architectures: %s\n" % (" ".join(filter(utils.real_arch, SuiteBlock.ValueList("Architectures"))))) + out.write("Architectures: %s\n" % (" ".join(filter(utils.real_arch, architectures)))) if components: out.write("Components: %s\n" % (" ".join(components))) @@ -231,6 +237,13 @@ def main (): files = [] if AptCnf.has_key("tree::%s" % (tree)): + if AptCnf.has_key("tree::%s::Contents" % (tree)): + pass + else: + for x in os.listdir("%s/%s" % (Cnf["Dir::Root"], tree)): + if x.startswith('Contents-'): + files.append(x) + for sec in AptCnf["tree::%s::Sections" % (tree)].split(): for arch in AptCnf["tree::%s::Architectures" % (tree)].split(): if arch == "source":