From 83f5487c27db3df76ee9e235709a2eb3f4dfda80 Mon Sep 17 00:00:00 2001 From: David Sullivan Date: Mon, 20 Dec 2021 09:03:07 -0600 Subject: [PATCH] Correct package selection during upgrade-start-pkg-extract During upgrade-start we call upgrade-start-pkg-extract to extract the kickstarts and pxeboot data from the N+1 load. This data is used to boot controller-1 in duplex environments. As these packages can be patched we need to select the latest version of the package. Currently the dnf repoquery call returns every version of the rpm queried. This results in the base version being used during the package extraction. This commit updates the command to use --latest-limit=1. The command is also updated to use --disablerepo=*. This will result in the command being restricted to the specified N+1 repos. Without the disablerepo option the N repo packages are included in the results. This brings the call in line with the behavior of utilities/utilities/platform-util/scripts/gen-bootloader-iso.sh Testing: AIO-DX upgrade with patched kickstart package Closes-Bug: 1955410 Change-Id: Ia1cd778791b64133667327031305d0f1914aed2d Signed-off-by: David Sullivan --- cgcs-patch/bin/upgrade-start-pkg-extract | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cgcs-patch/bin/upgrade-start-pkg-extract b/cgcs-patch/bin/upgrade-start-pkg-extract index 1ab56559..3fe4c7fd 100644 --- a/cgcs-patch/bin/upgrade-start-pkg-extract +++ b/cgcs-patch/bin/upgrade-start-pkg-extract @@ -82,7 +82,7 @@ function extract_pkg() { cd $WORKDIR # Find the RPM - local pkgfile=$(dnf repoquery --repofrompath base,${TGT_BASE_REPO} ${TGT_PATCHES_REPO_OPT} --location -q ${pkgname}) + local pkgfile=$(dnf repoquery --disablerepo=* --repofrompath base,${TGT_BASE_REPO} ${TGT_PATCHES_REPO_OPT} --latest-limit=1 --location -q ${pkgname}) if [ -z "${pkgfile}" ]; then logger -t $0 "Could not find ${pkgname}" exit 1