[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#270941: depmod: Can't open /stor/usr-src/linux/debian/tmp-image/lib/modules/extra/modules.dep for writing



> (as root)
> >make-kpkg --revision fuzzy.1 kernel_image
> 
> <snip>
> 
> cd /stor/usr-src/linux/debian/tmp-image/lib/modules/2.4.27; \
> mkdir -p pcmcia; \
> find kernel -path '*/pcmcia/*' -name '*.o' | xargs -i -r ln -sf ../{}
> pcmcia
> if [ -r System.map ]; then /sbin/depmod -ae -F System.map -b
> /stor/usr-src/linux/debian/tmp-image -r 2.4.27; fi
> depmod: Can't open
> /stor/usr-src/linux/debian/tmp-image/lib/modules/extra/modules.dep for
> writing
> make[2]: *** [_modinst_post] Error 255
> make[2]: Leaving directory `/stor/usr-src/kernel-source-2.4.27'
> make[1]: *** [real_stamp_image] Error 2
> make[1]: Leaving directory `/stor/usr-src/kernel-source-2.4.27'
> make: *** [kernel-image-deb] Error 2

Basically what seems to be happening is that depmod is trying to create
a modules.dep file in ROOT/ lib/modules/extra/ for some reason but no
such directory exists.  The "extra" is the problematic part. (Thanks to
Herbert Xu for pointing out something rather obvious there.)

* stuff about depmod code *

Unfortunately I do not know why this occuring. I tried adding keep
path=/lib/modules/extra to /etc/modules.conf (by adding
path=/lib/modules/extra to /etc/modutils/paths and running
update-modules), however this does not produce the problem as paths
added in such a manner are checked for existence in config_lstmod() in
modutils.

The error message reported is almost certainly produced by
gen_file_open() in depmod.c which is called on a list of hardcoded paths
in prtdepend(). I am guessing that in some version of modutils extra
crept in. However the version I have, 2.4.26-1 has been in the debian
archive since last year, so I expect that the person reporting the bug
has that version too.

Perhaps the person reporting the bug has a particularly curious
modules.conf setup, but searching on the net I see other people
have experienced the same problem over time, and yet I couldn't
find any solutions posted.

* stuff about kernel-package code *

A work around would be to add the following just before the depmod call
in /usr/share/kernel-package/rules which is provided by kernel-package

if [ ! -f "$(INSTALL_MOD_PATH)/extra" ]; then mkdir "(INSTALL_MOD_PATH)/extra"; fi

This certainly shouldn't add to the problem, and might cause less pain
in the long run. But as I am unable to reproduce the problem I am not
sure if it is a good solution. I have CCed both the modutils and
kernel-package debian package maintainers in the hope that they can shed
some light on this problem or suggest a fix. 

-- 
Horms



Reply to: