All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nss-myhostname: fix postinst/prerm scripts
@ 2014-08-20 13:28 Koen Kooi
  0 siblings, 0 replies; only message in thread
From: Koen Kooi @ 2014-08-20 13:28 UTC (permalink / raw)
  To: openembedded-core; +Cc: Koen Kooi

${D} is expanded by bitbake which means the postinst looks like this:

sed -e '/^hosts:/s/\s*\<myhostname\>//' \
    -e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
    -i /build/scratch/angstrom-v2014.12/build/tmp-angstrom_next-eglibc/work/armv5te-angstrom-linux-gnueabi/systemd/1_216+gitAUTOINC+5d0ae62c66-r0/image/etc/nsswitch.conf

Change ${D} to $D to stop it from being expanded by bitbake.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb b/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
index d8ec863..1237602 100644
--- a/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
+++ b/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
@@ -16,11 +16,11 @@ inherit autotools
 pkg_postinst_${PN} () {
 	sed -e '/^hosts:/s/\s*\<myhostname\>//' \
 		-e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
-		-i ${D}${sysconfdir}/nsswitch.conf
+		-i $D${sysconfdir}/nsswitch.conf
 }
 
 pkg_prerm_${PN} () {
 	sed -e '/^hosts:/s/\s*\<myhostname\>//' \
 		-e '/^hosts:/s/\s*myhostname//' \
-		-i ${D}${sysconfdir}/nsswitch.conf
+		-i $D${sysconfdir}/nsswitch.conf
 }
-- 
1.9.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-20 13:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-20 13:28 [PATCH] nss-myhostname: fix postinst/prerm scripts Koen Kooi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.