From patchwork Tue Sep 25 13:38:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/2] package_rpm.bbclass: no initial_solution in the second build Date: Tue, 25 Sep 2012 13:38:37 -0000 From: Robert Yang X-Patchwork-Id: 37195 Message-Id: To: Cc: Zhenfeng.Zhao@windriver.com There is no initial_solution.manifest in the second build when incremental rpm image generation, since the initial solution has been skipped. So we should check it before cat it. [YOCTO #3128] Signed-off-by: Robert Yang --- meta/classes/package_rpm.bbclass | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index be6bd45..49055f2 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -317,10 +317,13 @@ package_install_internal_rpm () { # we should add the previous solution manifest to the full "original" set to # avoid duplicate install steps. echo "Update original solution..." - cat ${target_rootfs}/install/initial_solution.manifest >> ${target_rootfs}/install/original_solution.manifest - cat ${target_rootfs}/install/total_solution.manifest >> ${target_rootfs}/install/original_solution.manifest - rm ${target_rootfs}/install/initial_solution.manifest - rm ${target_rootfs}/install/total_solution.manifest + for m in ${target_rootfs}/install/initial_solution.manifest \ + ${target_rootfs}/install/total_solution.manifest; do + if [ -s $m ]; then + cat $m >> ${target_rootfs}/install/original_solution.manifest + rm -f $m + fi + done fi # Setup manifest of packages to install...