]> git.decadent.org.uk Git - dak.git/blobdiff - cindy
read all configs when utils is imported, allowing utils to make use ofconfig values...
[dak.git] / cindy
diff --git a/cindy b/cindy
index 367e1e57fe668a566287253e2ab13883baffd069..9f2393399a9087b326d22da1f0a4075ac8609d0a 100755 (executable)
--- a/cindy
+++ b/cindy
@@ -2,7 +2,7 @@
 
 # Output override files for apt-ftparchive and indices/
 # Copyright (C) 2000, 2001  James Troup <james@nocrew.org>
-# $Id: cindy,v 1.4 2001-06-22 22:53:14 troup Exp $
+# $Id: cindy,v 1.6 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
@@ -79,7 +79,7 @@ def process(suite, component, type):
                     #% (package, suite_id, component_id, type_id));
                     # Then if source doesn't already have a copy, insert it into source
                     q = projectB.query("SELECT package FROM override WHERE package = '%s' AND suite = %s AND component = %s AND type = %s" % (package, suite_id, component_id, dsc_type_id));
-                    if q.getresult() == []:
+                    if not q.getresult():
                         #projectB.query("INSERT INTO override (package, suite, component, priority, section, type, maintainer) VALUES ('%s', %s, %s, %s, %s, %s, '%s')" % (package, suite_id, component_id, i[1], i[2], dsc_type_id, i[3]));
                         print "(nop)"
         else: # dsc
@@ -95,10 +95,7 @@ def process(suite, component, type):
 def main ():
     global Cnf, projectB, override;
 
-    apt_pkg.init();
-    
-    Cnf = apt_pkg.newConfiguration();
-    apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file());
+    Cnf = utils.get_conf()
     Arguments = [('D',"debug","Denise::Options::Debug", "IntVal"),
                  ('h',"help","Denise::Options::Help"),
                  ('V',"version","Denise::Options::Version")];