Clean target repository dir prior to downloading packages 90/114390/2
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>
Thu, 29 Oct 2020 13:03:50 +0000 (14:03 +0100)
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>
Fri, 30 Oct 2020 08:28:00 +0000 (08:28 +0000)
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 <b.grzybowski@partner.samsung.com>
build/docker-entrypoint.sh

index 965037e..b597dab 100755 (executable)
@@ -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