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

Re: Detecting install vs upgrade in postinst



On Sun, 2016-06-05 at 11:29 +0200, Marco d'Itri wrote:
> On Jun 05, Ben Hutchings <ben@decadent.org.uk> wrote:
> 
> > The postinst script for linux-image-* behaves differently on fresh
> > installation vs upgrade.  For a fresh installation, it updates the
> > default symlinks /vmlinuz and /initrd.img to point to the new kernel
> > and initramfs versions.  On upgrade it generally doesn't.
> BTW, can we remove these? At least on x86 they should not be useful 
> anymore since lilo has bit rotten.

Unfortunately there are many boot loaders (and custom configurations)
that rely on them, not just lilo.  But they can be disabled by adding
'do_symlinks = no' to /etc/kernel-img.conf.

Ben.

> > I've been rewriting and simplifying the scripts, and in my testing I
> > realised that if a package is installed, removed and installed a second
> > time it sees the second installation as an upgrade - which I think is
> > incorrect.  It currently detects an upgrade based on whether the second
> > argument to the postinst script is non-empty, and that's defined as
> > 'the mostly recently configured version'.
> This is what all my packages do as well.
> 
-- 
Ben Hutchings
Everything should be made as simple as possible, but not simpler.
                                                           - Albert
Einstein

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


Reply to: