hi, 

Andreas, Nicolas, what do you think about the PoC proposed by Guilhem?

On Tue, Jul 19, 2022 at 11:42:47PM +0200, Guilhem Moulin wrote:
> Package: piuparts
> Version: 1.1.5
> Severity: normal
> File: /etc/piuparts/scripts/pre_install_database-server
> Tags: patch
> 
> Dear Maintainer,
> 
> Piuparts scripts in /etc/piuparts/scripts/* case match over 
> ${PIUPARTS_OBJECTS%%=*}, which
> works on piuparts.d.o (which calls piuparts with `--apt 
> ${PKGNAME}=${VERSION}`) but not on
> salsa ci (since it calls piuparts with 
> `/path/to/${PKGNAME}_${VERSION}_${ARCH}.deb`).  I
> think the script also doesn't work when a .change or when multiple packages 
> are supplied.
> 
> I attach a PoC patch which fixes the problem for me, but I believe other 
> scripts are
> affected as well.  I can submit a file for other scripts too but but I'm 
> unsure the
> proposed the logic is the way to go.
> 
> Thanks for maintaining piuparts!
> -- 
> Guilhem.

> --- a/piuparts/scripts/pre_install_database-server
> +++ b/piuparts/scripts/pre_install_database-server
> @@ -12,204 +12,207 @@ FUSIONFORGE=
>  CLIENT=
>  INSTALL=
>  
> -case ${PIUPARTS_OBJECTS%%=*} in
> -     acidbase)                               MYSQL=yes ;;
> -     auth2db)                                MYSQL=yes ; CLIENT=yes ;;
> -     auth2db-common)                         MYSQL=yes ; CLIENT=yes ;;
[...]
> -esac
> +for arg in $PIUPARTS_OBJECTS; do
> +    arg="${arg##*/}"
> +     case "${arg%%[=_]*}" in
> +             acidbase)                               MYSQL=yes ;;
> +             auth2db)                                MYSQL=yes ; CLIENT=yes 
> ;;
> +             auth2db-common)                         MYSQL=yes ; CLIENT=yes 
> ;;
> +             auth2db-frontend)                       MYSQL=yes ; CLIENT=yes 
> ;;
[...]
> +     esac
> +done

?

-- 
cheers,
        Holger

 ⢀⣴⠾⠻⢶⣦⠀
 ⣾⠁⢠⠒⠀⣿⡁  holger@(debian|reproducible-builds|layer-acht).org
 ⢿⡄⠘⠷⠚⠋⠀  OpenPGP: B8BF54137B09D35CF026FE9D 091AB856069AAA1C
 ⠈⠳⣄

Because things are the way they are, things will not stay the way they are.
(Bertolt Brecht)

Attachment: signature.asc
Description: PGP signature

Reply via email to