Re: Bug#843727: fix inside
Le jeudi 10 novembre 2016, 13:32:02 CET Eric Valette a écrit :
> On 11/10/2016 01:28 PM, Cyril Brulebois wrote:
> > Hi Aurélien,
> >
> > Aurélien COUDERC <zecoucou@free.fr> (2016-11-10):
> >> Committed, thanks.
> >>
> >> @all, in postinst I see that update-grub is called with
> >> update-grub || true
> >> to ensure package installation succeeds even if it returns an error.
> >>
> >> Shouldn't we do the same with update-initramfs -u ?
> >> Currently it's called as is so if returns non-zero it'll break package
> >> install like #843727 due to set -e.
> >
> > I don't think that's reasonable. Debian Policy mandates proper error
> > reporting, so as to stop the installation/update process if errors are
> > encountered, see Debian Policy 6.1:
> >
> > https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html
>
> System without initramfs will then fail installing the packages. I'm not
> sure it is normal for desktop-base to mandate update-initramfs or it
> should explicitly depend on it (and on grub BTW).
No they won't, the detection of whether update-initramfs is present is done correctly.
The choice is whether we want the install to fail when update-grub / update-initramfs *exists* but returns an error.
Currently both calls are not consistent wrt this.
195 # Apply GRUB background update into /boot
196 if which update-grub > /dev/null ; then
197 # Ensure the background image file has actually been written to disc
198 # before updating.
199 sync
200 update-grub || true
201 fi
202
203 if which update-initramfs > /dev/null; then
204 update-initramfs -u
205 fi
Cheers,
--Aurélien
Reply to: