X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=ziyi;h=102101908ceea79f9356f9b90b3f45e0472107ca;hb=224c797a5dccbd6567a234cbc8afd6c6714d7c62;hp=1edcf7dcf9d53bcfadd8f04e950a1133e8064328;hpb=c846e77a848d60dd115f00faa0d9a854161d99eb;p=dak.git diff --git a/ziyi b/ziyi index 1edcf7dc..10210190 100755 --- a/ziyi +++ b/ziyi @@ -3,7 +3,7 @@ # Create all the Release files # Copyright (C) 2001, 2002 Anthony Towns -# $Id: ziyi,v 1.23 2002-10-16 02:47:32 troup Exp $ +# $Id: ziyi,v 1.26 2003-07-15 09:43:18 ajt Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -37,10 +37,12 @@ AptCnf = None ################################################################################ def usage (exit_code=0): - print """Usage: ziyi [OPTION] -Generate Release files. + print """Usage: ziyi [OPTION]... [SUITE]... +Generate Release files (for SUITE). - -h, --help show this help and exit""" + -h, --help show this help and exit + +If no SUITE is given Release files are generated for all suites.""" sys.exit(exit_code) @@ -118,9 +120,6 @@ def main (): Cnf = utils.get_conf() - AptCnf = apt_pkg.newConfiguration() - apt_pkg.ReadConfigFileISC(AptCnf,utils.which_apt_conf_file()) - Arguments = [('h',"help","Ziyi::Options::Help")]; for i in [ "help" ]: if not Cnf.has_key("Ziyi::Options::%s" % (i)): @@ -132,6 +131,9 @@ def main (): if Options["Help"]: usage(); + AptCnf = apt_pkg.newConfiguration() + apt_pkg.ReadConfigFileISC(AptCnf,utils.which_apt_conf_file()) + if not suites: suites = Cnf.SubTree("Suite").List() @@ -173,7 +175,8 @@ def main (): elif AptCnf.has_key("bindirectory::%s" % (tree)): pass else: - print "ALERT: suite %s not in apt.conf, nor untouchable!" % (suite) + aptcnf_filename = os.path.basename(utils.which_apt_conf_file()); + print "ALERT: suite %s not in %s, nor untouchable!" % (suite, aptcnf_filename); continue print Cnf["Dir::Root"] + tree + "/Release" @@ -250,6 +253,16 @@ def main (): if arch != "source": # always true for file in compressnames("tree::%s/main" % (tree), "Packages", "main/%s/binary-%s/Packages" % (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] + if sec != "debian-installer": + print "ALERT: weird non debian-installer section in %s" % (usetree) + + for arch in AptCnf["tree::%s/main::Architectures" % (usetree)].split(): + if arch != "source": # always true + for file in compressnames("tree::%s/main" % (usetree), "Packages", "main/%s/binary-%s/Packages" % (sec, arch)): + files.append(file) elif AptCnf.has_key("bindirectory::%s" % (tree)): for file in compressnames("bindirectory::%s" % (tree), "Packages", AptCnf["bindirectory::%s::Packages" % (tree)]):