Disable leak detection if debug symbols are unavailable

There just doesn't seem to be any way to make this work right now, so
handle dbgsym packages installation failure and disable leak detection
in this case.

Hopefully ddebs.ubuntu.com repository will be updated in the future,
allowing this to work again.
This commit is contained in:
Vadim Zeitlin
2021-03-23 13:36:48 +01:00
parent c471699187
commit a47bb47165
2 changed files with 22 additions and 4 deletions

View File

@@ -43,7 +43,7 @@ case $(uname -s) in
wget -O - http://ddebs.ubuntu.com/dbgsym-release-key.asc | $SUDO apt-key add -
# Install the symbols to allow LSAN suppression list to work.
pkg_install='libfontconfig1-dbgsym libglib2.0-0-dbgsym libgtk-3-0-dbgsym libatk-bridge2.0-0-dbgsym'
dbgsym_pkgs='libfontconfig1-dbgsym libglib2.0-0-dbgsym libgtk-3-0-dbgsym libatk-bridge2.0-0-dbgsym'
fi
run_apt update
@@ -85,7 +85,18 @@ case $(uname -s) in
fi
done
run_apt install -y $pkg_install
if ! run_apt install -y $pkg_install $dbgsym_pkgs; then
if [ -z "$dbgsym_pkgs" ]; then
exit $?
fi
# Retry without dbgsym packages that currently fail to install
# under Ubuntu Focal (20.04).
echo 'Installing with dbgsym packages failed, retrying without...'
run_apt install -y $pkg_install
else
touch wx_dbgsym_available
fi
fi
;;