Update package extraction from CentOS for Debian

Details: For feature parity, the upgrade-start-pkg-extract has
to be updated to support upgrading to Debian 22.12 and
CentOS 22.12.

Preview change in this CR
https://review.opendev.org/c/starlingx/update/+/850906
only runs on Debian to Debian upgrade.

This change will allow the package extraction running
on CentOS to Debian upgrade.

Test Plan:

PASS: manually tested the script on Debian
PASS: manually tested the script on CentOS

Task: 46269
Story: 2009303

Signed-off-by: Junfeng (Shawn) Li <junfeng.li@windriver.com>
Change-Id: I05f9e631b0bbddcad3e9ea21000ff7f283b2f097
This commit is contained in:
Junfeng (Shawn) Li 2022-09-12 16:10:28 -04:00
parent dd6bc2242c
commit 45241499b4
2 changed files with 17 additions and 1 deletions

View File

@ -60,6 +60,22 @@ if [ ! -d ${TGT_BASE_REPO} ]; then
exit 1
fi
# Copy files to destination folders on Debian
if [ -d "${TGT_BASE_REPO}/ostree_repo/" ]; then
rsync -ac ${TGT_BASE_REPO}/kickstart/kickstart.cfg ${TGT_BASE_REPO}/ &&
rsync -ac ${TGT_BASE_REPO}/pxeboot/bzImage* /var/pxeboot/rel-${TGT_RELEASE}/ &&
rsync -ac ${TGT_BASE_REPO}/pxeboot/initrd* /var/pxeboot/rel-${TGT_RELEASE}/ &&
rsync -ac ${TGT_BASE_REPO}/pxeboot/pxelinux.cfg.files/*-${TGT_RELEASE} /var/pxeboot/pxelinux.cfg.files/
rsync -ac ${TGT_BASE_REPO}/upgrades/pxeboot-update-${TGT_RELEASE}.sh /usr/sbin/
if [ $? -ne 0 ]; then
logger -t $0 "rsync command failed on Debian extracting"
exit 1
fi
exit 0
fi
# The code below is only used on CentOS and will be removed when CentOS is no longer supported.
declare TGT_PATCHES_REPO_OPT=""
if [ -d ${TGT_PATCHES_REPO} ]; then
TGT_PATCHES_REPO_OPT="--repofrompath updates,${TGT_PATCHES_REPO}"

View File

@ -75,7 +75,7 @@ if [ -d "${TGT_BASE_REPO}/ostree_repo/" ]; then
exit 0
fi
# The code below is only used on CenOS and will be removed when CenOS is no longer supported.
# The code below is only used on CentOS and will be removed when CentOS is no longer supported.
declare TGT_PATCHES_REPO_OPT=""
if [ -d ${TGT_PATCHES_REPO} ]; then
TGT_PATCHES_REPO_OPT="--repofrompath updates,${TGT_PATCHES_REPO}"