r3992 - trunk/kernel/linux-2.6/debian/bin

Bastian Blank waldi at costa.debian.org
Fri Aug 19 18:12:40 UTC 2005


Author: waldi
Date: 2005-08-19 18:12:39 +0000 (Fri, 19 Aug 2005)
New Revision: 3992

Modified:
   trunk/kernel/linux-2.6/debian/bin/gencontrol.py
Log:
debian/bin/gencontrol.py
- Remove some debug code.
- Make changelog regex more readable.
- Only add dependencies to sources of the same upstream version to the tree package.


Modified: trunk/kernel/linux-2.6/debian/bin/gencontrol.py
===================================================================
--- trunk/kernel/linux-2.6/debian/bin/gencontrol.py	2005-08-19 17:38:32 UTC (rev 3991)
+++ trunk/kernel/linux-2.6/debian/bin/gencontrol.py	2005-08-19 18:12:39 UTC (rev 3992)
@@ -41,8 +41,6 @@
 
     def __init__(self):
         self._read_base()
-#        import pprint
-#        pprint.pprint(dict(self))
 
     def _read_arch(self, arch, base):
         file = "debian/arch/%s/%s" % (arch, config_name)
@@ -142,7 +140,20 @@
 ^
 (
     (?P<header>
-        (?P<header_source>\w[-+0-9a-z.]+)\ \((?P<header_version>[^\(\)\ \t]+)\)((\s+[-0-9a-zA-Z]+)+)\;
+        (?P<header_source>
+            \w[-+0-9a-z.]+
+        )
+        \ 
+        \(
+        (?P<header_version>
+            [^\(\)\ \t]+
+        )
+        \)
+        \s+
+        (?P<header_distribution>
+            [-0-9a-zA-Z]+
+        )
+        \;
     )
 )
 """, re.VERBOSE)
@@ -158,6 +169,7 @@
             continue
         if match.group('header'):
             e = entry()
+            e['Distribution'] = match.group('header_distribution')
             e['Source'] = match.group('header_source')
             e['Version'] = parse_version(match.group('header_version'))
             entries.append(e)
@@ -291,10 +303,10 @@
 
 def process_real_tree(in_entry, changelog, vars):
     entry = process_package(in_entry, vars)
-    tmp = changelog[0]['Source']
+    tmp = changelog[0]['Version']['upstream']
     versions = []
     for i in changelog:
-        if i['Source'] != tmp:
+        if i['Version']['upstream'] != tmp:
             break
         versions.insert(0, i['Version'])
     for i in (('Depends', 'Provides')):




More information about the Kernel-svn-changes mailing list