diff options
author | Christophe Lyon <christophe.lyon@linaro.org> | 2024-02-11 18:20:23 +0000 |
---|---|---|
committer | Christophe Lyon <christophe.lyon@linaro.org> | 2024-02-14 12:01:41 +0000 |
commit | bc8ed3d22ed2b7ea2804bab8e6399a2f03d25b14 (patch) | |
tree | e2172f49492572a1bb717ef73cf942f2f9d87d5a | |
parent | ebd232c9c20f582642cd7e45345f414b27417fe8 (diff) |
manifest(): Skip packages when using default system version
The loop which iterates over gcc, binutils and ${clibrary} expects the
sources of all these packages to be available so that we can copy
information into the manifest. However, this is not true when building
a single package (eg with --build gcc), leading to spurious error
messages in the logs, such as:
fatal: cannot change to 'default': No such file or directory
fatal: cannot change to 'log': No such file or directory
which happen because 'binutils' is defined to 'default' and 'clibrary'
to 'auto' in global.sh, leading to incorrect definition of srcdir.
This patch explicitly skips 'default' and '' values for srcdir.
Change-Id: I7caaf52f0b727e10fc15a322389062999b9b755f
-rw-r--r-- | lib/package.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/package.sh b/lib/package.sh index 34c4a9d5..3425a375 100644 --- a/lib/package.sh +++ b/lib/package.sh @@ -524,10 +524,13 @@ EOF if test "$(component_is_tar ${i})" = no; then echo "--------------------- $i ----------------------" >> ${outfile} local srcdir="$(get_component_srcdir $i)" - # Invoke in a subshell in order to prevent state-change of the current - # working directory after manifest is called. - git -C ${srcdir} log -n 1 >> ${outfile} - echo "" >> ${outfile} + if [ "x${srcdir}" = "xdefault" ] \ + || [ "x${srcdir}" = "x" ]; then + echo "Using default system version" >> ${outfile} + else + git -C ${srcdir} log -n 1 >> ${outfile} + echo "" >> ${outfile} + fi fi done |