]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
uninative: show errors if installing fails
authorRoss Burton <ross.burton@arm.com>
Wed, 23 Apr 2025 17:26:41 +0000 (18:26 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 29 Apr 2025 08:54:15 +0000 (09:54 +0100)
We call the installer script but if it fails the user doesn't see the
reason, which makes resolving the problem hard.  Capture both stdout and
stderr as text, and display it to the user when it fails.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-global/uninative.bbclass

index d2297b53f553b0570eccf98bfb70f1c6d58fc2c7..75e0c19704d9a18261155f3b8a41542870386227 100644 (file)
@@ -109,7 +109,7 @@ ${UNINATIVE_STAGING_DIR}-uninative/relocate_sdk.py \
   ${UNINATIVE_LOADER} \
   ${UNINATIVE_STAGING_DIR}-uninative/${BUILD_ARCH}-linux/${bindir_native}/patchelf-uninative \
   ${UNINATIVE_STAGING_DIR}-uninative/${BUILD_ARCH}-linux${base_libdir_native}/libc*.so*" % chksum)
-        subprocess.check_output(cmd, shell=True)
+        subprocess.check_output(cmd, shell=True, text=True, stderr=subprocess.STDOUT)
 
         with open(loaderchksum, "w") as f:
             f.write(chksum)
@@ -122,7 +122,9 @@ ${UNINATIVE_STAGING_DIR}-uninative/relocate_sdk.py \
         bb.warn("Disabling uninative as unable to fetch uninative tarball: %s" % str(exc))
         bb.warn("To build your own uninative loader, please bitbake uninative-tarball and set UNINATIVE_TARBALL appropriately.")
     except subprocess.CalledProcessError as exc:
-        bb.warn("Disabling uninative as unable to install uninative tarball: %s" % str(exc))
+        bb.warn("Disabling uninative as unable to install uninative tarball:")
+        bb.warn(str(exc))
+        bb.warn(exc.stdout)
         bb.warn("To build your own uninative loader, please bitbake uninative-tarball and set UNINATIVE_TARBALL appropriately.")
     finally:
         os.chdir(olddir)