On Sun, 12 Dec 2010, Ben Hutchings wrote: > The transition from old-style IDE to libata-based drivers means the > new kernel may need different drivers from the running system. We > already handle the change of controller driver correctly since we find > driver modules via module aliases. However for the disk driver > (sd_mod or ide-disk) we look at which types of devices exist in the > running system, so we may not select the one we need. > > Since all the controller driver modules depend on the core modules > under drivers/ide or drivers/scsi, we can work out which disk > driver(s) may be needed by checking whether those module > subdirectories have been created under the target directory. > > Reported-by: Gordon Farquharson <gordonfarquhar...@gmail.com> > Signed-off-by: Ben Hutchings <b...@decadent.org.uk>
Thank you a lot for the excellent bug hunt. > --- > I've given this a very little testing and it seems to do the right > thing. This obviously needs careful review! > > Ben. > > hook-functions | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hook-functions b/hook-functions > index 0684296..da16478 100644 > --- a/hook-functions > +++ b/hook-functions > @@ -349,7 +349,7 @@ dep_add_modules() > sys_walk_mod_add ${root_dev_path} > > # catch old-style IDE > - if [ -e /sys/bus/ide/devices/ ]; then > + if [ -d "${DESTDIR}/lib/modules/${version}/kernel/drivers/ide" ]; then Not sure I like this change, as this is a noop in any of our linux-2.6 > sys_walk_modalias ${root_dev_path} > manual_add_modules ide-gd_mod > # FIXME: remove post Squeeze > @@ -357,7 +357,7 @@ dep_add_modules() > manual_add_modules ide-cd > fi > > - if [ -e /sys/bus/scsi/devices/ ]; then > + if [ -d "${DESTDIR}/lib/modules/${version}/kernel/drivers/scsi" ]; then same here. > manual_add_modules sd_mod > fi > > -- > 1.7.2.3 > > > so instead of overoptimising here, I'd just remove both conditions. Of course they can be left or readded post-squeeze. what do you think? -- maks -- To UNSUBSCRIBE, email to debian-kernel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20101214184523.ge...@stro.at