Re: depmod -a after module install
On Sun, Jul 03, 2005 at 10:35:22PM +0300, Tzafrir Cohen wrote:
> Hi debian-kernel folks,
>
> I'm trying to modify the package zaptel-source (generated from source
> package zaptel). That package is used to build a kernel modules package
> called zaptel-modules-<kernel-version> (zaptel-modules hence forth).
>
> Currently the package zaptel-source has a postinst script that runs:
>
> if [ "`uname -r`" = "_KVERS_" ];
> depmod -a &
> fi
>
> That script is probably useless for the source package itself, as it has
> no kernel modules itself, and the kernel version at the time of its
> install is irrelevant to the kernel that will be built later. I moved it
> to the postinst script of the gemnerated zaptel-modules package (I
> fogure that an appropriate postrm script should be added).
>
> However I noticed an error in a script that installed that package. I
> noticed that this script runs:
>
> apt-get install zaptel-modules-$kernel
> depmod -a
>
> The error message was from depmod, because the two runs of depmod
> aparantly colided. The manual install of depmod could be removed. But
> what would have hapanned had I run:
>
>
> apt-get install zaptel-modules-$kernel other-modules-$kernel
>
> and the package other-modules-$kernel had the same script? Any chance
> the same error would occour?
>
> So what should I do:
>
> 1. Drop that postinst script. Require more work from the installer
>
> 2. Keep the script as-is
>
> 3. run 'depmod -a' with no '&' instead, and possibly further delay
> installation?
I'd choose option 3.
--
Horms
Reply to: