#1015732 piuparts: scripts/pre_install_database-server doesn't work when piuparts is fed a .changes or .deb

Package:
piuparts
Source:
piuparts
Submitter:
Guilhem Moulin
Date:
2023-01-18 12:12:03 UTC
Severity:
normal
Tags:
#1015732#5
Date:
2022-07-19 21:42:47 UTC
From:
To:
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!

#1015732#10
Date:
2023-01-18 12:06:25 UTC
From:
To:
hi,

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

?