[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Solving the linux-2.6 firmware issue



On Sun, Jan 14, 2007 at 03:20:52PM +0100, Bastian Blank wrote:
> This fix and the prefered patch (attached) needs testing to make sure
> the following things works fine:
> - linux-patch-debian-*/linux-tree-*
> - linux-modules-*

Update; fixes the internal knowledge about the upstream version. This
way linux-modules-* does not fail silent and the old hack is gone.

Bastian

-- 
Death, when unnecessary, is a tragic thing.
		-- Flint, "Requiem for Methuselah", stardate 5843.7
=== debian/bin/gencontrol.py
==================================================================
--- debian/bin/gencontrol.py	(revision 3362)
+++ debian/bin/gencontrol.py	(local)
@@ -7,7 +7,6 @@
 class gencontrol(debian_linux.gencontrol.gencontrol):
     def __init__(self):
         super(gencontrol, self).__init__()
-        self.changelog = read_changelog()
         self.process_changelog()
 
     def do_main_setup(self, vars, makeflags, extra):
@@ -218,8 +217,9 @@
         vars = {
             'home': '/usr/src/kernel-patches/all/%s/debian' % self.version['linux']['upstream'],
             'revisions': ' '.join([i['Version']['debian'] for i in self.changelog[::-1]]),
+            'source': "%(upstream)s-%(debian)s" % self.version['linux'],
+            'upstream': self.version['linux']['upstream'],
         }
-        vars.update(self.version['linux'])
 
         apply = self.substitute(apply, vars)
         unpatch = self.substitute(unpatch, vars)
@@ -228,6 +228,14 @@
         file('debian/bin/patch.unpatch', 'w').write(unpatch)
 
     def process_changelog(self):
+        in_changelog = read_changelog()
+        act_upstream = in_changelog[0]['Version']['linux']['upstream']
+        changelog = []
+        for i in in_changelog:
+            if i['Version']['linux']['upstream'] != act_upstream:
+                break
+            changelog.append(i)
+        self.changelog = changelog
         self.version = self.changelog[0]['Version']
         if self.version['linux']['modifier'] is not None:
             self.abiname = ''
@@ -250,12 +258,7 @@
 
     def process_real_tree(self, in_entry, vars):
         entry = self.process_package(in_entry, vars)
-        tmp = self.changelog[0]['Version']['linux']['upstream']
-        versions = []
-        for i in self.changelog:
-            if i['Version']['linux']['upstream'] != tmp:
-                break
-            versions.insert(0, i['Version']['linux'])
+        versions = [i['Version']['linux'] for i in self.changelog[::-1]]
         for i in (('Depends', 'Provides')):
             value = package_relation_list()
             value.extend(entry.get(i, []))
=== debian/changelog
==================================================================
--- debian/changelog	(revision 3362)
+++ debian/changelog	(local)
@@ -1,4 +1,4 @@
-linux-2.6 (2.6.18-9) UNRELEASED; urgency=low
+linux-2.6 (2.6.18.dfsg.1-9) UNRELEASED; urgency=low
 
   [ Martin Michlmayr ]
   * arm/iop32x: Enable CONFIG_IP_NF_CONNTRACK_EVENTS and _NETLINK.
=== debian/lib/python/debian_linux/debian.py
==================================================================
--- debian/lib/python/debian_linux/debian.py	(revision 3362)
+++ debian/lib/python/debian_linux/debian.py	(local)
@@ -24,7 +24,6 @@
 """, re.VERBOSE)
     f = file(os.path.join(dir, "debian/changelog"))
     entries = []
-    act_upstream = None
     while True:
         line = f.readline()
         if not line:
@@ -39,10 +38,6 @@
             e['Source'] = match.group('header_source')
             version = parse_version(match.group('header_version'))
             e['Version'] = version
-            if act_upstream is None:
-                act_upstream = version['upstream']
-            elif version['upstream'] != act_upstream:
-                break
             entries.append(e)
     return entries
 
@@ -85,6 +80,9 @@
             )
         )?
     )
+    (?:
+        \.dfsg\.\d+
+    )?
     -
     (?P<debian>[^-]+)
 )
@@ -93,12 +91,7 @@
     match = re.match(version_re, version, re.X)
     if match is None:
         raise ValueError
-    ret = match.groupdict()
-    if ret['parent'] is not None:
-        ret['source_upstream'] = ret['parent'] + ret['upstream']
-    else:
-        ret['source_upstream'] = ret['upstream']
-    return ret
+    return match.groupdict()
 
 class package_description(object):
     __slots__ = "short", "long"
=== debian/lib/python/debian_linux/gencontrol.py
==================================================================
--- debian/lib/python/debian_linux/gencontrol.py	(revision 3362)
+++ debian/lib/python/debian_linux/gencontrol.py	(local)
@@ -241,7 +241,7 @@
         return {
             'upstreamversion': version['linux']['upstream'],
             'version': version['linux']['version'],
-            'source_upstream': version['linux']['source_upstream'],
+            'source_upstream': version['upstream'],
             'major': version['linux']['major'],
             'abiname': abiname,
         }

Attachment: signature.asc
Description: Digital signature


Reply to: