Skip to contentSkip to conversation

gdk-pixbuf: Use qemu to run postinsts in offline root mode

PATCH In review Phil Blundell 3 participants 5 messages Sep 26, 2012 – Sep 27, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gdk-pixbuf: Use qemu to run postinsts in offline root mode

This makes it possible to use gdk-pixbuf on a read-only rootfs.

---
 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb |   19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb +12 -7
index 82a7eaa..df35b8d 100644
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
 
 SECTION = "libs"
 
-DEPENDS = "libpng glib-2.0 jpeg"
+DEPENDS = "libpng glib-2.0 jpeg qemu-native"
 DEPENDS_append_linuxstdbase = " virtual/libx11"
 
 SRC_URI = "http://ftp.acc.umu.se/pub/GNOME/sources/gdk-pixbuf/2.24/gdk-pixbuf-${PV}.tar.xz \
@@ -21,9 +21,9 @@ SRC_URI = "http://ftp.acc.umu.se/pub/GNOME/sources/gdk-pixbuf/2.24/gdk-pixbuf-${
 SRC_URI[md5sum] = "72f39b34b20f68148c1609bd27415412"
 SRC_URI[sha256sum] = "da7a3f00db360913716368e19e336402755cafa93769f3cfa28a969303e4bee1"
 
-PR = "r7"
+PR = "r8"
 
-inherit autotools pkgconfig gettext
+inherit autotools pkgconfig gettext qemu
 
 LIBV = "2.10.0"
 
@@ -41,26 +41,31 @@ PACKAGES =+ "${PN}-xlib"
 FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}"
 ALLOW_EMPTY_${PN}-xlib = "1"
 
+loadersdir = "${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders"
+
 FILES_${PN} = "${bindir}/gdk-pixbuf-query-loaders \
 	${libdir}/lib*.so.*"
 
 FILES_${PN}-dev += " \
 	${bindir}/gdk-pixbuf-csource \
 	${includedir}/* \
-	${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \
+	${loadersdir}/*.la \
 "
 
 FILES_${PN}-dbg += " \
         ${libdir}/.debug/* \
-	${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/.debug/* \
+	${loadersdir}/.debug/* \
 "
 
 postinst_pixbufloader () {
 if [ "x$D" != "x" ]; then
-    exit 1
+	if [ ! -f "$D${loadersdir}/../loaders.cache" ]; then
+		${@qemu_target_binary(d)} -drop-ld-preload -L $D $D${bindir}/gdk-pixbuf-query-loaders > "$D${loadersdir}/../loaders.cache"
+	fi
+	exit 0
 fi
 
-GDK_PIXBUF_MODULEDIR=${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders gdk-pixbuf-query-loaders --update-cache
+GDK_PIXBUF_MODULEDIR="${loadersdir}" gdk-pixbuf-query-loaders --update-cache
 
 if [ -x ${bindir}/gtk-update-icon-cache ] && [ -d ${datadir}/icons ]; then
     for icondir in /usr/share/icons/*; do
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 1 line · Phil Blundell

This makes it possible to use gdk-pixbuf on a read-only rootfs.

Isn't this issue resolved in "[RFC 0/7] Postinstall improvements" too?

Cheers,

Quoted 76 lines
---
 meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb |   19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.24.1.bb +12 -7
index 82a7eaa..df35b8d 100644
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
 
 SECTION = "libs"
 
-DEPENDS = "libpng glib-2.0 jpeg"
+DEPENDS = "libpng glib-2.0 jpeg qemu-native"
 DEPENDS_append_linuxstdbase = " virtual/libx11"
 
 SRC_URI = "http://ftp.acc.umu.se/pub/GNOME/sources/gdk-pixbuf/2.24/gdk-pixbuf-${PV}.tar.xz \
@@ -21,9 +21,9 @@ SRC_URI = "http://ftp.acc.umu.se/pub/GNOME/sources/gdk-pixbuf/2.24/gdk-pixbuf-${
 SRC_URI[md5sum] = "72f39b34b20f68148c1609bd27415412"
 SRC_URI[sha256sum] = "da7a3f00db360913716368e19e336402755cafa93769f3cfa28a969303e4bee1"
 
-PR = "r7"
+PR = "r8"
 
-inherit autotools pkgconfig gettext
+inherit autotools pkgconfig gettext qemu
 
 LIBV = "2.10.0"
 
@@ -41,26 +41,31 @@ PACKAGES =+ "${PN}-xlib"
 FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}"
 ALLOW_EMPTY_${PN}-xlib = "1"
 
+loadersdir = "${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders"
+
 FILES_${PN} = "${bindir}/gdk-pixbuf-query-loaders \
 	${libdir}/lib*.so.*"
 
 FILES_${PN}-dev += " \
 	${bindir}/gdk-pixbuf-csource \
 	${includedir}/* \
-	${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \
+	${loadersdir}/*.la \
 "
 
 FILES_${PN}-dbg += " \
         ${libdir}/.debug/* \
-	${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/.debug/* \
+	${loadersdir}/.debug/* \
 "
 
 postinst_pixbufloader () {
 if [ "x$D" != "x" ]; then
-    exit 1
+	if [ ! -f "$D${loadersdir}/../loaders.cache" ]; then
+		${@qemu_target_binary(d)} -drop-ld-preload -L $D $D${bindir}/gdk-pixbuf-query-loaders > "$D${loadersdir}/../loaders.cache"
+	fi
+	exit 0
 fi
 
-GDK_PIXBUF_MODULEDIR=${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders gdk-pixbuf-query-loaders --update-cache
+GDK_PIXBUF_MODULEDIR="${loadersdir}" gdk-pixbuf-query-loaders --update-cache
 
 if [ -x ${bindir}/gtk-update-icon-cache ] && [ -d ${datadir}/icons ]; then
     for icondir in /usr/share/icons/*; do
Signature · 9 lines
1.7.10.4




_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#2 lore raw
Quoted 4 lines · Martin Jansa
Quoted 1 line · Phil Blundell

This makes it possible to use gdk-pixbuf on a read-only rootfs.

Isn't this issue resolved in "[RFC 0/7] Postinstall improvements" too?

Ah, possibly. I haven't really been following that thread. I'll take a look.

p.

#3 lore raw
Quoted 5 lines · Phil Blundell
Quoted 4 lines · Martin Jansa
Quoted 1 line · Phil Blundell

This makes it possible to use gdk-pixbuf on a read-only rootfs.

Isn't this issue resolved in "[RFC 0/7] Postinstall improvements" too?

Investigations are still pending since I saw unexplainable effects on my standard image.

Andreas

#4 lore raw
In reply to Martin Jansa
Quoted 8 lines · Phil Blundell
Quoted 4 lines · Martin Jansa
Quoted 1 line · Phil Blundell

This makes it possible to use gdk-pixbuf on a read-only rootfs.

Isn't this issue resolved in "[RFC 0/7] Postinstall improvements" too?

Ah, possibly. I haven't really been following that thread. I'll take a look.

I found the patch that I guess you were referring to:

http://lists.linuxtogo.org/pipermail/openembedded-core/2012-September/029913.html

Personally I don't like that solution so much; the reliance on NATIVE_ROOT containing the appropriate bits seems a bit fragile. But I suppose it's a matter of opinion.

p.