[Secure-testing-commits] r3069 - bin lib/python
Florian Weimer
fw at costa.debian.org
Fri Dec 16 09:23:58 UTC 2005
Author: fw
Date: 2005-12-16 09:23:57 +0000 (Fri, 16 Dec 2005)
New Revision: 3069
Modified:
bin/tracker_service.py
lib/python/security_db.py
Log:
lib/python/security_db.py (DB):
Bump schema version. Add oldstable_status view.
bin/tracker_service.py (TrackerService):
Add oldstable page.
Modified: bin/tracker_service.py
===================================================================
--- bin/tracker_service.py 2005-12-16 08:45:10 UTC (rev 3068)
+++ bin/tracker_service.py 2005-12-16 09:23:57 UTC (rev 3069)
@@ -84,6 +84,8 @@
self.register('redirect/*', self.page_redirect)
self.register('source-package/*', self.page_source_package)
self.register('binary-package/*', self.page_binary_package)
+ self.register('status/release/oldstable',
+ self.page_status_release_oldstable)
self.register('status/release/stable', self.page_status_release_stable)
self.register('status/release/testing',
self.page_status_release_testing)
@@ -497,7 +499,9 @@
replacement="""No known issues which do not affect
this package, but still reference it.""")])
- def page_status_release_stable(self, path, params, url):
+ def page_status_release_stable_oldstable(self, release, params, url):
+ assert release in ('stable', 'oldstable')
+
bf = BugFilter(params)
def gen():
@@ -505,7 +509,7 @@
for (pkg_name, bug_name, archive, urgency, remote) in \
self.db.cursor().execute(
"""SELECT package, bug, section, urgency, remote
- FROM stable_status"""):
+ FROM %s_status""" % release):
if bf.urgencyFiltered(urgency):
continue
if bf.remoteFiltered(remote):
@@ -533,10 +537,16 @@
yield pkg_name, self.make_xref(url, bug_name), urgency, remote
return self.create_page(
- url, 'Vulnerable source packages in the stable suite',
+ url, 'Vulnerable source packages in the %s suite' % release,
[bf.actions(url),
make_table(gen(), caption=("Package", "Bug", "Urgency",
"Remote"))])
+
+ def page_status_release_stable(self, path, params, url):
+ return self.page_status_release_stable_oldstable('stable', params, url)
+ def page_status_release_oldstable(self, path, params, url):
+ return self.page_status_release_stable_oldstable('oldstable',
+ params, url)
def page_status_release_testing(self, path, params, url):
bf = BugFilter(params)
Modified: lib/python/security_db.py
===================================================================
--- lib/python/security_db.py 2005-12-16 08:45:10 UTC (rev 3068)
+++ lib/python/security_db.py 2005-12-16 09:23:57 UTC (rev 3069)
@@ -113,7 +113,7 @@
self.db = apsw.Connection(name)
self.verbose = verbose
- self.schema_version = 18
+ self.schema_version = 19
self._initFunctions()
c = self.cursor()
@@ -341,24 +341,26 @@
AND sp.subrelease = ''
ORDER BY sp.name, urgency_to_number(st.urgency), st.bug_name""")
- cursor.execute(
- """CREATE VIEW stable_status AS
- SELECT DISTINCT sp.name AS package, st.bug_name AS bug,
- sp.archive AS section, st.urgency AS urgency,
- (SELECT range_remote FROM nvd_data
- WHERE cve_name = st.bug_name) AS remote
- 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 = 'sarge'
- AND sp.subrelease = ''
- AND NOT COALESCE((SELECT NOT vulnerable
- FROM source_packages AS secp, source_package_status AS secst
- WHERE secp.name = sp.name
- AND secp.release = 'sarge' AND secp.subrelease = 'security'
- AND secp.archive = sp.archive
- AND secst.bug_name = st.bug_name
- AND secst.package = secp.rowid), 0)
- ORDER BY sp.name, urgency_to_number(urgency), st.bug_name""")
+ for (name, nickname) in (('stable', 'sarge'), ('oldstable', 'woody')):
+ cursor.execute(
+ """CREATE VIEW %s_status AS
+ SELECT DISTINCT sp.name AS package, st.bug_name AS bug,
+ sp.archive AS section, st.urgency AS urgency,
+ (SELECT range_remote FROM nvd_data
+ WHERE cve_name = st.bug_name) AS remote
+ 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 = '%s'
+ AND sp.subrelease = ''
+ AND NOT COALESCE((SELECT NOT vulnerable
+ FROM source_packages AS secp, source_package_status AS secst
+ WHERE secp.name = sp.name
+ AND secp.release = '%s' AND secp.subrelease = 'security'
+ AND secp.archive = sp.archive
+ AND secst.bug_name = st.bug_name
+ AND secst.package = secp.rowid), 0)
+ ORDER BY sp.name, urgency_to_number(urgency), st.bug_name"""
+ % (name, nickname, nickname))
cursor.execute("PRAGMA user_version = %d" % self.schema_version)
More information about the Secure-testing-commits
mailing list