From 650ec4de02685d860ee134eae3f595a2fe4b210b Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Fri, 15 May 2020 20:38:55 +0800 Subject: [PATCH] stx-anaconda-image.bbclass: add error handling when copy pkgs Add error handling when copy pkgs avoid do_rootfs failure if there is any changes in the pkglist. Issue-ID: INF-118 Signed-off-by: Jackie Huang Change-Id: I5242b02ffae096726732e9a3ed9d0cbefbcba945 --- meta-stx/classes/stx-anaconda-image.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/meta-stx/classes/stx-anaconda-image.bbclass b/meta-stx/classes/stx-anaconda-image.bbclass index c89dc9f..bab06f2 100644 --- a/meta-stx/classes/stx-anaconda-image.bbclass +++ b/meta-stx/classes/stx-anaconda-image.bbclass @@ -100,7 +100,12 @@ wrl_installer_copy_local_repos() { cd ${deploy_dir_rpm} for pkg in `cat ${REPO_INCLUDE_PKG}`; do - cp --parents -vf */${pkg}.rpm ${IMAGE_ROOTFS}/Packages.$prj_name/ + pkg_file=$(find . -type f -name ${pkg}.rpm) + if [ -z "${pkg_file}" ]; then + bbwarn "Package ${pkg}.rpm not found, please check if there is anything wrong or just remove it from the list." + else + cp --parents -vf ${pkg_file} ${IMAGE_ROOTFS}/Packages.$prj_name/ + fi done cd - -- 2.16.6