| Submitter | Laurentiu Palcu |
|---|---|
| Date | Dec. 4, 2012, 1:59 p.m. |
| Message ID | <02baf1072c98ba7c93c92bda589a1500ebbadba6.1354626535.git.laurentiu.palcu@intel.com> |
| Download | mbox | patch |
| Permalink | /patch/40271/ |
| State | New |
| Headers | show |
Comments
On Tue, Dec 4, 2012 at 11:59 AM, Laurentiu Palcu <laurentiu.palcu@intel.com>wrote: > In order for the postinst scriptlets to be able to run once we need to > export the location of the intercept scripts and also the location of > native sysrootfs. The gdk-pixbuf binaries will need the latter because > in order to generate the loaders.cache it will need to scan some shared > libraries that must be native. Even though the output is a text file. > > Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> > --- > meta/classes/package_rpm.bbclass | 2 ++ > meta/classes/rootfs_deb.bbclass | 2 ++ > meta/classes/rootfs_ipk.bbclass | 2 ++ > 3 files changed, 6 insertions(+) > > diff --git a/meta/classes/package_rpm.bbclass > b/meta/classes/package_rpm.bbclass > index 1ff92ce..c7ac07a 100644 > --- a/meta/classes/package_rpm.bbclass > +++ b/meta/classes/package_rpm.bbclass > @@ -475,6 +475,8 @@ export D="${target_rootfs}" > export OFFLINE_ROOT="\$D" > export IPKG_OFFLINE_ROOT="\$D" > export OPKG_OFFLINE_ROOT="\$D" > +export INTERCEPT_DIR="${WORKDIR}/intercept_scripts" > +export NATIVE_ROOT=${STAGING_DIR_NATIVE} > The NATIVE_ROOT seems a duplication, I'd prefer you to use STAGING_DIR_NATIVE in code as this is a known variable name and makes it easy to understand. > \$2 \$1/\$3 \$4 > if [ \$? -ne 0 ]; then > diff --git a/meta/classes/rootfs_deb.bbclass > b/meta/classes/rootfs_deb.bbclass > index 881fdbd..955382f 100644 > --- a/meta/classes/rootfs_deb.bbclass > +++ b/meta/classes/rootfs_deb.bbclass > @@ -48,6 +48,8 @@ fakeroot rootfs_deb_do_rootfs () { > export OFFLINE_ROOT=${IMAGE_ROOTFS} > export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS} > export OPKG_OFFLINE_ROOT=${IMAGE_ROOTFS} > + export INTERCEPT_DIR=${WORKDIR}/intercept_scripts > + export NATIVE_ROOT=${STAGING_DIR_NATIVE} > > # Attempt to run preinsts > # Mark packages with preinst failures as unpacked > diff --git a/meta/classes/rootfs_ipk.bbclass > b/meta/classes/rootfs_ipk.bbclass > index fc69b7e..8766d24 100644 > --- a/meta/classes/rootfs_ipk.bbclass > +++ b/meta/classes/rootfs_ipk.bbclass > @@ -69,6 +69,8 @@ fakeroot rootfs_ipk_do_rootfs () { > export OFFLINE_ROOT=${IMAGE_ROOTFS} > export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS} > export OPKG_OFFLINE_ROOT=${IPKG_OFFLINE_ROOT} > + export INTERCEPT_DIR=${WORKDIR}/intercept_scripts > + export NATIVE_ROOT=${STAGING_DIR_NATIVE} > > package_install_internal_ipk > > -- > 1.7.9.5 > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core >
On Tue, 2012-12-04 at 13:07 -0200, Otavio Salvador wrote: > > > > On Tue, Dec 4, 2012 at 11:59 AM, Laurentiu Palcu > <laurentiu.palcu@intel.com> wrote: > In order for the postinst scriptlets to be able to run once we > need to > export the location of the intercept scripts and also the > location of > native sysrootfs. The gdk-pixbuf binaries will need the latter > because > in order to generate the loaders.cache it will need to scan > some shared > libraries that must be native. Even though the output is a > text file. > > Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> > --- > meta/classes/package_rpm.bbclass | 2 ++ > meta/classes/rootfs_deb.bbclass | 2 ++ > meta/classes/rootfs_ipk.bbclass | 2 ++ > 3 files changed, 6 insertions(+) > > diff --git a/meta/classes/package_rpm.bbclass > b/meta/classes/package_rpm.bbclass > index 1ff92ce..c7ac07a 100644 > --- a/meta/classes/package_rpm.bbclass > +++ b/meta/classes/package_rpm.bbclass > @@ -475,6 +475,8 @@ export D="${target_rootfs}" > export OFFLINE_ROOT="\$D" > export IPKG_OFFLINE_ROOT="\$D" > export OPKG_OFFLINE_ROOT="\$D" > +export INTERCEPT_DIR="${WORKDIR}/intercept_scripts" > +export NATIVE_ROOT=${STAGING_DIR_NATIVE} > > > The NATIVE_ROOT seems a duplication, I'd prefer you to use > STAGING_DIR_NATIVE in code as this is a known variable name and makes > it easy to understand. I'm going to disagree on that, I think this does make sense in the context of the functions we're changing here. On the other hand I'd love to simplify the whole *OFFLINE_ROOT mess but that is for a different patch... Cheers, Richard
Patch
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index 1ff92ce..c7ac07a 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass @@ -475,6 +475,8 @@ export D="${target_rootfs}" export OFFLINE_ROOT="\$D" export IPKG_OFFLINE_ROOT="\$D" export OPKG_OFFLINE_ROOT="\$D" +export INTERCEPT_DIR="${WORKDIR}/intercept_scripts" +export NATIVE_ROOT=${STAGING_DIR_NATIVE} \$2 \$1/\$3 \$4 if [ \$? -ne 0 ]; then diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass index 881fdbd..955382f 100644 --- a/meta/classes/rootfs_deb.bbclass +++ b/meta/classes/rootfs_deb.bbclass @@ -48,6 +48,8 @@ fakeroot rootfs_deb_do_rootfs () { export OFFLINE_ROOT=${IMAGE_ROOTFS} export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS} export OPKG_OFFLINE_ROOT=${IMAGE_ROOTFS} + export INTERCEPT_DIR=${WORKDIR}/intercept_scripts + export NATIVE_ROOT=${STAGING_DIR_NATIVE} # Attempt to run preinsts # Mark packages with preinst failures as unpacked diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass index fc69b7e..8766d24 100644 --- a/meta/classes/rootfs_ipk.bbclass +++ b/meta/classes/rootfs_ipk.bbclass @@ -69,6 +69,8 @@ fakeroot rootfs_ipk_do_rootfs () { export OFFLINE_ROOT=${IMAGE_ROOTFS} export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS} export OPKG_OFFLINE_ROOT=${IPKG_OFFLINE_ROOT} + export INTERCEPT_DIR=${WORKDIR}/intercept_scripts + export NATIVE_ROOT=${STAGING_DIR_NATIVE} package_install_internal_ipk
In order for the postinst scriptlets to be able to run once we need to export the location of the intercept scripts and also the location of native sysrootfs. The gdk-pixbuf binaries will need the latter because in order to generate the loaders.cache it will need to scan some shared libraries that must be native. Even though the output is a text file. Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> --- meta/classes/package_rpm.bbclass | 2 ++ meta/classes/rootfs_deb.bbclass | 2 ++ meta/classes/rootfs_ipk.bbclass | 2 ++ 3 files changed, 6 insertions(+)