summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta/classes/image.bbclass6
-rw-r--r--meta/classes/rootfs_rpm.bbclass6
2 files changed, 11 insertions, 1 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}
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 9039b21a07..fbc46c056a 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -154,7 +154,11 @@ EOF
}
remove_packaging_data_files() {
- rm -rf ${IMAGE_ROOTFS}${rpmlibdir}
+ # Save the rpmlib for increment rpm image generation
+ t="${T}/saved_rpmlib/var/lib"
+ rm -fr $t
+ mkdir -p $t
+ mv ${IMAGE_ROOTFS}${rpmlibdir} $t
rm -rf ${IMAGE_ROOTFS}${opkglibdir}
}