[Secure-testing-commits] r12999 - bin
Florian Weimer
fw at alioth.debian.org
Mon Oct 12 17:41:53 UTC 2009
Author: fw
Date: 2009-10-12 17:41:52 +0000 (Mon, 12 Oct 2009)
New Revision: 12999
Modified:
bin/tracker_service.py
Log:
bin/tracker_service.py (TrackerService.page_data_pts): add PTS export
Modified: bin/tracker_service.py
===================================================================
--- bin/tracker_service.py 2009-10-12 16:37:00 UTC (rev 12998)
+++ bin/tracker_service.py 2009-10-12 17:41:52 UTC (rev 12999)
@@ -132,6 +132,7 @@
self.register('data/releases', self.page_data_releases)
self.register('data/funny-versions', self.page_data_funny_versions)
self.register('data/fake-names', self.page_data_fake_names)
+ self.register('data/pts/1', self.page_data_pts)
self.register('debsecan/**', self.page_debsecan)
self.register('data/report', self.page_report)
@@ -1072,6 +1073,24 @@
make_table(gen(),
caption=("Bug", "Description"))])
+ def page_data_pts(self, path, params, url):
+ data = []
+ for pkg, bugs in self.db.cursor().execute(
+ """SELECT package, COUNT(DISTINCT bug) FROM
+ (SELECT package, bug FROM stable_status
+ UNION ALL SELECT package, bug FROM oldstable_status
+ UNION ALL SELECT DISTINCT sp.name, st.bug_name
+ FROM source_package_status AS st, source_packages AS sp
+ WHERE st.vulnerable AND st.urgency <> 'unimportant'
+ AND sp.rowid = st.package AND sp.release = 'sid'
+ AND sp.subrelease = '') x
+ GROUP BY package ORDER BY package"""):
+ data.append(pkg)
+ data.append(':')
+ data.append(str(bugs))
+ data.append('\n')
+ return BinaryResult(''.join(data))
+
def page_debsecan(self, path, params, url):
obj = '/'.join(path)
data = self.db.getDebsecan(obj)
More information about the Secure-testing-commits
mailing list