On Tue, Aug 13, 2019 at 09:59:28PM +0200, Christian Weisgerber wrote:
> * Remove syspatch files from the installed system and not the ramdisk.
> * Use extended globs and generally adopt to the style of this script.
> 
> ok?

I'm ok with your patch. One suggestion:

>       if [[ -f /mnt/usr/bin/clang ]]; then

Could you add '&& -d /mnt/usr/lib/clang' to check whether the directory
exists before trying to cd into it (similarly for /mnt/usr/bin/gcc and
gcc-libs)?

On amd64, /usr/bin/clang is in the base set due to KARL while the
/usr/lib/clang directory is shipped as part of the comp set.  I know we
don't want to support installs that skip some sets, but still.

> -             CVER=$(cd /mnt/usr/lib/clang && ls -r | sed -e 1q)
> -             rm -rf -- `ls -d /mnt/usr/lib/clang/* | grep -v "${CVER}$"`
> +             _cver=$(cd /mnt/usr/lib/clang && ls -r | sed -e 1q) &&
> +                     rm -rf /mnt/usr/lib/clang/!($_cver)
>       fi

Reply via email to