[Bug 125816] linux-image postinst matches header_postinst_hook for postinst_hook incorrectly

Matt Domsch Matt_Domsch at dell.com
Fri Jul 13 16:20:19 UTC 2007


Public bug reported:

Binary package hint: linux-image-2.6-686

>From Matt_Domsch at dell.com Fri Jul 13 11:12:48 2007
Date: Fri, 13 Jul 2007 11:12:48 -0500
From: Matt Domsch <Matt_Domsch at dell.com>
To: "Brinkman, Alexander" <A.Brinkman at marin.nl>
Cc: dkms-devel at dell.com, Ben Collins <ben.collins at ubuntu.com>
Subject: Re: ANNOUNCE: dkms 2.0.17
Mail-Followup-To: "Brinkman, Alexander" <A.Brinkman at marin.nl>,
        dkms-devel at dell.com, Ben Collins <ben.collins at ubuntu.com>
References: <5D9143EF9FADE942BEF6F2A636A861170354D706 at MAR150CV1.marin.local>
Status: RO

On Fri, Jul 13, 2007 at 11:06:42AM +0200, Brinkman, Alexander wrote:
>
> It would seem that the new Ubuntu stuff that was introduced still has a
> little bug in it. Or better said: probably DKMS is ok, but the hook
> mechanism is not working correctly anymore.
>
> With DKMS 2.0.17 the file /etc/kernel-img.conf now reads:
> do_symlinks = yes
> relative_links = yes
> do_bootloader = no
> do_bootfloppy = no
> do_initrd = yes
> link_in_boot = no
> postinst_hook = /sbin/update-grub
> postrm_hook   = /sbin/update-grub
> header_postinst_hook = /etc/kernel/postinst.d/dkms
>
> When this last line is in the config file the previous lines are not
> called anymore (the postinst and postrm hooks). So update-grub is not
> executed anymore on a kernel update (or remove), which is not good.
>
> It can fairly easily be fixed by adding a link in the
> /etc/kernel/postinst.d directory to /sbin/update-grub.
>
> But I'm not really sure why the hooks in the config file are not used
> anymore. Perhaps because the /etc/kernel/* directories were empty
> before, and now there's a dkms script in them (which would maybe
> overrule the postinst/postrm_hook entries in the config file?). However,
> when removing the last line from the kernel-img.conf file, update-grub
> is again called upon installation of a new kernel... very confusing...

Doh.  See this in /var/lib/dpkg/info/linux-
image-2.6.20-16-generic.postinst:

      $postinst_hook   = "$1"  if /postinst_hook\s*=\s*(\S+)/ig;

Notice the test.  It's matching postinst_hook  on the
header_postinst_hook line from the /etc/kernel-img.conf file, so it's
overriding the call to update-grub with another call to dkms.

That is a bug in the linux-image scripts.  Will file as such.

I guess that also means we can't rely on that to hook in DKMS for a
while... :-(  And we'll have to respin DKMS to remove that...

** Affects: redfish (upstream)
     Importance: High
         Status: New

** Affects: linux-meta (Ubuntu)
     Importance: Undecided
         Status: New

** Also affects: redfish (upstream)
   Importance: Undecided
       Status: New

-- 
linux-image postinst matches header_postinst_hook for postinst_hook incorrectly
https://bugs.launchpad.net/bugs/125816
You received this bug notification because you are a member of Kernel
Bugs, which is a bug contact for linux-meta in ubuntu.




More information about the kernel-bugs mailing list