[RFC] kernel.spec: reverse dependency logic for moving packages between kernel and kernel-modules-extra

Josh Boyer jwboyer at redhat.com
Fri Dec 2 18:13:33 UTC 2011


On Fri, Dec 02, 2011 at 01:02:03PM -0500, John W. Linville wrote:
> The logic to process mod-extra.list finds modules that depend on
> the modules in that list and includes those in kernel-module-extra
> as well.  This logic is broken, because it does not account for
> multi-layer dependency chains.  Specifically, if a module depends
> on another module, and only the second one depends on something in
> mod-extra.list, then only the second would get moved.  This leaves the
> first module in the kernel package, resulting in WARNING messages
> when the kernel rpm is installed:
> 
> Preparing...                ########################################### [100%]
>    1:kernel                 ########################################### [100%]
> WARNING: /lib/modules/3.2.0-0.rc3.git1.2.fc14.x86_64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko needs unknown symbol cnic_register_driver
> WARNING: /lib/modules/3.2.0-0.rc3.git1.2.fc14.x86_64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko needs unknown symbol cnic_unregister_driver
> WARNING: /lib/modules/3.2.0-0.rc3.git1.2.fc14.x86_64/kernel/drivers/scsi/bnx2i/bnx2i.ko needs unknown symbol cnic_register_driver
> WARNING: /lib/modules/3.2.0-0.rc3.git1.2.fc14.x86_64/kernel/drivers/scsi/bnx2i/bnx2i.ko needs unknown symbol cnic_unregister_driver
> WARNING: /lib/modules/3.2.0-0.rc3.git1.2.fc14.x86_64/kernel/drivers/usb/wusbcore/wusb-wa.ko needs unknown symbol wusbhc_reset_all
> WARNING: /lib/modules/3.2.0-0.rc3.git1.2.fc14.x86_64/kernel/drivers/usb/wusbcore/wusb-wa.ko needs unknown symbol wusbhc_handle_dn
> WARNING: /lib/modules/3.2.0-0.rc3.git1.2.fc14.x86_64/kernel/drivers/usb/wusbcore/wusb-wa.ko needs unknown symbol wusbd
> WARNING: /lib/modules/3.2.0-0.rc3.git1.2.fc14.x86_64/kernel/drivers/usb/wusbcore/wusb-wa.ko needs unknown symbol __wusb_dev_get_by_usb_dev
> WARNING: /lib/modules/3.2.0-0.rc3.git1.2.fc14.x86_64/kernel/drivers/usb/wusbcore/wusb-wa.ko needs unknown symbol wusbhc_giveback_urb
> WARNING: /lib/modules/3.2.0-0.rc3.git1.2.fc14.x86_64/kernel/drivers/usb/wusbcore/wusb-wa.ko needs unknown symbol wusb_dev_destroy
> WARNING: /lib/modules/3.2.0-0.rc3.git1.2.fc14.x86_64/kernel/drivers/usb/atm/xusbatm.ko needs unknown symbol usbatm_usb_disconnect
> WARNING: /lib/modules/3.2.0-0.rc3.git1.2.fc14.x86_64/kernel/drivers/usb/atm/xusbatm.ko needs unknown symbol usbatm_usb_probe
> WARNING: /lib/modules/3.2.0-0.rc3.git1.2.fc14.x86_64/kernel/net/bridge/netfilter/ebtable_broute.ko needs unknown symbol br_should_route_hook

Weird.  I don't recall seeing any of those warnings at all in my
testing.


> 
> This patch reverses that logic, so that anything in kernel with
> a dependency on something in mod-extra.list will cause the module
> in mod-extra.list to be treated as if it was _not_ in that list.
> This prevents the WARNING lines above.
> 
> Signed-off-by: John W. Linville <linville at tuxdriver.com>
> ---
> I don't think I'm very fond of the kernel-modules-extra package.
> But if it is going to be around, it needs to process the dependencies
> in a way that doesn't require both modules to be installed all the
> time. :-)

Honestly, we might want to just call depmod to work out _all_ the
dependencies, then parse modules.dep and move everything once.  Playing
games either way is just going to play shell games moving a module
around.

josh


More information about the kernel mailing list