Re: [PATCH] make builddeb invoke calls to linux-update-symlink

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

 



On Sat, 2020-05-23 at 02:01 +0900, Masahiro Yamada wrote:
> Hi Ben,
> 
> On Sun, May 10, 2020 at 1:06 PM Jason Self <j@xxxxxxxxxx> wrote:
> > The official Debian kernel packages,
> 
> I'd like to consult you.
> Does this patch look OK?

No, it doesn't.

> > in addition to running the
> > scripts in /etc/kernel, also runs linux-update-symlinks via the
> > postinst and postrm scripts. This maintains the /vmlinuz and
> > /initrd.img (if it uses an initramfs) symlinks. This change makes the
> > builddeb script generate those same calls.
> > 
> > Signed-off-by: Jason Self <j@xxxxxxxxxx>
> > ---
> >  scripts/package/builddeb | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/scripts/package/builddeb b/scripts/package/builddeb
> > index 6df3c9f8b2da..f34c11c63ede 100755
> > --- a/scripts/package/builddeb
> > +++ b/scripts/package/builddeb
> > @@ -195,6 +195,14 @@ export DEB_MAINT_PARAMS="\$*"
> >  # Tell initramfs builder whether it's wanted
> >  export INITRD=$(if_enabled_echo CONFIG_BLK_DEV_INITRD Yes No)
> > 
> > +$(case $script in
> > +postinst)
> > +        echo linux-update-symlinks install $version $installed_image_path
> > +        ;;
> > +postrm)
> > +        echo linux-update-symlinks remove $version $installed_image_path
> > +esac)

This doesn't handle upgrades properly.  The extra conditions in the
maintainer scripts for official Debian packages really are needed.

It's also not correct to assume that linux-update-symlinks is always
available.  If the generated linux-image package depends on "linux-base 
(>= 4.1~)" then the postinst script can use it unconditionally. 
However, the postrm script will always have to check whether it is
present.

Ben.

> >  test -d $debhookdir/$script.d && run-parts --arg="$version" --arg="/$installed_image_path" $debhookdir/$script.d
> >  exit 0
> >  EOF
> > --
> > 2.26.0
> > 
> 
> 
-- 
Ben Hutchings
Every program is either trivial or else contains at least one bug


Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux