diff --git a/doc/manual/configuration.rst b/doc/manual/configuration.rst index d70c958d9..bbb7c8ff5 100644 --- a/doc/manual/configuration.rst +++ b/doc/manual/configuration.rst @@ -1619,10 +1619,11 @@ consuming recipes. Example:: fingerprintScript: | bob-libc-version gcc -The ``path`` attribute is always needed. The ``libs`` attribute, if present, -must be a list of paths to needed shared libraries. Any path that is specified -must be relative. If the recipe makes use of existing host binaries and wants -to provide them as tool you should create symlinks to the host paths. +The ``path`` attribute is always needed. It might be a single path or a colon +separated list of paths. The ``libs`` attribute, if present, must be a list of +paths to needed shared libraries. Any path that is specified must be relative. +If the recipe makes use of existing host binaries and wants to provide them as +tool you should create symlinks to the host paths. The ``netAccess`` attribute allows the tool to request network access during build/package step execution even if the recipe has not requested it (see diff --git a/pym/bob/intermediate.py b/pym/bob/intermediate.py index 25c02b39d..fc8ca256c 100644 --- a/pym/bob/intermediate.py +++ b/pym/bob/intermediate.py @@ -225,8 +225,8 @@ def getPaths(self): The returned list is intended to be passed as PATH environment variable. The paths are sorted by name. """ - return sorted([ os.path.join(tool.getStep().getExecPath(self), tool.getPath()) - for tool in self.getTools().values() ]) + return sorted([ os.path.join(tool.getStep().getExecPath(self), p) + for tool in self.getTools().values() for p in tool.getPath().split(':') ]) def getLibraryPaths(self): """Get sorted list of library paths of used tools. diff --git a/test/black-box/tools-paths/recipes/root.yaml b/test/black-box/tools-paths/recipes/root.yaml new file mode 100644 index 000000000..e549da6f2 --- /dev/null +++ b/test/black-box/tools-paths/recipes/root.yaml @@ -0,0 +1,10 @@ +root: True + +depends: + - name: tools + use: [tools] + +packageTools: [foo_bar] +packageScript: | + foo.sh + bar.sh diff --git a/test/black-box/tools-paths/recipes/tools.yaml b/test/black-box/tools-paths/recipes/tools.yaml new file mode 100644 index 000000000..4c75cd48e --- /dev/null +++ b/test/black-box/tools-paths/recipes/tools.yaml @@ -0,0 +1,16 @@ +packageScript: | + mkdir -p foo bar + for i in foo bar; do + pushd $i + cat > $i.sh << EOF + #!/bin/bash + echo "Hello $i" + EOF + chmod +x $i.sh + popd + done + +provideTools: + foo_bar: + path: "foo:bar" + diff --git a/test/black-box/tools-paths/run.sh b/test/black-box/tools-paths/run.sh new file mode 100755 index 000000000..b1bf0a02b --- /dev/null +++ b/test/black-box/tools-paths/run.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e +. ../../test-lib.sh 2>/dev/null || { echo "Must run in script directory!" ; exit 1 ; } + +# Tests the different aspects of tool remapping for dependencies. + +exec_blackbox_test