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 <bin.qian@windriver.com>
Change-Id: I6cb330e7665bc170bf8206342643cfdefcb95ed1
This commit is contained in:
Bin Qian 2023-04-03 16:04:28 +00:00
parent 8003735fb3
commit 4ec6fb2ffe
1 changed files with 7 additions and 0 deletions

View File

@ -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