summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2020-08-18 15:57:38 +0200
committerPatrick Vacek <patrickvacek@gmail.com>2020-08-26 09:49:45 +0200
commit69b8f5487caacf1cc85fe95d4545b58e3eebc8c6 (patch)
tree416581852b0c2926cd351b752a4ba48f27d72bcb
parentf77b1764ba58449c7e12c6fcc48e350e1b94e815 (diff)
downloadmeta-updater-69b8f5487caacf1cc85fe95d4545b58e3eebc8c6.tar.gz
image_repo_manifest.bbclass: fix build when there is no repo on host
* failing "which repo" causes the run.buildinfo_manifest task to fail before it even reaches the test for empty repotool variable: dash -x some-image/1.0-r2/temp/run.buildinfo_manifest.80233 + export systemd_system_unitdir=/usr/lib/systemd/system + export systemd_unitdir=/usr/lib/systemd + export systemd_user_unitdir=/usr/lib/systemd/user + buildinfo_manifest + which repo + repotool= + bb_sh_exit_handler + ret=1 + [ 1 != 0 ] + echo WARNING: exit code 1 from a shell command. WARNING: exit code 1 from a shell command. + exit 1 causing nasty long python exception from do_image task with this fix, it just shows an warning again: dash -x some-image/1.0-r2/temp/run.buildinfo_manifest.80233 + export systemd_user_unitdir=/usr/lib/systemd/user + buildinfo_manifest + which repo + true + repotool= + [ -n ] + bbwarn Android repo tool not found; manifest not copied. + [ -p some-image/1.0-r2/temp/fifo.80233 ] + echo WARNING: Android repo tool not found; manifest not copied. WARNING: Android repo tool not found; manifest not copied. + ret=0 + trap 0 + exit 0 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--classes/image_repo_manifest.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/image_repo_manifest.bbclass b/classes/image_repo_manifest.bbclass
index 795f41f..12f56f0 100644
--- a/classes/image_repo_manifest.bbclass
+++ b/classes/image_repo_manifest.bbclass
@@ -13,7 +13,7 @@ inherit python3native
13 13
14# Write build information to target filesystem 14# Write build information to target filesystem
15buildinfo_manifest () { 15buildinfo_manifest () {
16 repotool=$(which repo) 16 repotool=`which repo || true`
17 if [ -n "$repotool" ]; then 17 if [ -n "$repotool" ]; then
18 python3 $repotool manifest --revision-as-HEAD -o ${IMAGE_ROOTFS}${sysconfdir}/manifest.xml || bbwarn "Android repo tool failed to run; manifest not copied" 18 python3 $repotool manifest --revision-as-HEAD -o ${IMAGE_ROOTFS}${sysconfdir}/manifest.xml || bbwarn "Android repo tool failed to run; manifest not copied"
19 else 19 else