Move test_dpkg_lock to initial UPDATE_PKG_CACHE. There was unpredictable interference with debconf-apt-progress

This commit is contained in:
DL6ER 2017-03-03 11:52:49 +01:00
parent a535ca9db4
commit 9502356980
No known key found for this signature in database
GPG key ID: 00135ACBD90B28DD

View file

@ -59,8 +59,8 @@ distro_check() {
if command -v apt-get &> /dev/null; then if command -v apt-get &> /dev/null; then
#Debian Family #Debian Family
############################################# #############################################
PKG_MANAGER="test_dpkg_lock; apt-get" PKG_MANAGER="apt-get"
UPDATE_PKG_CACHE="${PKG_MANAGER} update" UPDATE_PKG_CACHE="test_dpkg_lock; ${PKG_MANAGER} update"
PKG_INSTALL=(${PKG_MANAGER} --yes --no-install-recommends install) PKG_INSTALL=(${PKG_MANAGER} --yes --no-install-recommends install)
# grep -c will return 1 retVal on 0 matches, block this throwing the set -e with an OR TRUE # grep -c will return 1 retVal on 0 matches, block this throwing the set -e with an OR TRUE
PKG_COUNT="${PKG_MANAGER} -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true" PKG_COUNT="${PKG_MANAGER} -s -o Debug::NoLocking=true upgrade | grep -c ^Inst || true"
@ -799,6 +799,7 @@ install_dependent_packages() {
fi fi
done done
if [[ ${#installArray[@]} -gt 0 ]]; then if [[ ${#installArray[@]} -gt 0 ]]; then
test_dpkg_lock
debconf-apt-progress -- "${PKG_INSTALL[@]}" "${installArray[@]}" debconf-apt-progress -- "${PKG_INSTALL[@]}" "${installArray[@]}"
return return
fi fi