Patchwork [2/3] base-passwd: sed installed file instead of original

login
register
mail settings
Submitter Saul Wold
Date Feb. 26, 2014, 1:51 p.m.
Message ID <1393422692-28184-2-git-send-email-sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/67473/
State Accepted
Commit 49cdb68e3bfa885e7eaf67aec97631413f53bdf3
Headers show

Comments

Saul Wold - Feb. 26, 2014, 1:51 p.m.
When we change the ROOT_HOME the sed regex does not match if we are running
the do_install() a second time, so sed the installed file and preserve the original
so that the sed regex is matched correctly in the original

[YOCTO #5765]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-core/base-passwd/base-passwd_3.5.29.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
index 0205f2e..59bd413 100644
--- a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
+++ b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
@@ -28,8 +28,8 @@  do_install () {
 		${D}${mandir}/pl/man8/update-passwd.8
 	gzip -9 ${D}${mandir}/man8/* ${D}${mandir}/pl/man8/*
 	install -d -m 755 ${D}${datadir}/base-passwd
-	sed -i 's#:/root:#:${ROOT_HOME}:#' ${S}/passwd.master
 	install -o root -g root -p -m 644 ${S}/passwd.master ${D}${datadir}/base-passwd/
+	sed -i 's#:/root:#:${ROOT_HOME}:#' ${D}${datadir}/base-passwd/passwd.master
 	install -o root -g root -p -m 644 ${S}/group.master ${D}${datadir}/base-passwd/
 
 	install -d -m 755 ${D}${docdir}/${BPN}