On Wed, 2021-01-13 at 15:49 +0100, Ulrich Mueller wrote:
> > > > > > On Wed, 13 Jan 2021, Michał Górny wrote:
> > + local success=
> > + while :; do
> > + mount-boot_pkg_preinst
> > +
> > + local image_path=$(dist-kernel_get_image_path)
> > + if use initramfs; then
> > + # putting it alongside kernel image as
> > 'initrd' makes
> > + # kernel-install happier
> > + nonfatal dist-kernel_build_initramfs \
> > + "${EROOT}/usr/src/linux-
> > ${ver}/${image_path%/*}/initrd" \
> > + "${ver}" || break
> > + fi
> >
> > - dist-kernel_install_kernel "${ver}" \
> > - "${EROOT}/usr/src/linux-${ver}/${image_path}" \
> > - "${EROOT}/usr/src/linux-${ver}/System.map"
> > + nonfatal dist-kernel_install_kernel "${ver}" \
> > + "${EROOT}/usr/src/linux-
> > ${ver}/${image_path}" \
> > + "${EROOT}/usr/src/linux-${ver}/System.map"
> > || break
> > +
> > + success=1
> > + break
> > + done
>
> Looks like this loop can run only once, so it is redundant?
It's the old C trick for convenient error handling. Do you have any
other suggestion? I suppose we could use a nested function if you think
that's nicer.
--
Best regards,
Michał Górny