makepkg --packagelist lists debug-package, even if its not built
Description:
makepkg --packagelist always lists the debug package, even if it is not built (due to no binary to strip). Imho, this contradicts the documentation, but I'm not sure if the docs should be fixed or makepkg could be adapted to produce correct outputs.
I stumbled upon this, because the (since February '24) default-enabled debug option of makepkg now breaks the integration tests of aconfmgr, which assumes that every package listed in makepkg --packagelist actually exists after a call to makepkg (see source).
Additional info:
$ LC_ALL=C makepkg --version
makepkg (pacman) 7.0.0
Steps to reproduce:
This works, because it has a binary to strip:
cd `mktemp -d`
cat > PKGBUILD <<EOF
pkgname=dummy
pkgver=1.0
pkgrel=1
pkgdesc="Dummy"
arch=(any)
build() {
echo "int main() { return 1;}" > "\$srcdir"/test.c
gcc -o test test.c
}
package() {
install -m 755 "\$srcdir"/test "\$pkgdir"/
}
EOF
makepkg
ls `makepkg --packagelist`
This doesn't:
cd `mktemp -d`
cat > PKGBUILD <<EOF
pkgname=dummy
pkgver=1.0
pkgrel=1
arch=(any)
package() {
touch "\$pkgdir"/test
}
EOF
makepkg
ls `makepkg --packagelist`