remove_packages: remove a package's -debug package too
An AUR package built with makepkg's debug option comes with pkg-debug,
which nothing depends on, so pacman -Rns leaves it behind. voxtype-debug
then conflicts with voxtype-bin-debug, and update fails on machines
installed before voxtype-bin replaced voxtype. Found by
30-upgrade-from-baseline at 0c0ddf5.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -106,10 +106,16 @@ remove_packages() {
|
||||
|
||||
# Match the exact name: pacman -Q also finds a package that provides it, such
|
||||
# as herdr-bin for herdr, which pacman -R won't remove by that name
|
||||
# An AUR package built with makepkg's debug option comes with pkg-debug,
|
||||
# which nothing depends on, so -Rns leaves it behind, and its files conflict
|
||||
# with the replacement's (voxtype-debug with voxtype-bin-debug)
|
||||
for pkg in "${packages[@]}"; do
|
||||
if [ "$(pacman -Qq "$pkg" 2> /dev/null)" = "$pkg" ]; then
|
||||
to_remove+=("$pkg")
|
||||
fi
|
||||
if [ "$(pacman -Qq "$pkg-debug" 2> /dev/null)" = "$pkg-debug" ]; then
|
||||
to_remove+=("$pkg-debug")
|
||||
fi
|
||||
done
|
||||
|
||||
if [ ${#to_remove[@]} -ne 0 ]; then
|
||||
|
||||
Reference in New Issue
Block a user