Fix nss-localuser postinst scriptlet to run only on the target
[AGL/meta-agl.git] / meta-app-framework / recipes-core / nss-localuser / nss-localuser_0.1.bb
index 62e163f..45861f7 100644 (file)
@@ -13,6 +13,8 @@ SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/nss-localuser;protocol=ht
 SRCREV = "66803c6fdb609ed83a78b9194ecb23e9c1b773e7"
 PV = "${AGL_BRANCH}+git${SRCPV}"
 
+RDEPENDS_${PN} = "base-files"
+
 S = "${WORKDIR}/git"
 
 do_compile() {
@@ -23,7 +25,7 @@ do_install() {
        make nssdir=${D}${libdir} install
 }
 
-pkg_postinst_${PN} () {
+pkg_postinst_ontarget_${PN} () {
        sed -e '/^hosts:/s/\<localuser\>\s*//' \
                -e 's/\(^hosts:\s\s*\)\(.*\)/\1localuser \2/' \
                -i $D${sysconfdir}/nsswitch.conf