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

Bug#216433: anna: Do not handle new kernel module udebs properly



Package:  anna
Version:  0.038
Severity: serious
Tag:      d-i patch

The current anna implementation have special code to detect kernel
module udebs, and make sure to only load modules for the running
kernel version.  This code assumes that all kernel module udebs are
named like this: foo-modules-XYZ-udeb

This is no longer true on i386, as the udebs are named
'foo-modules-XYZ-di' instead.

The code in question is in udeb_kernel_version(), returning the
version string for kernel module udebs, and NULL for all other
packages.

The problem is serious, as the missing modules make other parts of the
installation fail.  The assumtion of hw-detect-full, that all
available kernel modules would be loaded after anna is finished, no
longer hold true, and for example autopartkit is now unable to load
lvm-mod before it starts.

I suspect this code might fix the problem, but am not too sure, so I
submit it as a bug instead of commiting it myself.

--- util.c.~1.22.~	Sun Oct 12 23:15:38 2003
+++ util.c	Sat Oct 18 21:01:16 2003
@@ -247,7 +247,7 @@
 }
 
 /* 
- * Simply return the XYZ in foo-modules-XYZ-udeb
+ * Simply return the XYZ in foo-modules-XYZ-udeb and foo-modules-XYZ-di
  * Returns NULL if the match fails
  * FIXME: Should we cross-check against the package version?
  */
@@ -263,9 +263,11 @@
     if ((t1 = strstr(name, "-modules-")) == NULL)
         return NULL;
     t1 += sizeof("-modules-") - 1;
-    if ((t2 = strstr(t1, "-udeb")) == NULL)
+    if ((t2 = strstr(t1, "-udeb")) == NULL || 
+	(t2 = strstr(t1, "-di")) == NULL)
         return NULL;
-    if (t2[sizeof("-udeb") - 1] != '\0')
+    if (t2[sizeof("-udeb") - 1] != '\0' &&
+	t2[sizeof("-di") - 1] != '\0' &&)
         return NULL;
     t2 = di_stradup(t1, t2 - t1);
     return t2;




Reply to: