summaryrefslogtreecommitdiff
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2012-06-07 16:37:10 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-08 11:39:34 +0100
commitc30e79510c06701f10f659eedaa0fe785538ac17 (patch)
tree20c500a53588782864c8d5a145a684e61f882c36 /meta/classes/image.bbclass
parentfae7fc49052720f037bac128084851c09d420381 (diff)
downloadopenembedded-core-c30e79510c06701f10f659eedaa0fe785538ac17.tar.gz
openembedded-core-c30e79510c06701f10f659eedaa0fe785538ac17.tar.bz2
openembedded-core-c30e79510c06701f10f659eedaa0fe785538ac17.zip
rootfs_rpm.bbclass: save rpmlib rather than remove it
The rpmlib was removed when images that add "remove_packaging_data_files" to ROOTFS_POSTPROCESS_COMMAND, which would make the increment rpm image generation doesn't work in the second build, since list_installed_packages would get incorrect value in the second build, move the rpmlib to ${T} rather than remove it, and move it back when INC_RPM_IMAGE_GEN =1. [YOCTO #2440] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r--meta/classes/image.bbclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 573c90539c..fb932b9d66 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -143,6 +143,12 @@ fakeroot do_rootfs () {
# When use the rpm incremental image generation, don't remove the rootfs
if [ "${INC_RPM_IMAGE_GEN}" != "1" -o "${IMAGE_PKGTYPE}" != "rpm" ]; then
rm -rf ${IMAGE_ROOTFS}
+ elif [ -d ${T}/saved_rpmlib/var/lib/rpm ]; then
+ # Move the rpmlib back
+ if [ ! -d ${IMAGE_ROOTFS}/var/lib/rpm ]; then
+ mkdir -p ${IMAGE_ROOTFS}/var/lib/
+ mv ${T}/saved_rpmlib/var/lib/rpm ${IMAGE_ROOTFS}/var/lib/
+ fi
fi
rm -rf ${MULTILIB_TEMP_ROOTFS}
mkdir -p ${IMAGE_ROOTFS}