]> err.no Git - dak/commitdiff
Use "import daklib.foo as foo" style
authorJoerg Jaspert <joerg@debian.org>
Sat, 3 May 2008 23:36:01 +0000 (01:36 +0200)
committerJoerg Jaspert <joerg@debian.org>
Sat, 3 May 2008 23:36:01 +0000 (01:36 +0200)
ChangeLog
dak/compare_suites.py [changed mode: 0644->0755]

index 55da6678e127279516847e2230a1e43e392efa63..ff8cecb0a97e8e53bfe6be64f0c114e48ee9c4bc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,7 @@
        * dak/clean_proposed_updates.py: likewise
        * dak/clean_queues.py: likewise
        * dak/clean_suites.py: likewise
+       * dak/compare_suites.py: likewise
 
        * dak/check_archive.py (check_files_not_symlinks): Remove
        long-time unused and commented code. Import stuff from daklib as
old mode 100644 (file)
new mode 100755 (executable)
index e94d9f5..a3df829
@@ -22,8 +22,8 @@
 
 import pg, sys
 import apt_pkg
-import daklib.database
-import daklib.utils
+import daklib.database as database
+import daklib.utils as utils
 
 ################################################################################
 
@@ -44,7 +44,7 @@ Looks for fixable descrepancies between stable and unstable.
 def main ():
     global Cnf, projectB
 
-    Cnf = daklib.utils.get_conf()
+    Cnf = utils.get_conf()
     Arguments = [('h',"help","Compare-Suites::Options::Help")]
     for i in [ "help" ]:
         if not Cnf.has_key("Compare-Suites::Options::%s" % (i)):
@@ -57,15 +57,15 @@ def main ():
         usage()
 
     projectB = pg.connect(Cnf["DB::Name"], Cnf["DB::Host"], int(Cnf["DB::Port"]))
-    daklib.database.init(Cnf, projectB)
+    database.init(Cnf, projectB)
 
     src_suite = "stable"
     dst_suite = "unstable"
 
-    src_suite_id = daklib.database.get_suite_id(src_suite)
-    dst_suite_id = daklib.database.get_suite_id(dst_suite)
-    arch_all_id = daklib.database.get_architecture_id("all")
-    dsc_type_id = daklib.database.get_override_type_id("dsc")
+    src_suite_id = database.get_suite_id(src_suite)
+    dst_suite_id = database.get_suite_id(dst_suite)
+    arch_all_id = database.get_architecture_id("all")
+    dsc_type_id = database.get_override_type_id("dsc")
 
     for arch in Cnf.ValueList("Suite::%s::Architectures" % (src_suite)):
         if arch == "source":
@@ -77,7 +77,7 @@ def main ():
 
         if arch == "all":
             continue
-        arch_id = daklib.database.get_architecture_id(arch)
+        arch_id = database.get_architecture_id(arch)
         q = projectB.query("""
 SELECT b_src.package, b_src.version, a.arch_string
   FROM binaries b_src, bin_associations ba, override o, architecture a