Re: [PATCH 1/2] CI: Simplify directories creation

Frediano Ziglio <[email protected]> Tue, 4 Aug 2026 22:40:44 +0100
Newsgroups gmane.comp.emulators.xen.devel
Message-ID <CAHt6W4caSVXHx-bdNh0WDTk-K0UXTb0pN75NYuCC+A66woo9Vw@mail.gmail.com>
On Tue, 4 Aug 2026 at 20:29, Anthony PERARD <[email protected]> wrote:
>
> On Tue, Aug 04, 2026 at 06:42:17PM +0100, Frediano Ziglio wrote:
> > diff --git a/automation/scripts/qemu-alpine-x86_64.sh b/automation/scripts/qemu-alpine-x86_64.sh
> > index 242ffca693..60f5cc49fc 100755
> > --- a/automation/scripts/qemu-alpine-x86_64.sh
> > +++ b/automation/scripts/qemu-alpine-x86_64.sh
> > @@ -4,16 +4,7 @@ set -ex -o pipefail
> >
> >  # DomU Busybox
> >  cd binaries
> > -mkdir -p initrd
> > -mkdir -p initrd/bin
> > -mkdir -p initrd/sbin
> > -mkdir -p initrd/etc
> > -mkdir -p initrd/dev
> > -mkdir -p initrd/proc
> > -mkdir -p initrd/sys
> > -mkdir -p initrd/lib
> > -mkdir -p initrd/var
> > -mkdir -p initrd/mnt
> > +mkdir -p initrd/{bin,sbin,etc,dev,proc,sys,lib,var,mnt}
>
> This makes it really hard to find out if more directory or less
> directory are been created. When reviewing a patch, we don't see what
> changed in a line without using more complex tools.
>
> For this patch, I have now idea at a glimpse if all the directory that
> was created before are still created.
>
> In the future, we might need to create more directories, this would
> change on very long line to another, and make it hard to find out what
> was the logical change, by just looking at the output of `diff -u`.
>
> So I don't see this patch as an improvement.
>
> But that just my opinion, but that would apply equally to other similar
> changes, like packing all the variable declaration on a single line in C.
>
> Cheers,
>

Hi,
   what about putting the directory names in alphabetical order?
Either in multiline or in the concise single line?
In both cases it makes it easier to check if it's already there.

Or something like

mkdir -p binaries/initrd
cd binaries/initrd
mkdir -p \
        bin \
        dev \
        etc \
        lib \
        mnt \
        proc \
        sbin \
        sys \
        var
cd ..

Regards,
   Frediano