提交 2dbc6c79 编写于 作者: J Joerg Jaspert

And priority taken out of database

drop sorting in dak stats
Signed-off-by: NJoerg Jaspert <joerg@debian.org>
上级 ad005bcd
......@@ -188,8 +188,6 @@ Suite
contrib;
non-free;
};
Priority "7";
};
......@@ -201,8 +199,6 @@ Suite
contrib;
non-free;
};
Priority "7";
};
};
......
......@@ -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
......
......@@ -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():
......
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册