Hi,
This patchset will change the postinstall routine in gtk-immodules-cache.bbclass,
so it can run at do_rootfs time, and changes matchbox-keyboard recipe to use
the class.
Thanks,
Laurentiu
Laurentiu Palcu (2):
gtk-immodules-cache.bbclass: allow for offline cache generation
matchbox-keyboard: use the gtk-immodules-cache.bbclass
meta/classes/gtk-immodules-cache.bbclass | 22 +++++++++++++++++++-
.../matchbox-keyboard/matchbox-keyboard_git.bb | 18 ++--------------
2 files changed, 23 insertions(+), 17 deletions(-)
--
1.7.9.5
In order to support a RO rootfs, the cache generation during postinstall
has to be done on host. However, gtk-query-immodules application will
only be able to parse shared objects from the same ELF class.
In order not to have a native package for all the recipes providing
an input method, so we can generate the cache file natively, run
gtk-query-immodules through qemu emulator.
Signed-off-by: Laurentiu Palcu <redacted>
---
meta/classes/gtk-immodules-cache.bbclass | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
@@ -2,9 +2,29 @@## Usage: Set GTKIMMODULES_PACKAGES to the packages that needs to update the inputmethod modules+DEPENDS=+"qemu-native"+ gtk_immodule_cache_postinst(){ if["x$D"!="x"];then-exit1+EMULATOR=qemu-$(echo${TARGET_ARCH}|\+sed-e's/i[3-6]86/i386/'-e's/x86[_-]64/x86_64/'\+-e's/powerpc/ppc/')++formaj_verin23;do+if[-x$D${bindir}/gtk-query-immodules-$maj_ver.0];then+IMFILES=$(ls$D${libdir}/gtk-$maj_ver.0/*/immodules/*.so)+DYNAMIC_LOADER=$D$(readelf-a$D${bindir}/gtk-query-immodules-$maj_ver.0|\+grep"Requestingprograminterpreter"|sed-e's/^.*\[.*:\(.*\)\]/\1/')+LIBRARY_PATH=$D${base_libdir}:$D${libdir}+$EMULATOR$DYNAMIC_LOADER--library-path$LIBRARY_PATH\+$D${bindir}/gtk-query-immodules-$maj_ver.0$IMFILES>$D/etc/gtk-$maj_ver.0/gtk.immodules2>/dev/null&&\+sed-i-e"s:$D::"$D/etc/gtk-$maj_ver.0/gtk.immodules++[$?-ne0]&&exit1+fi+done++exit0 fi if[!-z`whichgtk-query-immodules-2.0`];thengtk-query-immodules-2.0>/etc/gtk-2.0/gtk.immodules
Since the class was already present, use it. Also, this will have the
postinstalls run on host, at do_rootfs time.
[YOCTO #3602]
Signed-off-by: Laurentiu Palcu <redacted>
---
.../matchbox-keyboard/matchbox-keyboard_git.bb | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
From: Burton, Ross <hidden> Date: 2012-12-19 17:51:12
On 19 December 2012 16:02, Laurentiu Palcu [off-list ref] wrote:
Since the class was already present, use it. Also, this will have the
postinstalls run on host, at do_rootfs time.
[YOCTO #3602]
Signed-off-by: Laurentiu Palcu <redacted>
In order to support a RO rootfs, the cache generation during postinstall
has to be done on host. However, gtk-query-immodules application will
only be able to parse shared objects from the same ELF class.
In order not to have a native package for all the recipes providing
an input method, so we can generate the cache file natively, run
gtk-query-immodules through qemu emulator.
Signed-off-by: Laurentiu Palcu <redacted>
---
Changes in v2:
* Used qemu_target_binary() function, in order to obtain the qemu binary
corresponding to the current target, as suggested by Phil (thank you,
I didn't know that function existed);
Thanks,
Laurentiu
meta/classes/gtk-immodules-cache.bbclass | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
@@ -2,9 +2,28 @@## Usage: Set GTKIMMODULES_PACKAGES to the packages that needs to update the inputmethod modules+DEPENDS=+"qemu-native"++inheritqemu+ gtk_immodule_cache_postinst(){ if["x$D"!="x"];then-exit1++formaj_verin23;do+if[-x$D${bindir}/gtk-query-immodules-$maj_ver.0];then+IMFILES=$(ls$D${libdir}/gtk-$maj_ver.0/*/immodules/*.so)+DYNAMIC_LOADER=$D$(readelf-a$D${bindir}/gtk-query-immodules-$maj_ver.0|\+grep"Requestingprograminterpreter"|sed-e's/^.*\[.*:\(.*\)\]/\1/')+LIBRARY_PATH=$D${base_libdir}:$D${libdir}+${@qemu_target_binary(d)}$DYNAMIC_LOADER--library-path$LIBRARY_PATH\+$D${bindir}/gtk-query-immodules-$maj_ver.0$IMFILES>$D/etc/gtk-$maj_ver.0/gtk.immodules2>/dev/null&&\+sed-i-e"s:$D::"$D/etc/gtk-$maj_ver.0/gtk.immodules++[$?-ne0]&&exit1+fi+done++exit0 fi if[!-z`whichgtk-query-immodules-2.0`];thengtk-query-immodules-2.0>/etc/gtk-2.0/gtk.immodules