]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
sysroot user management postinsts: run with /bin/sh -e to report errors when they...
authorAlexander Kanavin <alex.kanavin@gmail.com>
Fri, 26 Jan 2024 13:34:48 +0000 (14:34 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 27 Jan 2024 08:12:24 +0000 (08:12 +0000)
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

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/useradd.bbclass
meta/recipes-core/base-passwd/base-passwd_3.6.3.bb

index cb809b5dd74edef987f6f658ea823fc385e332bd..a58f8287c96c6903ca8d73499d2986565f19c447 100644 (file)
@@ -167,7 +167,7 @@ python useradd_sysroot_sstate () {
     if scriptfile:
         bb.utils.mkdirhier(os.path.dirname(scriptfile))
         with open(scriptfile, 'w') as script:
-            script.write("#!/bin/sh\n")
+            script.write("#!/bin/sh -e\n")
             bb.data.emit_func("useradd_sysroot", script, d)
             script.write("useradd_sysroot\n")
         os.chmod(scriptfile, 0o755)
index 9d7703b1c0049c817bd276613b81535fc4bfd114..bf50b01fd5ae17ecb425c86e445fd93123424256 100644 (file)
@@ -54,7 +54,7 @@ do_install () {
 }
 
 basepasswd_sysroot_postinst() {
-#!/bin/sh
+#!/bin/sh -e
 
 # Install passwd.master and group.master to sysconfdir
 install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir}