forked from zaclys/searxng
[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>
This commit is contained in:
parent
5fc17de861
commit
d21e0b0ef8
|
@ -1216,6 +1216,8 @@ uWSGI_disable_app() {
|
||||||
# distro's package manager
|
# distro's package manager
|
||||||
# ------------------------
|
# ------------------------
|
||||||
|
|
||||||
|
_apt_pkg_info_is_updated=0
|
||||||
|
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
|
|
||||||
# usage: TITEL='install foobar' pkg_install foopkg barpkg
|
# usage: TITEL='install foobar' pkg_install foopkg barpkg
|
||||||
|
@ -1230,6 +1232,10 @@ pkg_install() {
|
||||||
fi
|
fi
|
||||||
case $DIST_ID in
|
case $DIST_ID in
|
||||||
ubuntu|debian)
|
ubuntu|debian)
|
||||||
|
if [[ $_apt_pkg_info_is_updated == 0 ]]; then
|
||||||
|
export _apt_pkg_info_is_updated=1
|
||||||
|
apt update
|
||||||
|
fi
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
apt-get install -m -y $@
|
apt-get install -m -y $@
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in New Issue