* [PATCH 0/2] V2 Fix incremental rpm image generation
@ 2012-05-14 8:11 Robert Yang
2012-05-14 8:11 ` [PATCH 1/2] package_rpm.bbclass: " Robert Yang
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Robert Yang @ 2012-05-14 8:11 UTC (permalink / raw)
To: openembedded-core; +Cc: Zhenfeng.Zhao
Changes of V2:
* Save rpmlib for core-image-minimal rather than remove it
// Robert
The following changes since commit 12b4543ac9f54c0db0ee4a7ee546a71946a051f8:
classes/rootfs_*: fix splitting package dependency strings (2012-05-13 20:09:56 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/inc_rpm
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/inc_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(-)
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/2] package_rpm.bbclass: Fix incremental rpm image generation 2012-05-14 8:11 [PATCH 0/2] V2 Fix incremental rpm image generation Robert Yang @ 2012-05-14 8:11 ` Robert Yang 2012-05-14 8:11 ` [PATCH 2/2] rootfs_rpm.bbclass: save rpmlib rather than remove it Robert Yang 2012-05-24 17:48 ` [PATCH 0/2] V2 Fix incremental rpm image generation Saul Wold 2 siblings, 0 replies; 7+ messages in thread From: Robert Yang @ 2012-05-14 8:11 UTC (permalink / raw) To: openembedded-core; +Cc: Zhenfeng.Zhao 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 #2440] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> --- 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 2da7a8b..daa9db4 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -158,28 +158,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 @@ -462,7 +458,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] 7+ messages in thread
* [PATCH 2/2] rootfs_rpm.bbclass: save rpmlib rather than remove it 2012-05-14 8:11 [PATCH 0/2] V2 Fix incremental rpm image generation Robert Yang 2012-05-14 8:11 ` [PATCH 1/2] package_rpm.bbclass: " Robert Yang @ 2012-05-14 8:11 ` Robert Yang 2012-05-14 9:44 ` Koen Kooi 2012-05-24 17:48 ` [PATCH 0/2] V2 Fix incremental rpm image generation Saul Wold 2 siblings, 1 reply; 7+ messages in thread From: Robert Yang @ 2012-05-14 8:11 UTC (permalink / raw) To: openembedded-core; +Cc: Zhenfeng.Zhao The rpmlib was removed when core-image-minimal, 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> --- 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 4610731..b5fca32 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -142,6 +142,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] 7+ messages in thread
* Re: [PATCH 2/2] rootfs_rpm.bbclass: save rpmlib rather than remove it 2012-05-14 8:11 ` [PATCH 2/2] rootfs_rpm.bbclass: save rpmlib rather than remove it Robert Yang @ 2012-05-14 9:44 ` Koen Kooi 2012-05-15 1:20 ` Robert Yang 0 siblings, 1 reply; 7+ messages in thread From: Koen Kooi @ 2012-05-14 9:44 UTC (permalink / raw) To: Patches and discussions about the oe-core layer; +Cc: Zhenfeng.Zhao Op 14 mei 2012, om 10:11 heeft Robert Yang het volgende geschreven: > The rpmlib was removed when core-image-minimal, Please replace 'core-image-minimal' with something like: images that add "remove_packaging_data_files ; " to ROOTFS_POSTPROCESS_COMMAND That points out the actual problem instead of having to guess what core-image-minimal is doing 'wrong' to need this patch. > 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> > --- > 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 4610731..b5fca32 100644 > --- a/meta/classes/image.bbclass > +++ b/meta/classes/image.bbclass > @@ -142,6 +142,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 > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] rootfs_rpm.bbclass: save rpmlib rather than remove it 2012-05-14 9:44 ` Koen Kooi @ 2012-05-15 1:20 ` Robert Yang 2012-06-11 17:37 ` Flanagan, Elizabeth 0 siblings, 1 reply; 7+ messages in thread From: Robert Yang @ 2012-05-15 1:20 UTC (permalink / raw) To: Patches and discussions about the oe-core layer, Koen Kooi; +Cc: Zhenfeng.Zhao On 05/14/2012 05:44 PM, Koen Kooi wrote: > Op 14 mei 2012, om 10:11 heeft Robert Yang het volgende geschreven: > >> The rpmlib was removed when core-image-minimal, > > Please replace 'core-image-minimal' with something like: > > images that add "remove_packaging_data_files ; " to ROOTFS_POSTPROCESS_COMMAND > > That points out the actual problem instead of having to guess what core-image-minimal is doing 'wrong' to need this patch. > Thanks, I've updated the commit message and pushed to: git://git.pokylinux.org/poky-contrib robert/inc_rpm http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/inc_rpm The current message is: 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. // Robert > >> 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> >> --- >> 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 4610731..b5fca32 100644 >> --- a/meta/classes/image.bbclass >> +++ b/meta/classes/image.bbclass >> @@ -142,6 +142,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 >> >> >> _______________________________________________ >> Openembedded-core mailing list >> Openembedded-core@lists.openembedded.org >> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] rootfs_rpm.bbclass: save rpmlib rather than remove it 2012-05-15 1:20 ` Robert Yang @ 2012-06-11 17:37 ` Flanagan, Elizabeth 0 siblings, 0 replies; 7+ messages in thread From: Flanagan, Elizabeth @ 2012-06-11 17:37 UTC (permalink / raw) To: Patches and discussions about the oe-core layer; +Cc: Koen Kooi, Zhenfeng.Zhao On Mon, May 14, 2012 at 6:20 PM, Robert Yang <liezhi.yang@windriver.com> wrote: > > > On 05/14/2012 05:44 PM, Koen Kooi wrote: >> >> Op 14 mei 2012, om 10:11 heeft Robert Yang het volgende geschreven: >> >>> The rpmlib was removed when core-image-minimal, >> >> >> Please replace 'core-image-minimal' with something like: >> >> images that add "remove_packaging_data_files ; " to >> ROOTFS_POSTPROCESS_COMMAND >> >> That points out the actual problem instead of having to guess what >> core-image-minimal is doing 'wrong' to need this patch. >> > > Thanks, I've updated the commit message and pushed to: > > git://git.pokylinux.org/poky-contrib robert/inc_rpm > http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/inc_rpm > > The current message is: > > 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. > > // Robert > Merged into OE-Core Thanks -b > >> >>> 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> >>> --- >>> 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 4610731..b5fca32 100644 >>> --- a/meta/classes/image.bbclass >>> +++ b/meta/classes/image.bbclass >>> @@ -142,6 +142,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 >>> >>> >>> _______________________________________________ >>> Openembedded-core mailing list >>> Openembedded-core@lists.openembedded.org >>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core >> >> >> >> _______________________________________________ >> Openembedded-core mailing list >> Openembedded-core@lists.openembedded.org >> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core >> > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core -- Elizabeth Flanagan Yocto Project Build and Release ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/2] V2 Fix incremental rpm image generation 2012-05-14 8:11 [PATCH 0/2] V2 Fix incremental rpm image generation Robert Yang 2012-05-14 8:11 ` [PATCH 1/2] package_rpm.bbclass: " Robert Yang 2012-05-14 8:11 ` [PATCH 2/2] rootfs_rpm.bbclass: save rpmlib rather than remove it Robert Yang @ 2012-05-24 17:48 ` Saul Wold 2 siblings, 0 replies; 7+ messages in thread From: Saul Wold @ 2012-05-24 17:48 UTC (permalink / raw) To: Patches and discussions about the oe-core layer; +Cc: Zhenfeng.Zhao On 05/14/2012 01:11 AM, Robert Yang wrote: > Changes of V2: > * Save rpmlib for core-image-minimal rather than remove it > > // Robert > > The following changes since commit 12b4543ac9f54c0db0ee4a7ee546a71946a051f8: > > classes/rootfs_*: fix splitting package dependency strings (2012-05-13 20:09:56 +0100) > > are available in the git repository at: > git://git.pokylinux.org/poky-contrib robert/inc_rpm > http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/inc_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(-) > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core > Merged into OE-Core Thanks Sau! ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-06-11 17:48 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-05-14 8:11 [PATCH 0/2] V2 Fix incremental rpm image generation Robert Yang 2012-05-14 8:11 ` [PATCH 1/2] package_rpm.bbclass: " Robert Yang 2012-05-14 8:11 ` [PATCH 2/2] rootfs_rpm.bbclass: save rpmlib rather than remove it Robert Yang 2012-05-14 9:44 ` Koen Kooi 2012-05-15 1:20 ` Robert Yang 2012-06-11 17:37 ` Flanagan, Elizabeth 2012-05-24 17:48 ` [PATCH 0/2] V2 Fix incremental rpm image generation Saul Wold
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox