From bf5162bc200411cc214e40e870e3ec441c3a9cc2 Mon Sep 17 00:00:00 2001 From: Guilherme Schons Date: Thu, 3 Aug 2023 14:51:03 -0300 Subject: [PATCH] Add patch extract from load This commit adds extracting the patches files (metadata) from the load being imported. Test Plan: Passed: load from previous version imported as inactive Passed: load from new version imported Story: 2010611 Task: 48546 Change-Id: I12a2c9f62523f6b08294f2538ad77b5c8338a751 Signed-off-by: Guilherme Schons --- bsp-files/upgrades/import.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bsp-files/upgrades/import.sh b/bsp-files/upgrades/import.sh index 4939102b..2fbaf36d 100644 --- a/bsp-files/upgrades/import.sh +++ b/bsp-files/upgrades/import.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2015-2022 Wind River Systems, Inc. +# Copyright (c) 2015-2023 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -90,4 +90,11 @@ mkdir -p ${CURRENT_FEED_DIR}/pxeboot/pxelinux.cfg.files/ find /var/pxeboot/pxelinux.cfg.files -type f ! -name "*${VERSION}" \ -exec cp -p {} ${CURRENT_FEED_DIR}/pxeboot/pxelinux.cfg.files/ \; +if [ -d ${ISO_DIR}/patches ]; then + rsync --mkpath -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 ${CURRENT_FEED_DIR}/patches -p + cp -a ${ISO_DIR}/patches/* ${CURRENT_FEED_DIR}/patches/ +fi + echo 'import has completed'