From a79efa7442e8c7ef4ba3ef57c2cf353c431e3ca8 Mon Sep 17 00:00:00 2001 From: David Sullivan Date: Wed, 28 Jul 2021 09:41:26 -0500 Subject: [PATCH] Clear dnf cache before extracting packages during upgrade-start If a second load is imported with different pxe-network-installer/platform-kickstarts packages, the upgrade-start-pkg-extract script will fail preventing the upgrade-start command from completing. To address this we clean the dnf cache in the upgrade-start-pkg-extract script. Closes-Bug: 1938304 Signed-off-by: David Sullivan Change-Id: I1299619ffb37f6dbaef0a6df34f73397ef528508 --- cgcs-patch/bin/upgrade-start-pkg-extract | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cgcs-patch/bin/upgrade-start-pkg-extract b/cgcs-patch/bin/upgrade-start-pkg-extract index 2c5edba6..add71afb 100644 --- a/cgcs-patch/bin/upgrade-start-pkg-extract +++ b/cgcs-patch/bin/upgrade-start-pkg-extract @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2018 Wind River Systems, Inc. +# Copyright (c) 2018-2021 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -106,6 +106,8 @@ if [ -z "${WORKDIR}" -o ! -d "${WORKDIR}" ]; then logger -t $0 "Failed to create workdir" exit 1 fi +# Clean dnf cache in case a previous load had different package versions +dnf clean expire-cache extract_pkg pxe-network-installer rsync -ac ${WORKDIR}/usr/ /usr/ && rsync -ac ${WORKDIR}/pxeboot/rel-${TGT_RELEASE}/ /pxeboot/rel-${TGT_RELEASE}/ &&