diff options
| author | Ross Burton <ross.burton@arm.com> | 2025-04-23 18:26:41 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-04-29 09:55:32 +0100 |
| commit | c2aec3f86ccd2dbe6185f3df2b22a6873582b457 (patch) | |
| tree | 8346100d42963633b9223ebaf09d98e420e06156 /meta/classes-global/uninative.bbclass | |
| parent | 70910dad0d9fe21a3f3aeeddc55932924e7e1ed2 (diff) | |
| download | poky-c2aec3f86ccd2dbe6185f3df2b22a6873582b457.tar.gz | |
uninative: show errors if installing fails
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.
(From OE-Core rev: c67fbe17ce063350181c28f99662004737d8b770)
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>
Diffstat (limited to 'meta/classes-global/uninative.bbclass')
| -rw-r--r-- | meta/classes-global/uninative.bbclass | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes-global/uninative.bbclass b/meta/classes-global/uninative.bbclass index d2297b53f5..75e0c19704 100644 --- a/meta/classes-global/uninative.bbclass +++ b/meta/classes-global/uninative.bbclass | |||
| @@ -109,7 +109,7 @@ ${UNINATIVE_STAGING_DIR}-uninative/relocate_sdk.py \ | |||
| 109 | ${UNINATIVE_LOADER} \ | 109 | ${UNINATIVE_LOADER} \ |
| 110 | ${UNINATIVE_STAGING_DIR}-uninative/${BUILD_ARCH}-linux/${bindir_native}/patchelf-uninative \ | 110 | ${UNINATIVE_STAGING_DIR}-uninative/${BUILD_ARCH}-linux/${bindir_native}/patchelf-uninative \ |
| 111 | ${UNINATIVE_STAGING_DIR}-uninative/${BUILD_ARCH}-linux${base_libdir_native}/libc*.so*" % chksum) | 111 | ${UNINATIVE_STAGING_DIR}-uninative/${BUILD_ARCH}-linux${base_libdir_native}/libc*.so*" % chksum) |
| 112 | subprocess.check_output(cmd, shell=True) | 112 | subprocess.check_output(cmd, shell=True, text=True, stderr=subprocess.STDOUT) |
| 113 | 113 | ||
| 114 | with open(loaderchksum, "w") as f: | 114 | with open(loaderchksum, "w") as f: |
| 115 | f.write(chksum) | 115 | f.write(chksum) |
| @@ -122,7 +122,9 @@ ${UNINATIVE_STAGING_DIR}-uninative/relocate_sdk.py \ | |||
| 122 | bb.warn("Disabling uninative as unable to fetch uninative tarball: %s" % str(exc)) | 122 | bb.warn("Disabling uninative as unable to fetch uninative tarball: %s" % str(exc)) |
| 123 | bb.warn("To build your own uninative loader, please bitbake uninative-tarball and set UNINATIVE_TARBALL appropriately.") | 123 | bb.warn("To build your own uninative loader, please bitbake uninative-tarball and set UNINATIVE_TARBALL appropriately.") |
| 124 | except subprocess.CalledProcessError as exc: | 124 | except subprocess.CalledProcessError as exc: |
| 125 | bb.warn("Disabling uninative as unable to install uninative tarball: %s" % str(exc)) | 125 | bb.warn("Disabling uninative as unable to install uninative tarball:") |
| 126 | bb.warn(str(exc)) | ||
| 127 | bb.warn(exc.stdout) | ||
| 126 | bb.warn("To build your own uninative loader, please bitbake uninative-tarball and set UNINATIVE_TARBALL appropriately.") | 128 | bb.warn("To build your own uninative loader, please bitbake uninative-tarball and set UNINATIVE_TARBALL appropriately.") |
| 127 | finally: | 129 | finally: |
| 128 | os.chdir(olddir) | 130 | os.chdir(olddir) |
