]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
run-postinsts: fix post-install-script output in log file
authorFavazza, Samuele <Samuele.Favazza@duagon.com>
Tue, 16 Dec 2025 14:33:31 +0000 (14:33 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 18 Dec 2025 13:53:50 +0000 (13:53 +0000)
When the POSTINST_LOGGING is enabled the output of the post-install
script is not stored in the 'postinstall.log' file. This probably
happened since commit 706410c847ac9c89317d098de5d5c580736edbbb.

Fix the post-install script execution statement to honor the
stdout/stderr redirection to the 'postinstall.log' file.

Signed-off-by: Samuele Favazza <samuele.favazza@duagon.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/run-postinsts/run-postinsts/run-postinsts

index b7352aa24df078c0205c4639d52924f299b34812..e8c31e04ced12728b4e69b78114b16a1fa3c757c 100755 (executable)
@@ -67,7 +67,7 @@ exec_postinst_scriptlets() {
                echo "Running postinst $i..."
                [ "$POSTINST_LOGGING" = "1" ] && eval echo "Running postinst $i..." $append_log
                if [ -x "$i" ]; then
-                       (sh -c "$i" $append_log)
+                       (sh -c "$i $append_log")
                        status=$?
                        if [ $status -ne 0 ]; then
                                echo "ERROR: postinst $i failed with exit code $status."