X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fgenerate_releases.py;h=0ae4aecf4e4b417c84567820fc70c8e8c2ad1564;hb=f0cb58d0e179b2d90695a7856f8861ff76d91446;hp=c01a0c296c47d1ac680aa4b6fd3123108f8dda33;hpb=dfb4ed40fa9a76e9cb0f59b008f61ce712793cae;p=dak.git diff --git a/dak/generate_releases.py b/dak/generate_releases.py index c01a0c29..0ae4aecf 100755 --- a/dak/generate_releases.py +++ b/dak/generate_releases.py @@ -142,6 +142,8 @@ def main (): AptCnf = apt_pkg.newConfiguration() apt_pkg.ReadConfigFileISC(AptCnf,daklib.utils.which_apt_conf_file()) + #apt_pkg.ReadConfigFileISC(AptCnf,"/org/ftp.debian.org/dak/config/debian/apt.conf.stable") + #apt_pkg.ReadConfigFileISC(AptCnf,"/org/ftp.debian.org/dak/config/debian/apt.conf.oldstable") if not suites: suites = Cnf.SubTree("Suite").List() @@ -237,6 +239,9 @@ def main (): relpath = Cnf["Dir::Root"]+tree+"/"+rel try: + if os.access(relpath, os.F_OK): + if os.stat(relpath).st_nlink > 1: + os.unlink(relpath) release = open(relpath, "w") #release = open(longsuite.replace("/","_") + "_" + arch + "_" + sec + "_Release", "w") except IOError: @@ -258,14 +263,18 @@ def main (): files.append(rel) if AptCnf.has_key("tree::%s/main" % (tree)): - sec = AptCnf["tree::%s/main::Sections" % (tree)].split()[0] - if sec != "debian-installer": - print "ALERT: weird non debian-installer section in %s" % (tree) - - for arch in AptCnf["tree::%s/main::Architectures" % (tree)].split(): - if arch != "source": # always true - for file in compressnames("tree::%s/main" % (tree), "Packages", "main/%s/binary-%s/Packages" % (sec, arch)): - files.append(file) + for dis in ["main", "contrib", "non-free"]: + if not AptCnf.has_key("tree::%s/%s" % (tree, dis)): continue + sec = AptCnf["tree::%s/%s::Sections" % (tree,dis)].split()[0] + if sec != "debian-installer": + print "ALERT: weird non debian-installer section in %s" % (tree) + + for arch in AptCnf["tree::%s/%s::Architectures" % (tree,dis)].split(): + if arch != "source": # always true + for file in compressnames("tree::%s/%s" % (tree,dis), + "Packages", + "%s/%s/binary-%s/Packages" % (dis, sec, arch)): + files.append(file) elif AptCnf.has_key("tree::%s::FakeDI" % (tree)): usetree = AptCnf["tree::%s::FakeDI" % (tree)] sec = AptCnf["tree::%s/main::Sections" % (usetree)].split()[0]