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 <david.sullivan@windriver.com>
Change-Id: I1299619ffb37f6dbaef0a6df34f73397ef528508
This commit is contained in:
David Sullivan 2021-07-28 09:41:26 -05:00
parent 37e68c0d54
commit a79efa7442
1 changed files with 3 additions and 1 deletions

View File

@ -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}/ &&