summaryrefslogtreecommitdiffstats
path: root/meta/classes
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:43:23 +0100
commitea2a85035a6667f29ae65558e6c3ae629d9f4530 (patch)
tree5e599e56daafbd76cfb18b209176868945118203 /meta/classes
parent1e71397c23c90fc74f76db4d6e34917f4d58af0f (diff)
downloadpoky-ea2a85035a6667f29ae65558e6c3ae629d9f4530.tar.gz
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] (From OE-Core rev: c30e79510c06701f10f659eedaa0fe785538ac17) 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')
-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 () {
143 # When use the rpm incremental image generation, don't remove the rootfs 143 # When use the rpm incremental image generation, don't remove the rootfs
144 if [ "${INC_RPM_IMAGE_GEN}" != "1" -o "${IMAGE_PKGTYPE}" != "rpm" ]; then 144 if [ "${INC_RPM_IMAGE_GEN}" != "1" -o "${IMAGE_PKGTYPE}" != "rpm" ]; then
145 rm -rf ${IMAGE_ROOTFS} 145 rm -rf ${IMAGE_ROOTFS}
146 elif [ -d ${T}/saved_rpmlib/var/lib/rpm ]; then
147 # Move the rpmlib back
148 if [ ! -d ${IMAGE_ROOTFS}/var/lib/rpm ]; then
149 mkdir -p ${IMAGE_ROOTFS}/var/lib/
150 mv ${T}/saved_rpmlib/var/lib/rpm ${IMAGE_ROOTFS}/var/lib/
151 fi
146 fi 152 fi
147 rm -rf ${MULTILIB_TEMP_ROOTFS} 153 rm -rf ${MULTILIB_TEMP_ROOTFS}
148 mkdir -p ${IMAGE_ROOTFS} 154 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
154} 154}
155 155
156remove_packaging_data_files() { 156remove_packaging_data_files() {
157 rm -rf ${IMAGE_ROOTFS}${rpmlibdir} 157 # Save the rpmlib for increment rpm image generation
158 t="${T}/saved_rpmlib/var/lib"
159 rm -fr $t
160 mkdir -p $t
161 mv ${IMAGE_ROOTFS}${rpmlibdir} $t
158 rm -rf ${IMAGE_ROOTFS}${opkglibdir} 162 rm -rf ${IMAGE_ROOTFS}${opkglibdir}
159} 163}
160 164