From: Koen Kooi Date: Wed, 20 Aug 2014 13:28:50 +0000 (+0200) Subject: nss-myhostname: fix postinst/prerm scripts X-Git-Tag: 2015-4~1864 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=37fd211e598b2342533b00d89c9efcd151c529ae;p=openembedded-core.git nss-myhostname: fix postinst/prerm scripts ${D} is expanded by bitbake which means the postinst looks like this: sed -e '/^hosts:/s/\s*\//' \ -e 's/\(^hosts:.*\)\(\\)\(.*\)\(\\)\(.*\)/\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 Signed-off-by: Richard Purdie --- 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 d8ec863954..1237602553 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*\//' \ -e 's/\(^hosts:.*\)\(\\)\(.*\)\(\\)\(.*\)/\1\2 myhostname \3\4\5/' \ - -i ${D}${sysconfdir}/nsswitch.conf + -i $D${sysconfdir}/nsswitch.conf } pkg_prerm_${PN} () { sed -e '/^hosts:/s/\s*\//' \ -e '/^hosts:/s/\s*myhostname//' \ - -i ${D}${sysconfdir}/nsswitch.conf + -i $D${sysconfdir}/nsswitch.conf }