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 <guilherme.dossantosschons@windriver.com>
This commit is contained in:
Guilherme Schons 2023-08-03 14:51:03 -03:00
parent 005544b651
commit bf5162bc20

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# Copyright (c) 2015-2022 Wind River Systems, Inc. # Copyright (c) 2015-2023 Wind River Systems, Inc.
# #
# SPDX-License-Identifier: Apache-2.0 # 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}" \ find /var/pxeboot/pxelinux.cfg.files -type f ! -name "*${VERSION}" \
-exec cp -p {} ${CURRENT_FEED_DIR}/pxeboot/pxelinux.cfg.files/ \; -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' echo 'import has completed'