From 4ec6fb2ffe905c83963c718b8ee261dc156cd84d Mon Sep 17 00:00:00 2001 From: Bin Qian Date: Mon, 3 Apr 2023 16:04:28 +0000 Subject: [PATCH] Copy patch metadata so to display patch info This is to copy patch metadata to patch metadata and feed directory to properly setup patch info for N+1 release in load-import. TCs: Passed: Import pre-patched load to verify the patch info is visible with sw-patch query command before upgrade. Passed: Patch info is visible on controller-1 after it is upgraded. Passed: Patch info is visible on controller-0 after it is upgraded. Closes-Bug: 2015110 Signed-off-by: Bin Qian Change-Id: I6cb330e7665bc170bf8206342643cfdefcb95ed1 --- bsp-files/upgrades/import.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bsp-files/upgrades/import.sh b/bsp-files/upgrades/import.sh index 488cc9e9..74e3110a 100644 --- a/bsp-files/upgrades/import.sh +++ b/bsp-files/upgrades/import.sh @@ -75,6 +75,13 @@ if [ -d ${ISO_DIR}/ostree_repo ]; then echo "Copy efi.img to ${FEED_DIR}" cp ${ISO_DIR}/efi.img ${FEED_DIR}/ # for upgrade from 22.06 to Debian 22.12, patch during upgrade is not supported + # only copy the patch meta is enough + if [ -d ${ISO_DIR}/patches ]; then + rsync -ac ${ISO_DIR}/patches/ /opt/patching/metadata/committed/ + # copy patch metadata to feed, so to be picked up by kickstart to copy to release N+1 + mkdir ${FEED_DIR}/patches -p + cp -a ${ISO_DIR}/patches/* ${FEED_DIR}/patches/ + fi else # this is a Centos iso trap cleanup 0