* [PATCH 0/2] Postinstall fixes
@ 2012-12-10 16:09 Laurentiu Palcu
2012-12-10 16:09 ` [PATCH 1/2] populate_sdk_(deb|ipk|rpm): export NATIVE_ROOT and INTERCEPT_DIR variables Laurentiu Palcu
2012-12-10 16:09 ` [PATCH 2/2] gdk-pixbuf: handle postinstall errors differently Laurentiu Palcu
0 siblings, 2 replies; 5+ messages in thread
From: Laurentiu Palcu @ 2012-12-10 16:09 UTC (permalink / raw)
To: openembedded-core
Hi,
This patchset contains two fixes:
* when generating the SDK target sysroot, postinstall scriptlets could
not benefit of the latest postinstall improvements because NATIVE_ROOT and
INTERCEPT_DIR were not exported in populate_sdk_(deb|ipk|rpm).bbclass.
* gdk-pixbuf-query-loaders always returns 0 and the exit condition was not effective.
Without this change the SDK builds failed because sed -i created some temporary
files that could not be tarred and tar_sdk function failed;
Thanks,
Laurentiu
The following changes since commit c607095894cab60493ddfc4b967b0325e1c313b4:
bitbake: Revert "BBHandler: Ensure parser state engine is correctly reset for new parsing" (2012-12-07 18:09:01 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib lpalcu/postinst
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=lpalcu/postinst
Laurentiu Palcu (2):
populate_sdk_(deb|ipk|rpm): export NATIVE_ROOT and INTERCEPT_DIR
variables
gdk-pixbuf: handle postinstall errors differently
meta/classes/populate_sdk_deb.bbclass | 2 ++
meta/classes/populate_sdk_ipk.bbclass | 2 ++
meta/classes/populate_sdk_rpm.bbclass | 2 ++
meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb | 20 +++++++++++++++++---
4 files changed, 23 insertions(+), 3 deletions(-)
--
1.7.9.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] populate_sdk_(deb|ipk|rpm): export NATIVE_ROOT and INTERCEPT_DIR variables
2012-12-10 16:09 [PATCH 0/2] Postinstall fixes Laurentiu Palcu
@ 2012-12-10 16:09 ` Laurentiu Palcu
2012-12-10 16:19 ` Otavio Salvador
2012-12-10 16:09 ` [PATCH 2/2] gdk-pixbuf: handle postinstall errors differently Laurentiu Palcu
1 sibling, 1 reply; 5+ messages in thread
From: Laurentiu Palcu @ 2012-12-10 16:09 UTC (permalink / raw)
To: openembedded-core
In order for the postinstall scripts to have access to the recent
improvements when generating the target SDK sysroot, export these
variables in populate_sdk.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
meta/classes/populate_sdk_deb.bbclass | 2 ++
meta/classes/populate_sdk_ipk.bbclass | 2 ++
meta/classes/populate_sdk_rpm.bbclass | 2 ++
3 files changed, 6 insertions(+)
diff --git a/meta/classes/populate_sdk_deb.bbclass b/meta/classes/populate_sdk_deb.bbclass
index f2d0621..1e28b61 100644
--- a/meta/classes/populate_sdk_deb.bbclass
+++ b/meta/classes/populate_sdk_deb.bbclass
@@ -34,6 +34,8 @@ populate_sdk_deb () {
export INSTALL_PACKAGES_ATTEMPTONLY_DEB="${TOOLCHAIN_TARGET_TASK_ATTEMPTONLY}"
export PACKAGES_LINGUAS_DEB=""
export INSTALL_TASK_DEB="populate_sdk-target"
+ export INTERCEPT_DIR=${WORKDIR}/intercept_scripts
+ export NATIVE_ROOT=${STAGING_DIR_NATIVE}
package_install_internal_deb
diff --git a/meta/classes/populate_sdk_ipk.bbclass b/meta/classes/populate_sdk_ipk.bbclass
index 65a95e7..3a5ecda 100644
--- a/meta/classes/populate_sdk_ipk.bbclass
+++ b/meta/classes/populate_sdk_ipk.bbclass
@@ -26,6 +26,8 @@ populate_sdk_ipk() {
export OFFLINE_ROOT=${INSTALL_ROOTFS_IPK}
export IPKG_OFFLINE_ROOT=${INSTALL_ROOTFS_IPK}
export OPKG_OFFLINE_ROOT=${IPKG_OFFLINE_ROOT}
+ export INTERCEPT_DIR=${WORKDIR}/intercept_scripts
+ export NATIVE_ROOT=${STAGING_DIR_NATIVE}
package_install_internal_ipk
diff --git a/meta/classes/populate_sdk_rpm.bbclass b/meta/classes/populate_sdk_rpm.bbclass
index 1c54049..b5aa601 100644
--- a/meta/classes/populate_sdk_rpm.bbclass
+++ b/meta/classes/populate_sdk_rpm.bbclass
@@ -40,6 +40,8 @@ populate_sdk_rpm () {
export INSTALL_PROVIDENAME_RPM="/bin/sh /bin/bash /usr/bin/env /usr/bin/perl pkgconfig pkgconfig(pkg-config)"
export INSTALL_TASK_RPM="populate_sdk-target"
export INSTALL_COMPLEMENTARY_RPM=""
+ export INTERCEPT_DIR=${WORKDIR}/intercept_scripts
+ export NATIVE_ROOT=${STAGING_DIR_NATIVE}
# Setup base system configuration
mkdir -p ${INSTALL_ROOTFS_RPM}/etc/rpm/
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] gdk-pixbuf: handle postinstall errors differently
2012-12-10 16:09 [PATCH 0/2] Postinstall fixes Laurentiu Palcu
2012-12-10 16:09 ` [PATCH 1/2] populate_sdk_(deb|ipk|rpm): export NATIVE_ROOT and INTERCEPT_DIR variables Laurentiu Palcu
@ 2012-12-10 16:09 ` Laurentiu Palcu
1 sibling, 0 replies; 5+ messages in thread
From: Laurentiu Palcu @ 2012-12-10 16:09 UTC (permalink / raw)
To: openembedded-core
Apparently gdk-pixbuf-query-loaders always returns 0 but writes any
errors to stderr. So, the conditional exit at the end of the command was
useless. Write the errors to a file and exit only if the file size is
greater than 0.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb
index 2377d0e..33a43be 100644
--- a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb
+++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb
@@ -63,12 +63,26 @@ if [ "x$D" != "x" ]; then
# we trick the gdk-pixbuf-query-loaders into scanning the native shared
# objects and then we remove the NATIVE_ROOT prefix from the paths in
# loaders.cache.
-gdk-pixbuf-query-loaders $(find $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders \
- -name *.so | sed -e "s:$D:$NATIVE_ROOT:g") > \
- $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.cache || exit 1
+gdk-pixbuf-query-loaders $(ls -d -1 $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.so |\
+ sed -e "s:$D:$NATIVE_ROOT:g") > \
+ $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \
+ 2>$D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.err
+
+# gdk-pixbuf-query-loaders always returns 0, so we need to check if loaders.err
+# has anything in it
+if [ -s $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.err ]; then
+ echo "${PN} postinstall scriptlet failed:"
+ cat $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.err
+ rm $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.err
+ # we've got errors, postpone postinstall for first boot
+ exit 1
+fi
sed -i -e "s:$NATIVE_ROOT:/:g" $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
+# remove the empty loaders.err
+rm $D/${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders.err
+
exit 0
fi
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] populate_sdk_(deb|ipk|rpm): export NATIVE_ROOT and INTERCEPT_DIR variables
2012-12-10 16:09 ` [PATCH 1/2] populate_sdk_(deb|ipk|rpm): export NATIVE_ROOT and INTERCEPT_DIR variables Laurentiu Palcu
@ 2012-12-10 16:19 ` Otavio Salvador
2012-12-10 23:27 ` Saul Wold
0 siblings, 1 reply; 5+ messages in thread
From: Otavio Salvador @ 2012-12-10 16:19 UTC (permalink / raw)
To: Laurentiu Palcu; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 744 bytes --]
On Mon, Dec 10, 2012 at 2:09 PM, Laurentiu Palcu
<laurentiu.palcu@intel.com>wrote:
> In order for the postinstall scripts to have access to the recent
> improvements when generating the target SDK sysroot, export these
> variables in populate_sdk.
>
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
> ...
+ export NATIVE_ROOT=${STAGING_DIR_NATIVE}
> ...
>
Why you don't use STAGING_DIR_NATIVE directly? This seems to have no good
reason for a variable with same content of a well known variable.
Regards,
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
[-- Attachment #2: Type: text/html, Size: 1462 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] populate_sdk_(deb|ipk|rpm): export NATIVE_ROOT and INTERCEPT_DIR variables
2012-12-10 16:19 ` Otavio Salvador
@ 2012-12-10 23:27 ` Saul Wold
0 siblings, 0 replies; 5+ messages in thread
From: Saul Wold @ 2012-12-10 23:27 UTC (permalink / raw)
To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer
On 12/10/2012 08:19 AM, Otavio Salvador wrote:
>
>
>
> On Mon, Dec 10, 2012 at 2:09 PM, Laurentiu Palcu
> <laurentiu.palcu@intel.com <mailto:laurentiu.palcu@intel.com>> wrote:
>
> In order for the postinstall scripts to have access to the recent
> improvements when generating the target SDK sysroot, export these
> variables in populate_sdk.
>
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com
> <mailto:laurentiu.palcu@intel.com>>
> ...
>
> + export NATIVE_ROOT=${STAGING_DIR_NATIVE}
> ...
>
>
> Why you don't use STAGING_DIR_NATIVE directly? This seems to have no
> good reason for a variable with same content of a well known variable.
>
I believe that Richard already commented on this naming and agrees that
we need both.
Sau!
> Regards,
>
> --
> Otavio Salvador O.S. Systems
> E-mail: otavio@ossystems.com.br <mailto:otavio@ossystems.com.br>
> http://www.ossystems.com.br
> Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-12-10 23:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-10 16:09 [PATCH 0/2] Postinstall fixes Laurentiu Palcu
2012-12-10 16:09 ` [PATCH 1/2] populate_sdk_(deb|ipk|rpm): export NATIVE_ROOT and INTERCEPT_DIR variables Laurentiu Palcu
2012-12-10 16:19 ` Otavio Salvador
2012-12-10 23:27 ` Saul Wold
2012-12-10 16:09 ` [PATCH 2/2] gdk-pixbuf: handle postinstall errors differently Laurentiu Palcu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox