summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2024-01-26 14:34:48 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-01-27 08:20:02 +0000
commited0818060868a7797ff287e1dee68bef718659c7 (patch)
treee363d24412e81ab7862c7a01d3b4bc3fefeb0660
parentfd0980f74f0b34363cf4282667c918f1925db0f9 (diff)
downloadpoky-ed0818060868a7797ff287e1dee68bef718659c7.tar.gz
sysroot user management postinsts: run with /bin/sh -e to report errors when they happen
This exposes the following failure in a multilib setup, when everything up to do_package_write_rpm is in sstate, but do_package_write_rpm is not (there's a similar fail for lib64-man-db, and the failures themselves will be fixed separately in the next commit): Exception: subprocess.CalledProcessError: Command '/srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/recipe-sysroot/usr/bin/postinst-base-passwd' returned non-zero exit status 1. Subprocess output: install: cannot stat '/srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/lib64-recipe-sysroot/usr/share/base-passwd/passwd.master': No such file or directory (From OE-Core rev: 5ffa333db28bc5d8e440c983fdf95589d332461d) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/useradd.bbclass2
-rw-r--r--meta/recipes-core/base-passwd/base-passwd_3.6.3.bb2
2 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index cb809b5dd7..a58f8287c9 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -167,7 +167,7 @@ python useradd_sysroot_sstate () {
167 if scriptfile: 167 if scriptfile:
168 bb.utils.mkdirhier(os.path.dirname(scriptfile)) 168 bb.utils.mkdirhier(os.path.dirname(scriptfile))
169 with open(scriptfile, 'w') as script: 169 with open(scriptfile, 'w') as script:
170 script.write("#!/bin/sh\n") 170 script.write("#!/bin/sh -e\n")
171 bb.data.emit_func("useradd_sysroot", script, d) 171 bb.data.emit_func("useradd_sysroot", script, d)
172 script.write("useradd_sysroot\n") 172 script.write("useradd_sysroot\n")
173 os.chmod(scriptfile, 0o755) 173 os.chmod(scriptfile, 0o755)
diff --git a/meta/recipes-core/base-passwd/base-passwd_3.6.3.bb b/meta/recipes-core/base-passwd/base-passwd_3.6.3.bb
index 9d7703b1c0..bf50b01fd5 100644
--- a/meta/recipes-core/base-passwd/base-passwd_3.6.3.bb
+++ b/meta/recipes-core/base-passwd/base-passwd_3.6.3.bb
@@ -54,7 +54,7 @@ do_install () {
54} 54}
55 55
56basepasswd_sysroot_postinst() { 56basepasswd_sysroot_postinst() {
57#!/bin/sh 57#!/bin/sh -e
58 58
59# Install passwd.master and group.master to sysconfdir 59# Install passwd.master and group.master to sysconfdir
60install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir} 60install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir}