installdeps: remove wxgtk2 for Arch on failure

The wxgtk2 package being installed may prevent the installation of the
newer wxwidgets-gtk3 package, remove it on pacman failure and try again.

See:

https://archlinux.org/news/wxwidgets-32-update-may-need-manual-intervention/

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2022-09-03 09:34:05 +00:00
parent 355c8efeb4
commit e140ba816c
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 7 additions and 2 deletions

View File

@ -882,8 +882,13 @@ archlinux_installdeps() {
if [ -z "$target" -o "$target" = m32 ]; then
if [ -z "$target" -o -z "$amd64" ]; then
# native build
check $pacman --noconfirm --needed -S "$gcc_pkg" $libs
# Native build.
#
# On newer versions wxgtk2 may have to be manually removed.
if ! $pacman --noconfirm --needed -S "$gcc_pkg" $libs; then
$pacman --noconfirm -R wxgtk2
fi
$pacman --noconfirm --needed -S "$gcc_pkg" $libs
else
# try to build 32 bit binaries