1 |
On Wed, 2021-01-13 at 15:49 +0100, Ulrich Mueller wrote: |
2 |
> > > > > > On Wed, 13 Jan 2021, Michał Górny wrote: |
3 |
> > + local success= |
4 |
> > + while :; do |
5 |
> > + mount-boot_pkg_preinst |
6 |
> > + |
7 |
> > + local image_path=$(dist-kernel_get_image_path) |
8 |
> > + if use initramfs; then |
9 |
> > + # putting it alongside kernel image as |
10 |
> > 'initrd' makes |
11 |
> > + # kernel-install happier |
12 |
> > + nonfatal dist-kernel_build_initramfs \ |
13 |
> > + "${EROOT}/usr/src/linux- |
14 |
> > ${ver}/${image_path%/*}/initrd" \ |
15 |
> > + "${ver}" || break |
16 |
> > + fi |
17 |
> > |
18 |
> > - dist-kernel_install_kernel "${ver}" \ |
19 |
> > - "${EROOT}/usr/src/linux-${ver}/${image_path}" \ |
20 |
> > - "${EROOT}/usr/src/linux-${ver}/System.map" |
21 |
> > + nonfatal dist-kernel_install_kernel "${ver}" \ |
22 |
> > + "${EROOT}/usr/src/linux- |
23 |
> > ${ver}/${image_path}" \ |
24 |
> > + "${EROOT}/usr/src/linux-${ver}/System.map" |
25 |
> > || break |
26 |
> > + |
27 |
> > + success=1 |
28 |
> > + break |
29 |
> > + done |
30 |
> |
31 |
> Looks like this loop can run only once, so it is redundant? |
32 |
|
33 |
It's the old C trick for convenient error handling. Do you have any |
34 |
other suggestion? I suppose we could use a nested function if you think |
35 |
that's nicer. |
36 |
|
37 |
-- |
38 |
Best regards, |
39 |
Michał Górny |