[Secure-testing-commits] r6769 - bin

fw at alioth.debian.org fw at alioth.debian.org
Wed Oct 3 07:44:19 UTC 2007


Author: fw
Date: 2007-10-03 07:44:19 +0000 (Wed, 03 Oct 2007)
New Revision: 6769

Modified:
   bin/dsa2list
Log:
dsa2list: add support for the "dak new-security-install" format

This should not be used for DSAs, but it's out there anyway.

Modified: bin/dsa2list
===================================================================
--- bin/dsa2list	2007-10-03 07:44:14 UTC (rev 6768)
+++ bin/dsa2list	2007-10-03 07:44:19 UTC (rev 6769)
@@ -59,13 +59,18 @@
     return (source, version)
 
 re_title = re.compile(r'^Subject: .*\[DSA (\d+-\d+)\] .* fix(?:es)? (.*)$')
-re_date = re.compile(r'^([A-Z][a-z][a-z])[a-z]* (\d+)[a-z]+, (\d+)\s+http://.*')
+re_date = re.compile(r'^([A-Z][a-z][a-z])[a-z]* (\d+)[a-z]*, (\d+)\s+http://.*')
 
 re_cve = re.compile('(CVE-\d{4}-\d{4})')
 release_headline_re = re.compile(
     r'^Debian GNU/Linux [0-9.]+ (?:\(|alias) ([a-z]+).*')
 dscurl_re = re.compile(r'^\s*(http://\S+\.dsc).*')
 
+# Variants used by "dak new-security-install"
+re_date1 = re.compile(r'^([A-Z][a-z][a-z])[a-z]* (\d+), (2\d{3}).*')
+release_headline1_re = re.compile(r'^Debian [0-9.]+ \(([a-z]+)\).*')
+release_map = {'stable' : 'etch', 'oldstable' : 'sarge'}
+
 def process_file(file):
     cve_names = {}
     package_notes = []
@@ -100,6 +105,19 @@
             packages[source] = True
             package_notes.append((release, source, version))
 
+        # Variants used by "dak new-security-install"
+
+        match = re_date1.match(line)
+        if match:
+            (m, d, y) = match.groups()
+            date = "%02d %s %s" % (int(d), m, y)
+            continue
+        match  = release_headline1_re.match(line)
+        if match:
+            (release,) = match.groups()
+            release = release_map[release]
+            continue
+
     assert date
     assert title
     packages = packages.keys()




More information about the Secure-testing-commits mailing list