public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH V2 0/4]fix support postrm/prerm at image creation time
@ 2013-01-17 12:56 Hongxu Jia
  2013-01-17 12:56 ` [PATCH 1/4] gtk-icon-cache.bbclass:fix support postrm " Hongxu Jia
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Hongxu Jia @ 2013-01-17 12:56 UTC (permalink / raw)
  To: openembedded-core

There are defects to support prerm/postrm at image creation time.
Change with V1:
  1) gtk-icon-cache.bbclass: install hook instead of calling
     gtk-update-icon-cache directly.
  2) libnss-mdns: delete test $D, directly use $D/etc/nsswitch.conf.
  3) gtk-immodules-cache.bbclass: postrm use the same logic as the
     postinst.

[YOCTO #3633] is about 1) gtk-icon-cache.bbclass

The following changes since commit 9f263a60e3521b800121a6f527a7b30dc9b62432:

  oprofile: add AArch64 support (2013-01-16 16:10:39 +0000)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib hongxu/fix-postrm
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-postrm

Hongxu Jia (4):
  gtk-icon-cache.bbclass:fix support postrm at image creation time
  update-rc.d:fix support postrm at image creation time
  libnss-mdns:fix support prerm at image creation time
  gtk-immodules-cache.bbclass:fix support postrm at image creation time

 meta/classes/gtk-icon-cache.bbclass                  |   18 ++++++++++++++++++
 meta/classes/gtk-immodules-cache.bbclass             |   13 ++++++++++++-
 meta/classes/update-rc.d.bbclass                     |    6 +++++-
 .../libnss-mdns/libnss-mdns_0.10.bb                  |    4 ++--
 4 files changed, 37 insertions(+), 4 deletions(-)

-- 
1.7.10.4




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/4] gtk-icon-cache.bbclass:fix support postrm at image creation time
  2013-01-17 12:56 [PATCH V2 0/4]fix support postrm/prerm at image creation time Hongxu Jia
@ 2013-01-17 12:56 ` Hongxu Jia
  2013-01-17 12:56 ` [PATCH 2/4] update-rc.d:fix " Hongxu Jia
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Hongxu Jia @ 2013-01-17 12:56 UTC (permalink / raw)
  To: openembedded-core

When use postrm on the build machine, it installs the hook in intercept-scripts
directory and exit 0, the hook will be later invoked and it will properly call
gtk-update-icon-cache.

[YOCTO #3633]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/classes/gtk-icon-cache.bbclass |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/meta/classes/gtk-icon-cache.bbclass b/meta/classes/gtk-icon-cache.bbclass
index 7c7dd78..d5fdcd5 100644
--- a/meta/classes/gtk-icon-cache.bbclass
+++ b/meta/classes/gtk-icon-cache.bbclass
@@ -32,6 +32,24 @@ done
 }
 
 gtk_icon_cache_postrm() {
+if [ "x$D" != "x" ]; then
+    if [ ! -f $INTERCEPT_DIR/update_icon_cache ]; then
+        cat << "EOF" > $INTERCEPT_DIR/update_icon_cache
+#!/bin/sh
+
+# update native pixbuf loaders
+gdk-pixbuf-query-loaders --update-cache
+
+for icondir in $D/usr/share/icons/*/ ; do
+    if [ -d $icondir ] ; then
+        gtk-update-icon-cache -fqt  $icondir
+    fi
+done
+EOF
+    fi
+    exit 0
+fi
+
 for icondir in /usr/share/icons/* ; do
     if [ -d $icondir ] ; then
         gtk-update-icon-cache -qt  $icondir
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/4] update-rc.d:fix support postrm at image creation time
  2013-01-17 12:56 [PATCH V2 0/4]fix support postrm/prerm at image creation time Hongxu Jia
  2013-01-17 12:56 ` [PATCH 1/4] gtk-icon-cache.bbclass:fix support postrm " Hongxu Jia
@ 2013-01-17 12:56 ` Hongxu Jia
  2013-01-17 12:56 ` [PATCH 3/4] libnss-mdns:fix support prerm " Hongxu Jia
  2013-01-17 12:56 ` [PATCH 4/4] gtk-immodules-cache.bbclass:fix support postrm " Hongxu Jia
  3 siblings, 0 replies; 5+ messages in thread
From: Hongxu Jia @ 2013-01-17 12:56 UTC (permalink / raw)
  To: openembedded-core

updatercd_postrm failed at image creation time because "-f -r ${D}" is not
used as update-rc.d's option.

[YOCTO #3633]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/classes/update-rc.d.bbclass |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 3364269..83816d6 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -28,7 +28,11 @@ fi
 }
 
 updatercd_postrm() {
-update-rc.d $D ${INITSCRIPT_NAME} remove
+if [ "$D" != "" ]; then
+	update-rc.d -f -r $D ${INITSCRIPT_NAME} remove
+else
+	update-rc.d ${INITSCRIPT_NAME} remove
+fi
 }
 
 
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/4] libnss-mdns:fix support prerm at image creation time
  2013-01-17 12:56 [PATCH V2 0/4]fix support postrm/prerm at image creation time Hongxu Jia
  2013-01-17 12:56 ` [PATCH 1/4] gtk-icon-cache.bbclass:fix support postrm " Hongxu Jia
  2013-01-17 12:56 ` [PATCH 2/4] update-rc.d:fix " Hongxu Jia
@ 2013-01-17 12:56 ` Hongxu Jia
  2013-01-17 12:56 ` [PATCH 4/4] gtk-immodules-cache.bbclass:fix support postrm " Hongxu Jia
  3 siblings, 0 replies; 5+ messages in thread
From: Hongxu Jia @ 2013-01-17 12:56 UTC (permalink / raw)
  To: openembedded-core

The pkg_prerm_${PN} failed at image creation time because $D is not assigned
as the prefix of "/etc/nsswitch.conf"

[YOCTO #3633]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
index f7356e4..a2712c9 100644
--- a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
+++ b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1"
 
 DEPENDS = "avahi"
 RDEPENDS_${PN} = "avahi-daemon"
-PR = "r6"
+PR = "r7"
 
 SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz"
 
@@ -32,5 +32,5 @@ pkg_postinst_${PN} () {
 pkg_prerm_${PN} () {
 	sed -e '/^hosts:/s/\s*\<mdns4\>//' \
 		-e '/^hosts:/s/\s*mdns4_minimal\s\+\[NOTFOUND=return\]//' \
-		-i /etc/nsswitch.conf
+		-i $D/etc/nsswitch.conf
 }
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/4] gtk-immodules-cache.bbclass:fix support postrm at image creation time
  2013-01-17 12:56 [PATCH V2 0/4]fix support postrm/prerm at image creation time Hongxu Jia
                   ` (2 preceding siblings ...)
  2013-01-17 12:56 ` [PATCH 3/4] libnss-mdns:fix support prerm " Hongxu Jia
@ 2013-01-17 12:56 ` Hongxu Jia
  3 siblings, 0 replies; 5+ messages in thread
From: Hongxu Jia @ 2013-01-17 12:56 UTC (permalink / raw)
  To: openembedded-core

Let postrm use the same logic as the postinst to run on both build machine
and target

[YOCTO #3633]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/classes/gtk-immodules-cache.bbclass |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/meta/classes/gtk-immodules-cache.bbclass b/meta/classes/gtk-immodules-cache.bbclass
index 9ffb03b..a8855af 100644
--- a/meta/classes/gtk-immodules-cache.bbclass
+++ b/meta/classes/gtk-immodules-cache.bbclass
@@ -31,7 +31,18 @@ fi
 
 gtk_immodule_cache_postrm() {
 if [ "x$D" != "x" ]; then
-    exit 1
+    for maj_ver in 2 3; do
+        if [ -x $D${bindir}/gtk-query-immodules-$maj_ver.0 ]; then
+            IMFILES=$(ls $D${libdir}/gtk-$maj_ver.0/*/immodules/*.so)
+            ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-$maj_ver.0')} \
+                $IMFILES > $D/etc/gtk-$maj_ver.0/gtk.immodules 2>/dev/null &&
+                sed -i -e "s:$D::" $D/etc/gtk-$maj_ver.0/gtk.immodules
+
+            [ $? -ne 0 ] && exit 1
+        fi
+    done
+
+    exit 0
 fi
 if [ ! -z `which gtk-query-immodules-2.0` ]; then
     gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-01-17 13:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-17 12:56 [PATCH V2 0/4]fix support postrm/prerm at image creation time Hongxu Jia
2013-01-17 12:56 ` [PATCH 1/4] gtk-icon-cache.bbclass:fix support postrm " Hongxu Jia
2013-01-17 12:56 ` [PATCH 2/4] update-rc.d:fix " Hongxu Jia
2013-01-17 12:56 ` [PATCH 3/4] libnss-mdns:fix support prerm " Hongxu Jia
2013-01-17 12:56 ` [PATCH 4/4] gtk-immodules-cache.bbclass:fix support postrm " Hongxu Jia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox