Hi Alexey, On Mon, Feb 13, 2012 at 9:03 PM, Alexey Gladkov <gladkov.alexey@xxxxxxxxx> wrote: > 12.02.2012 20:34, Dave Reisner wrote: >> It works in some cases, but not all. Mainly, if the module is already >> inserted, --show-depends will fail. It's already fixed in git: >> >> http://git.profusion.mobi/cgit.cgi/kmod.git/commit/?id=269de2 > > Thanks! > > Another strange thing: > > $ grep bluetooth /etc/modprobe.d/*.conf > /etc/modprobe.d/install.conf:install bluetooth /foo/bar > > $ modprobe --show-depends btusb > insmod /lib/modules/3.0.0/kernel/lib/crc16.ko > insmod /lib/modules/3.0.0/kernel/drivers/usb/core/usbcore.ko > insmod /lib/modules/3.0.0/kernel/net/rfkill/rfkill.ko > install /foo/bar > insmod /lib/modules/3.0.0/kernel/drivers/bluetooth/btusb.ko reset=1 > > $ modprobe --show-depends --ignore-install btusb > insmod /lib/modules/3.0.0/kernel/lib/crc16.ko > insmod /lib/modules/3.0.0/kernel/drivers/usb/core/usbcore.ko > insmod /lib/modules/3.0.0/kernel/net/rfkill/rfkill.ko > install /foo/bar > insmod /lib/modules/3.0.0/kernel/drivers/bluetooth/btusb.ko reset=1 > > but in kmod-4: > > $ modprobe --show-depends btusb > insmod /lib/modules/3.0.0/kernel/lib/crc16.ko > insmod /lib/modules/3.0.0/kernel/net/rfkill/rfkill.ko > install /foo/bar > insmod /lib/modules/3.0.0/kernel/drivers/usb/core/usbcore.ko > insmod /lib/modules/3.0.0/kernel/drivers/bluetooth/btusb.ko reset=1 > > $ modprobe --show-depends --ignore-install btusb > insmod /lib/modules/3.0.0/kernel/lib/crc16.ko > insmod /lib/modules/3.0.0/kernel/net/rfkill/rfkill.ko > insmod /lib/modules/3.0.0/kernel/net/bluetooth/bluetooth.ko > insmod /lib/modules/3.0.0/kernel/drivers/usb/core/usbcore.ko > insmod /lib/modules/3.0.0/kernel/drivers/bluetooth/btusb.ko reset=1 That's because kmod-4 was not acting as module-init-tools. In kmod-5 we fixed it. lucas@vader module-init-tools $ grep bluetooth /etc/modprobe.d/* /etc/modprobe.d/modprobe.conf:install bluetooth /bin/true lucas@vader module-init-tools $ ./build/modprobe --show-depends btusb install /bin/true insmod /lib/modules/3.3.0-rc2demarchi+/kernel/drivers/bluetooth/btusb.ko $ ./build/modprobe --show-depends --ignore-install btusb install /bin/true insmod /lib/modules/3.3.0-rc2demarchi+/kernel/drivers/bluetooth/btusb.ko kmod-5: $ ./tools/modprobe --show-depends btusb install /bin/true insmod /lib/modules/3.3.0-rc2demarchi+/kernel/drivers/bluetooth/btusb.ko $ ./tools/modprobe --show-depends --ignore-install btusb install /bin/true insmod /lib/modules/3.3.0-rc2demarchi+/kernel/drivers/bluetooth/btusb.ko Whether this is the desired behavior can be discussed. I just modified kmod-5 to make sure it was mimic'ing m-i-t behavior. In m-i-t and kmod-5 "ignore-install" applied only to the module you are trying to load. All dependencies will still have the install commands (and softdeps) applied. From manpage: -i --ignore-install --ignore-remove This option causes modprobe to ignore install and remove commands in the configuration file (if any) for the module specified on the command line (any dependent modules are still subject to commands set for them in the configuration file). Both install and remove commands will currently be ignored when this option is used regardless of whether the request was more specifically made with only one or other (and not both) of --ignore-install or --ignore-remove. See modprobe.d(5). We are acting just like that now. If your "install blacklist" was created for btusb instead, it would do what you are expecting: $ grep btusb /etc/modprobe.d/* /etc/modprobe.d/modprobe.conf:install btusb /bin/true $ ./tools/modprobe --show-depends --ignore-install btusb insmod /lib/modules/3.3.0-rc2demarchi+/kernel/net/bluetooth/bluetooth.ko insmod /lib/modules/3.3.0-rc2demarchi+/kernel/drivers/bluetooth/btusb.ko Regards, Lucas De Marchi -- To unsubscribe from this list: send the line "unsubscribe linux-modules" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html