* [for-denzil] [PATCH 1/2] package_rpm.bbclass: Fix incremental rpm image generation
2012-11-13 12:56 [for-denzil] [PATCH 0/2] Fix incremental rpm image generation Robert Yang
@ 2012-11-13 12:56 ` Robert Yang
2012-11-13 12:56 ` [for-denzil] [PATCH 2/2] rootfs_rpm.bbclass: save rpmlib rather than remove it Robert Yang
2012-11-30 2:57 ` [for-denzil] [PATCH 0/2] Fix incremental rpm image generation Scott Garman
2 siblings, 0 replies; 4+ messages in thread
From: Robert Yang @ 2012-11-13 12:56 UTC (permalink / raw)
To: openembedded-core; +Cc: Zhenfeng.Zhao, scott.a.garman
Fix the incremental rpm image generation, it didn't work since the code
has been changed.
The btmanifest should have a ".manifest" suffix, so that it can be moved
to ${T} by rootfs_rpm.bbclass:
mv ${IMAGE_ROOTFS}/install/*.manifest ${T}/
Note: The locale pkgs would always be re-installed.
[YOCTO #2690]
(From OE-Core rev: 5149630746626c6d416f26ab9dd1c7213fcd8c50)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/package_rpm.bbclass | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index ffe3b31..e2bec2d 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -168,28 +168,24 @@ rpm_common_comand () {
rpm_update_pkg () {
manifest=$1
- btmanifest=$manifest.bt
+ btmanifest=$manifest.bt.manifest
+ pre_btmanifest=${T}/${btmanifest##/*/}
local target_rootfs="${INSTALL_ROOTFS_RPM}"
# Save the rpm's build time for incremental image generation, and the file
# would be moved to ${T}
- rm -f $btmanifest
for i in `cat $manifest`; do
# Use "rpm" rather than "${RPM}" here, since we don't need the
# '--dbpath' option
- echo "$i `rpm -qp --qf '%{BUILDTIME}\n' $i`" >> $btmanifest
- done
+ echo "$i `rpm -qp --qf '%{BUILDTIME}\n' $i`"
+ done | sort -u > $btmanifest
# Only install the different pkgs if incremental image generation is set
- if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f ${T}/total_solution_bt.manifest -a \
+ if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f "$pre_btmanifest" -a \
"${IMAGE_PKGTYPE}" = "rpm" ]; then
- cur_list="$btmanifest"
- pre_list="${T}/total_solution_bt.manifest"
- sort -u $cur_list -o $cur_list
- sort -u $pre_list -o $pre_list
- comm -1 -3 $cur_list $pre_list | sed 's#.*/\(.*\)\.rpm .*#\1#' > \
+ comm -1 -3 $btmanifest $pre_btmanifest | sed 's#.*/\(.*\)\.rpm .*#\1#' > \
${target_rootfs}/install/remove.manifest
- comm -2 -3 $cur_list $pre_list | awk '{print $1}' > \
+ comm -2 -3 $btmanifest $pre_btmanifest | awk '{print $1}' > \
${target_rootfs}/install/incremental.manifest
# Attempt to remove unwanted pkgs, the scripts(pre, post, etc.) has not
@@ -472,7 +468,7 @@ EOF
# probably a feature. The only way to convince rpm to actually run the preinstall scripts
# for base-passwd and shadow first before installing packages that depend on these packages
# is to do two image installs, installing one set of packages, then the other.
- if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f ${T}/total_solution_bt.manifest ]; then
+ if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f "$pre_btmanifest" ]; then
echo "Skipping pre install due to exisitng image"
else
echo "# Initial Install manifest" > ${target_rootfs}/install/initial_install.manifest
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [for-denzil] [PATCH 2/2] rootfs_rpm.bbclass: save rpmlib rather than remove it
2012-11-13 12:56 [for-denzil] [PATCH 0/2] Fix incremental rpm image generation Robert Yang
2012-11-13 12:56 ` [for-denzil] [PATCH 1/2] package_rpm.bbclass: " Robert Yang
@ 2012-11-13 12:56 ` Robert Yang
2012-11-30 2:57 ` [for-denzil] [PATCH 0/2] Fix incremental rpm image generation Scott Garman
2 siblings, 0 replies; 4+ messages in thread
From: Robert Yang @ 2012-11-13 12:56 UTC (permalink / raw)
To: openembedded-core; +Cc: Zhenfeng.Zhao, scott.a.garman
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 #2690]
(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>
---
meta/classes/image.bbclass | 6 ++++++
meta/classes/rootfs_rpm.bbclass | 6 +++++-
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 9557433..90a6a9d 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 9039b21..fbc46c0 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}
}
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [for-denzil] [PATCH 0/2] Fix incremental rpm image generation
2012-11-13 12:56 [for-denzil] [PATCH 0/2] Fix incremental rpm image generation Robert Yang
2012-11-13 12:56 ` [for-denzil] [PATCH 1/2] package_rpm.bbclass: " Robert Yang
2012-11-13 12:56 ` [for-denzil] [PATCH 2/2] rootfs_rpm.bbclass: save rpmlib rather than remove it Robert Yang
@ 2012-11-30 2:57 ` Scott Garman
2 siblings, 0 replies; 4+ messages in thread
From: Scott Garman @ 2012-11-30 2:57 UTC (permalink / raw)
To: Robert Yang; +Cc: Zhenfeng.Zhao, openembedded-core
On 11/13/2012 04:56 AM, Robert Yang wrote:
> Port the patches from the master branch to denzil, and have tested on
> our local autobuilder. They are already on danny.
>
> // Robert
>
> The following changes since commit 846b7c388738f382e83576e77b705aa547c1dd9b:
>
> bitbake: lib/bb/siggen.py: log when tainting the signature of a task (2012-10-12 08:58:48 +0100)
>
> are available in the git repository at:
> git://git.pokylinux.org/poky-contrib robert/denzil_rpm
> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/denzil_rpm
>
> Robert Yang (2):
> package_rpm.bbclass: Fix incremental rpm image generation
> rootfs_rpm.bbclass: save rpmlib rather than remove it
>
> meta/classes/image.bbclass | 6 ++++++
> meta/classes/package_rpm.bbclass | 20 ++++++++------------
> meta/classes/rootfs_rpm.bbclass | 6 +++++-
> 3 files changed, 19 insertions(+), 13 deletions(-)
Pulled into sgarman/denzil-next.
Thanks,
Scott
--
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 4+ messages in thread