on master help sign in
[fix] old images need an initial 'apt update'
d21e0b0Markus Heiser
utils/lib.sh+6
@@ -1216,6 +1216,8 @@ uWSGI_disable_app() {
1216# distro's package manager
1216# distro's package manager
1217# ------------------------
1217# ------------------------
1218
1218
1219+_apt_pkg_info_is_updated=0
1220+
1219pkg_install() {
1221pkg_install() {
1220
1222
1221 # usage: TITEL='install foobar' pkg_install foopkg barpkg
1223 # usage: TITEL='install foobar' pkg_install foopkg barpkg
@@ -1230,6 +1232,10 @@ pkg_install() {
1230 fi
1232 fi
1231 case $DIST_ID in
1233 case $DIST_ID in
1232 ubuntu|debian)
1234 ubuntu|debian)
1235+ if [[ $_apt_pkg_info_is_updated == 0 ]]; then
1236+ export _apt_pkg_info_is_updated=1
1237+ apt update
1238+ fi
1233 # shellcheck disable=SC2068
1239 # shellcheck disable=SC2068
1234 apt-get install -m -y $@
1240 apt-get install -m -y $@
1235 ;;
1241 ;;