diff -u module-init-tools-3.2.2/debian/changelog module-init-tools-3.2.2/debian/changelog
--- module-init-tools-3.2.2/debian/changelog
+++ module-init-tools-3.2.2/debian/changelog
@@ -1,3 +1,9 @@
+module-init-tools (3.2.2-2c0.mrvn.1) unstable; urgency=low
+
+  * Added patch follow_links.diff to follow links to 3rd party modules
+
+ -- Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de>  Wed, 22 Mar 2006 20:16:03 +0100
+
 module-init-tools (3.2.2-2) unstable; urgency=medium
 
   * Added patch fix_wildcards from upstream 3.3-pre1, to fix matching
only in patch2:
unchanged:
--- module-init-tools-3.2.2.orig/debian/patches/follow_links.diff
+++ module-init-tools-3.2.2/debian/patches/follow_links.diff
@@ -0,0 +1,50 @@
+diff -Nurd module-init-tools-3.2.2.orig/depmod.c module-init-tools-3.2.2/depmod.c
+--- module-init-tools-3.2.2.orig/depmod.c	2006-03-22 19:57:17.000000000 +0100
++++ module-init-tools-3.2.2/depmod.c	2006-03-22 20:24:54.000000000 +0100
+@@ -529,7 +529,7 @@
+ }
+ 
+ static struct module *grab_dir(const char *dirname,
+-			       DIR *dir,
++			       DIR *dir, int follow,
+ 			       struct module *next,
+ 			       do_module_t do_mod)
+ {
+@@ -545,14 +545,13 @@
+ 			char subdir[strlen(dirname) + 1
+ 				   + strlen(dirent->d_name) + 1];
+ 			sprintf(subdir, "%s/%s", dirname, dirent->d_name);
+-			/* Don't follow links, eg. build/ */
+-			if (readlink(subdir, &dummy, 1) < 0) {
+-				sub = opendir(subdir);
+-				if (sub) {
+-					next = grab_dir(subdir, sub, next,
+-							do_mod);
+-					closedir(sub);
+-				}
++			/* Don't follow toplevel links build and source */
++			if (follow && streq(dirent->d_name, "build")) continue;
++			if (follow && streq(dirent->d_name, "source")) continue;
++			sub = opendir(subdir);
++			if (sub) {
++				next = grab_dir(subdir, sub, 0, next, do_mod);
++				closedir(sub);
+ 			}
+ 		}
+ 	}
+@@ -573,13 +572,13 @@
+ 		     dirname, strerror(errno));
+ 		return NULL;
+ 	}
+-	list = grab_dir(dirname, dir, NULL, do_normal_module);
++	list = grab_dir(dirname, dir, 1, NULL, do_normal_module);
+ 	closedir(dir);
+ 
+ 	sprintf(updatedir, "%s/updates", dirname);
+ 	dir = opendir(updatedir);
+ 	if (dir) {
+-		list = grab_dir(updatedir, dir, list, do_update_module);
++	    list = grab_dir(updatedir, dir, 1, list, do_update_module);
+ 		closedir(dir);
+ 	}
+ 	return list;
