Description: fix assertion on --show-depends with bogus config file
 Some common but invalid modprobe.d configuration directives caused 
 modprobe --show-depends (which is used by update-initramfs) to crash.
Origin: upstream, commit:ace742fa9aee1aec5931d5ee8a51fa9b8f0d94e0
Applied-Upstream: commit:ace742fa9aee1aec5931d5ee8a51fa9b8f0d94e0
Bug-Debian: http://bugs.debian.org/674110
---

commit ace742fa9aee1aec5931d5ee8a51fa9b8f0d94e0
Author: Lucas De Marchi <lucas.de.marchi@gmail.com>
Date:   Thu Mar 21 02:33:25 2013 -0300

    modprobe: Fix assertion on --show-depends with bogus config file
    
    Putting something like "alias psmouse deadbeef" is a hackish way to
    blacklist a module. While I don't encourage doing so, let's not explode
    if we fiund such config files.
    
    A small difference from the behavior of module-init-tools: we exit with
    0 instead of 1.

diff --git a/tools/modprobe.c b/tools/modprobe.c
index 64674b0..1b8c96e 100644
--- a/tools/modprobe.c
+++ b/tools/modprobe.c
@@ -495,8 +495,12 @@ static void print_action(struct kmod_module *m, bool install,
 	path = kmod_module_get_path(m);
 
 	if (path == NULL) {
-		assert(kmod_module_get_initstate(m) == KMOD_MODULE_BUILTIN);
-		printf("builtin %s\n", kmod_module_get_name(m));
+		/*
+		 * Either a builtin module, or an alias, print only for
+		 * builtin
+		 */
+		if (kmod_module_get_initstate(m) == KMOD_MODULE_BUILTIN)
+			printf("builtin %s\n", kmod_module_get_name(m));
 	} else
 		printf("insmod %s %s\n", kmod_module_get_path(m), options);
 }
