Uninstall aptdaemon/aptd before using apt

This removes various kinds of update notifiers that depend on aptd.
Also gets rid of the problem that aptd may hold apt lock files.

Task-number: QTQAINFRA-1755
Change-Id: I27dd6fef4720ef25a504d76a3da16d9bf45fb2f7
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
This commit is contained in:
Frederik Gladhorn
2018-02-21 12:26:09 +01:00
committed by Liang Qi
parent f6f00fdce1
commit b20224fe60

View File

@@ -51,6 +51,19 @@ try
sudo systemctl stop $service
sudo systemctl disable $service
done
# aptdaemon is used by update notifiers and similar and there is no point in having those (the symptom is aptd holding a lock)
for i in `seq 10`; do
echo attempting to remove aptdaemon
sudo DEBIAN_FRONTEND=noninteractive apt-get -q -y remove aptdaemon || true
# check that aptdaemon is no longer installed
which aptd > /dev/null || break
if [[ $i -eq 10 ]]; then
throw $ExceptionAPT
fi
sleep 10
done
# Git is not needed by builds themselves, but is nice to have
# immediately as one starts debugging
installPackages+=(git)