diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2023-06-14 08:03:53 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2023-06-14 14:14:28 +0200 |
commit | d307d55a3a6287f42f9e976a16f79e5b5ad7c432 (patch) | |
tree | da3b31be2a4ce633ec339bf97ca06046705744c8 | |
parent | ad360c56fb84795c1d25e8b39fad88939dd89eae (diff) | |
download | OSELAS.Toolchain-d307d55a3a6287f42f9e976a16f79e5b5ad7c432.tar.gz OSELAS.Toolchain-d307d55a3a6287f42f9e976a16f79e5b5ad7c432.tar.xz |
scripts: handle 'ptxdist print' better
Some directories may not exist in that case.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | scripts/lib/ptxd_make_icecc_check.sh | 3 | ||||
-rw-r--r-- | scripts/lib/ptxd_make_toolchain.sh | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/scripts/lib/ptxd_make_icecc_check.sh b/scripts/lib/ptxd_make_icecc_check.sh index 63f4c65..b1ecb25 100644 --- a/scripts/lib/ptxd_make_icecc_check.sh +++ b/scripts/lib/ptxd_make_icecc_check.sh @@ -16,7 +16,8 @@ ptxd_make_icecc_check() { # old icerun versions cannot handle relative paths sysroot_host="$(ptxd_get_ptxconf PTXCONF_SYSROOT_HOST)" && - sysroot_host=".${sysroot_host#${PTXDIST_WORKSPACE}}" + sysroot_host=".${sysroot_host#${PTXDIST_WORKSPACE}}" && + mkdir -p "${sysroot_host}/bin" && ln -s /bin/true "${sysroot_host}/bin/test-icerun" && icerun "${sysroot_host}/bin/test-icerun" || { echo "Disabling broken icerun!" diff --git a/scripts/lib/ptxd_make_toolchain.sh b/scripts/lib/ptxd_make_toolchain.sh index 0000801..dadbc19 100644 --- a/scripts/lib/ptxd_make_toolchain.sh +++ b/scripts/lib/ptxd_make_toolchain.sh @@ -12,10 +12,10 @@ ptxd_make_toolchain_cleanup() { # packages install to pkgdir anyways and this avoid empty directories # in the final toolchain - rmdir --ignore-fail-on-non-empty \ - {"${sysroot_cross}","${sysroot_target}"{,/usr}}/{etc,lib,{,s}bin,include,{,share/}man/{man*,},share} 2>/dev/null - # errors may occur because the dirs may not exist (e.g. for 'ptxdist print'). - true + if [ -d "${sysroot_cross}" ]; then + rmdir --ignore-fail-on-non-empty \ + {"${sysroot_cross}","${sysroot_target}"}/{etc,usr/{lib,{,s}bin,include,{,share/}{man/{man*,},}}} && + fi } ptxd_make_toolchain_cleanup |