on master help sign in
[fix] old images need an initial 'apt update'

see https://github.com/asciimoo/searx/pull/1803#issuecomment-616684353 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>

commitd21e0b0ef80402e6bb610ba086dc81ad93e451d5 authorMarkus Heiser <markus.heiser@darmarit.de> dateWed 22 Apr 2020, 01:11 (7 years ago) parent5fc17de
1 file changed+6
utils/lib.sh+6
utils/lib.sh+6
@@ -1216,6 +1216,8 @@ uWSGI_disable_app() {
12161216# distro's package manager
12171217# ------------------------
12181218
1219+_apt_pkg_info_is_updated=0
1220+
12191221pkg_install() {
12201222
12211223 # usage: TITEL='install foobar' pkg_install foopkg barpkg
@@ -1230,6 +1232,10 @@ pkg_install() {
12301232 fi
12311233 case $DIST_ID in
12321234 ubuntu|debian)
1235+ if [[ $_apt_pkg_info_is_updated == 0 ]]; then
1236+ export _apt_pkg_info_is_updated=1
1237+ apt update
1238+ fi
12331239 # shellcheck disable=SC2068
12341240 apt-get install -m -y $@
12351241 ;;