mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
classes/staging: capture output of sysroot postinsts into logs
This particularly helps with user management postinsts as otherwise there's no trace left of what was run, in which order, and what was the output. Here's an example from the logs: NOTE: Running postinst /srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/lib64-recipe-sysroot/usr/bin/postinst-lib64-base-passwd, output: b'/srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/recipe-sysroot-native/usr/sbin/useradd\nRunning useradd commands...\nNOTE: lib64-ptest-runner: Performing useradd with [--root /srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/lib64-recipe-sysroot --system --no-create-home --home / --user-group ptest]\n' NOTE: Running postinst /srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/lib64-recipe-sysroot/usr/bin/postinst-useradd-lib64-ptest-runner, output: b'/srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/recipe-sysroot-native/usr/sbin/useradd\nRunning useradd commands...\nNOTE: lib64-ptest-runner: Performing useradd with [--root /srv/storage/alex/yocto/build-multilib/tmp/work/x86_64-pokymllib64-linux/lib64-quilt/0.67/lib64-recipe-sysroot --system --no-create-home --home / --user-group ptest]\nNOTE: lib64-ptest-runner: user ptest already exists, not re-creating it\n' (From OE-Core rev: a4dc96293268804b214a02e08d266205fad428b0) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
55bfa99451
commit
d00682ab5c
@@ -246,7 +246,7 @@ def staging_populate_sysroot_dir(targetsysroot, nativesysroot, native, d):
|
||||
|
||||
staging_processfixme(fixme, targetdir, targetsysroot, nativesysroot, d)
|
||||
for p in postinsts:
|
||||
subprocess.check_output(p, shell=True, stderr=subprocess.STDOUT)
|
||||
bb.note("Running postinst {}, output:\n{}".format(p, subprocess.check_output(p, shell=True, stderr=subprocess.STDOUT)))
|
||||
|
||||
#
|
||||
# Manifests here are complicated. The main sysroot area has the unpacked sstate
|
||||
@@ -630,7 +630,7 @@ python extend_recipe_sysroot() {
|
||||
staging_processfixme(fixme[f], f, recipesysroot, recipesysrootnative, d)
|
||||
|
||||
for p in postinsts:
|
||||
subprocess.check_output(p, shell=True, stderr=subprocess.STDOUT)
|
||||
bb.note("Running postinst {}, output:\n{}".format(p, subprocess.check_output(p, shell=True, stderr=subprocess.STDOUT)))
|
||||
|
||||
for dep in manifests:
|
||||
c = setscenedeps[dep][0]
|
||||
|
||||
Reference in New Issue
Block a user