| Submitter | Robert Yang |
|---|---|
| Date | May 14, 2012, 8:11 a.m. |
| Message ID | <b82a9a6f0dd12135e53eedc75b0833ce7dfb3eab.1336983006.git.liezhi.yang@windriver.com> |
| Download | mbox | patch |
| Permalink | /patch/27555/ |
| State | Accepted |
| Commit | c30e79510c06701f10f659eedaa0fe785538ac17 |
| Headers | show |
Comments
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
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 >
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
Patch
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} }
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(-)