Merge "Add option to skip update packages"

This commit is contained in:
Zuul 2019-05-31 08:13:38 +00:00 committed by Gerrit Code Review
commit 21676bd350
3 changed files with 12 additions and 1 deletions

View File

@ -20,6 +20,14 @@ customize cloud-init's management of `/etc/hosts`:
preserve diskimage-builder's current default behavior in the
future, set the variable to "localhost" explicitly.)
The 'DIB_AVOID_PACKAGES_UPDATE' environment variable can be used to
avoid updating all packages, useful when wanting to avoid release
update.
* 'DIB_AVOID_PACKAGES_UPDATE' default is '0', all packages will be updated.
* set 'DIB_AVOID_PACKAGES_UPDATE' to '1' to avoid updating all packages.
Notes:
* If you are getting warnings during the build about your locale

View File

@ -0,0 +1 @@
export DIB_AVOID_PACKAGES_UPDATE=${DIB_AVOID_PACKAGES_UPDATE:-0}

View File

@ -8,4 +8,6 @@ fi
set -eu
set -o pipefail
install-packages -u
if [ ${DIB_AVOID_PACKAGES_UPDATE} -eq 0 ]; then
install-packages -u
fi