Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not update package cache on install/upgrade #5502

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions automated install/basic-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ PI_HOLE_FILES=(list piholeDebug piholeLogFlush setupLCD update version gravity u
PI_HOLE_INSTALL_DIR="/opt/pihole"
PI_HOLE_CONFIG_DIR="/etc/pihole"
PI_HOLE_BIN_DIR="/usr/local/bin"
PKG_MANAGER_UPDATE=false
if [ -z "$useUpdateVars" ]; then
useUpdateVars=false
fi
Expand Down Expand Up @@ -1297,6 +1298,12 @@ update_package_cache() {
# Update package cache on apt based OSes. Do this every time since
# it's quick and packages can be updated at any time.

# Update package cache only once
if [[ "${PKG_MANAGER_UPDATE}" == "true" ]]; then
return
fi
PKG_MANAGER_UPDATE=true

# Local, named variables
local str="Update local cache of available packages"
printf " %b %s..." "${INFO}" "${str}"
Expand Down