diff options
author | Trevor Woerner <trevor@toganlabs.com> | 2018-11-21 11:31:12 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-12-05 16:01:35 +0300 |
commit | d82f539ab900c52a669a4f8407a39b8fb125f0ab (patch) | |
tree | 15b85d415149cf7cd7f6a5af1947e4c03944a257 /tools | |
parent | bcb514ac02e8b8b823b7db4faa00ddcb8e78876a (diff) | |
download | u-boot-d82f539ab900c52a669a4f8407a39b8fb125f0ab.tar.xz |
buildman/toolchain.py: fix toolchain directory
The hexagon toolchain (4.6.1) from kernel.org, for example, was packaged in
a way that is different from most toolchains. The first entry when unpacking
most toolchain tarballs is:
gcc-<version>-nolib/<targetarch>-<system>
e.g.:
gcc-8.1.0-nolibc/aarch64-linux/
The first entry of the hexagon toolchain, however, is:
gcc-4.6.1-nolibc/
This causes the buildman logic in toolchain.py::ScanPath() to not be able to
find the "*gcc" executable since it looks in gcc-4.6.1-nolib/{.|bin|usr/bin}
instead of gcc-4.6.1/hexagon-linux/{.|bin|usr/bin}. Therefore when buildman
tries to download a set of toolchains that includes hexagon, the script fails.
This update takes the second line of the tarball unpacking (which works for
all the toolchains I've tested from kernel.org) and parses it to take the
first two elements, separated by '/'. It makes this logic a bit more robust.
Signed-off-by: Trevor Woerner <trevor@toganlabs.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/buildman/toolchain.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index 4b35f400e9..59dd309c2b 100644 --- a/tools/buildman/toolchain.py +++ b/tools/buildman/toolchain.py @@ -502,7 +502,8 @@ class Toolchains: trailing / """ stdout = command.Output('tar', 'xvfJ', fname, '-C', dest) - return stdout.splitlines()[0][:-1] + dirs = stdout.splitlines()[1].split('/')[:2] + return '/'.join(dirs) def TestSettingsHasPath(self, path): """Check if buildman will find this toolchain |