[oe-commits] Koen Kooi : nss-myhostname: fix postinst/prerm scripts
git at git.openembedded.org
git at git.openembedded.org
Fri Aug 22 17:35:26 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: 7a6e1197586e24a9d37173e13236f348d3cf0639
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=7a6e1197586e24a9d37173e13236f348d3cf0639
Author: Koen Kooi <koen at dominion.thruhere.net>
Date: Wed Aug 20 15:28:50 2014 +0200
nss-myhostname: fix postinst/prerm scripts
${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 at dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
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
}
More information about the Openembedded-commits
mailing list