]> err.no Git - dak/commitdiff
And priority taken out of database
authorJoerg Jaspert <joerg@debian.org>
Sun, 19 Sep 2010 13:43:25 +0000 (15:43 +0200)
committerJoerg Jaspert <joerg@debian.org>
Sun, 19 Sep 2010 13:43:25 +0000 (15:43 +0200)
drop sorting in dak stats

Signed-off-by: Joerg Jaspert <joerg@debian.org>
config/backports/dak.conf
config/debian/dak.conf
dak/make_maintainers.py
dak/stats.py

index 0440dca8b8d0f57bdf4d9ba9da61c8acbe9933bd..993cb80da76c9cad76b254afefdf9ee0313abcb0 100644 (file)
@@ -188,8 +188,6 @@ Suite
          contrib;
          non-free;
        };
-
-       Priority "7";
   };
 
 
@@ -201,8 +199,6 @@ Suite
          contrib;
          non-free;
        };
-
-       Priority "7";
   };
 
 };
index eab1c8d4efc2256af2c16e85e6b74ceda61916be..718bdc248fe1a246e39e786da143b980264d76ce 100644 (file)
@@ -195,7 +195,6 @@ Suite
          contrib;
          non-free;
        };
-       Priority "5";
        ChangeLogBase "dists/stable/";
   };
 
@@ -212,7 +211,6 @@ Suite
        CommentsDir "/srv/ftp-master.debian.org/queue/p-u-new/COMMENTS/";
        OverrideSuite "stable";
        ValidTime 604800; // 7 days
-       Priority "4";
        VersionChecks
        {
          MustBeNewerThan
@@ -242,7 +240,6 @@ Suite
          non-free;
        };
        ValidTime 604800; // 7 days
-       Priority "5";
   };
 
   Testing-Proposed-Updates
@@ -255,7 +252,6 @@ Suite
        };
        OverrideSuite "testing";
        ValidTime 604800; // 7 days
-       Priority "6";
        VersionChecks
        {
          MustBeNewerThan
@@ -287,7 +283,6 @@ Suite
        };
        OverrideSuite "testing";
        ValidTime 604800; // 7 days
-       Priority "0";
        VersionChecks
        {
          MustBeNewerThan
@@ -312,7 +307,6 @@ Suite
          non-free;
        };
        ValidTime 604800; // 7 days
-       Priority "7";
        VersionChecks
        {
          MustBeNewerThan
@@ -336,7 +330,6 @@ Suite
        };
        OverrideSuite "unstable";
        ValidTime 604800; // 7 days
-       Priority "0";
        VersionChecks
        {
          MustBeNewerThan
index 80e221532db9944d5a7589cf0051a80aa7e85914..4a113b0c6a0793304ea2e6b8d87e146f53a1fcb1 100755 (executable)
@@ -131,9 +131,9 @@ def main():
 
     session = DBConn().session()
 
-    for suite in cnf.SubTree("Suite").List():
-        suite = suite.lower()
-        suite_priority = int(cnf["Suite::%s::Priority" % (suite)])
+    for suite in session.query(Suite).all():
+        suite_name = suite.suite_name
+        suite_priority = suite.priority
 
         # Source packages
         if gen_uploaders:
@@ -143,14 +143,14 @@ def main():
                                       AND sa.suite = su.id AND sa.source = s.id
                                       AND m.id = srcu.maintainer
                                       AND srcu.source = s.id""",
-                                    {'suite_name': suite})
+                                    {'suite_name': suite_name})
         else:
             q = session.execute("""SELECT s.source, s.version, m.name
                                      FROM src_associations sa, source s, suite su, maintainer m
                                     WHERE su.suite_name = :suite_name
                                       AND sa.suite = su.id AND sa.source = s.id
                                       AND m.id = s.maintainer""",
-                                    {'suite_name': suite})
+                                    {'suite_name': suite_name})
 
         for source in q.fetchall():
             package = source[0]
@@ -175,13 +175,13 @@ def main():
                                     WHERE s.suite_name = :suite_name
                                       AND ba.suite = s.id AND ba.bin = b.id
                                       AND b.source = srcu.source""",
-                                   {'suite_name': suite})
+                                   {'suite_name': suite_name})
         else:
             q = session.execute("""SELECT b.package, b.source, b.maintainer, b.version
                                      FROM bin_associations ba, binaries b, suite s
                                     WHERE s.suite_name = :suite_name
                                       AND ba.suite = s.id AND ba.bin = b.id""",
-                                   {'suite_name': suite})
+                                   {'suite_name': suite_name})
 
 
         for binary in q.fetchall():
index 7c61e2a42948fa58e2bce7a0d50493d981ebfee0..bbd58881f0b66883bf71557510b09ec980179d29 100755 (executable)
@@ -111,17 +111,6 @@ def longest(list):
             longest = l
     return longest
 
-def suite_sort(a, b):
-    if Cnf.has_key("Suite::%s::Priority" % (a)):
-        a_priority = int(Cnf["Suite::%s::Priority" % (a)])
-    else:
-        a_priority = 0
-    if Cnf.has_key("Suite::%s::Priority" % (b)):
-        b_priority = int(Cnf["Suite::%s::Priority" % (b)])
-    else:
-        b_priority = 0
-    return cmp(a_priority, b_priority)
-
 def output_format(suite):
     output_suite = []
     for word in suite.split("-"):
@@ -164,7 +153,6 @@ def number_of_packages():
     ## Print the results
     # Setup
     suite_list = suites.values()
-    suite_list.sort(suite_sort)
     suite_id_list = []
     suite_arches = {}
     for suite in suite_list: