Skip to contentSkip to conversation

libnss-mdns: add $D to postinst paths

PATCH New Ilya Yanok 1 participant 2 messages Apr 27, 2011

lore
Share & tools
lore

Ilya Yanok

author
#0 lore raw

PATCH 1/2 libnss-mdns: add $D to postinst paths

Post installation script can be called during image creation so paths should relative to $D.

---
 .../libnss-mdns/libnss-mdns_0.10.bb                |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb +3 -3
index b04b20a..651a240 100644
@@ -26,9 +26,9 @@ EXTRA_OECONF = "--libdir=/lib --disable-lynx --enable-avahi"
 
 # TODO: pattern based configuration update
 pkg_postinst_${PN} () {
-	cat /etc/nsswitch.conf | grep "hosts:\s*files dns$" > /dev/null && {
-		cat /etc/nsswitch.conf | sed 's/hosts:\s*files dns/& mdns4/' > /tmp/nsswitch.conf
-		mv /tmp/nsswitch.conf /etc/nsswitch.conf
+	cat $D/etc/nsswitch.conf | grep "hosts:\s*files dns$" > /dev/null && {
+		cat $D/etc/nsswitch.conf | sed 's/hosts:\s*files dns/& mdns4/' > /tmp/nsswitch.conf
+		mv /tmp/nsswitch.conf $D/etc/nsswitch.conf
 	}
 }
 
Signature · 1 line
1.7.4.4
author
#1 lore raw

PATCH 2/2 liberation-fonts: postinst can't be called offline

fc-cache should be called on target system. Or maybe we should pass a suitable directory list to it?

---
 .../ttf-fonts/liberation-fonts_1.04.bb             |    3 +++
 .../ttf-fonts/liberation-fonts_1.06.bb             |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)
meta/recipes-graphics/ttf-fonts/liberation-fonts_1.04.bb +3 -0
index c50d6eb..81aee0e 100644
@@ -34,6 +34,9 @@ do_install () {
 
 pkg_postinst_${PN} () {
 #!/bin/sh
+if [ "x$D" != "x" ] ; then
+	exit 1
+fi
 fc-cache
 }
 
meta/recipes-graphics/ttf-fonts/liberation-fonts_1.06.bb +3 -0
index d910cff..1f023b7 100644
@@ -35,6 +35,9 @@ do_install () {
 
 pkg_postinst_${PN} () {
 #!/bin/sh
+if [ "x$D" != "x" ] ; then
+	exit 1
+fi
 fc-cache
 }
 
Signature · 1 line
1.7.4.4