]> git.decadent.org.uk Git - dak.git/blobdiff - jenna
read all configs when utils is imported, allowing utils to make use ofconfig values...
[dak.git] / jenna
diff --git a/jenna b/jenna
index 07e8ca79472024fb6b07a8613cb482af7729d35b..73fdf0cfd437e63a1ac82d354bd9485023b09c3e 100755 (executable)
--- a/jenna
+++ b/jenna
@@ -2,7 +2,7 @@
 
 # Generate file list which is then fed to apt-ftparchive to generate Packages and Sources files
 # Copyright (C) 2000, 2001  James Troup <james@nocrew.org>
-# $Id: jenna,v 1.14 2001-09-27 01:22:51 troup Exp $
+# $Id: jenna,v 1.15 2001-11-18 19:57:58 rmurray 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
@@ -217,10 +217,7 @@ def main():
     global Cnf, projectB, Logger;
     dislocated_files = {};
 
-    apt_pkg.init();
-
-    Cnf = apt_pkg.newConfiguration();
-    apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file());
+    Cnf = utils.get_conf()
 
     Arguments = [('a',"architecture","Jenna::Options::Architecture", "HasArg"),
                  ('c',"component","Jenna::Options::Component", "HasArg"),
@@ -228,7 +225,8 @@ def main():
                  ('s',"suite", "Jenna::Options::Suite", "HasArg")];
 
     for i in ["architecture", "component", "help", "suite" ]:
-        Cnf["Jenna::Options::%s" % (i)] = "";
+       if not Cnf.has_key("Jenna::Options::%s" % (i)):
+           Cnf["Jenna::Options::%s" % (i)] = "";
 
     apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv);
     Options = Cnf.SubTree("Jenna::Options");
@@ -274,7 +272,7 @@ def main():
                     output = utils.open_file("%s/%s_%s_binary-%s.list" % (Cnf["Dir::ListsDir"], suite, component, architecture), "w");
                     generate_bin_list(suite, component, architecture, output, "deb", dislocated_files);
                     output.close();
-                    if component == "main" and (suite == "unstable" or suite == "testing"): # FIXME: must be a cleaner way to say debian-installer is main only?
+                    if component == "main" and (suite == "unstable" or suite == "testing") and Cnf.has_key("Section::debian-installer"): # FIXME: must be a cleaner way to say debian-installer is main only?
                         Logger.log(["Processing dists/%s/%s/debian-installer/binary-%s..." % (suite,component, architecture)]);
                         output = utils.open_file("%s/%s_%s_debian-installer_binary-%s.list" % (Cnf["Dir::ListsDir"], suite, component, architecture), "w");
                         generate_bin_list(suite, component, architecture, output, "udeb", dislocated_files);