From: Bartek Grzybowski Date: Thu, 29 Oct 2020 13:03:50 +0000 (+0100) Subject: Clean target repository dir prior to downloading packages X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=524ed121cb91ae0d1cdfe3282609c9bf1588cda7;p=oom%2Foffline-installer.git Clean target repository dir prior to downloading packages This increases idempotency and allows avoiding side effects in cases where repo dir already contains images that are not on the list of required packages. Change-Id: Ieaa4e407ae7aacdc8d25440d90860cb880df09e2 Issue-ID: OOM-2615 Signed-off-by: Bartek Grzybowski --- diff --git a/build/docker-entrypoint.sh b/build/docker-entrypoint.sh index 965037e0..b597dab4 100755 --- a/build/docker-entrypoint.sh +++ b/build/docker-entrypoint.sh @@ -107,6 +107,9 @@ then PCKG_LIST_DIR="/tmp/additional-lists/" fi +# Clean target repo dir for idempotency +rm -rf ${OFFLINE_REPO_DIR}/* + case "$distro_type" in ubuntu) # Change current working dir