aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Wouter van Kesteren <woutershep@gmail.com> 2015-05-16 15:19:09 +0200
committerAvatar Bo ├śrsted Andresen <zlin@exherbo.org> 2015-08-21 17:27:52 +0200
commited16dbb0ed1d54d520bb3eebfc9285a0b23da122 (patch)
treecc2b780f655012f66e3fe506a2612202903fe6d6
parent65d5e4a67366217fa8ccb18302f01a9148c40ac3 (diff)
downloadpaludis-ed16dbb0ed1d54d520bb3eebfc9285a0b23da122.tar.gz
paludis-ed16dbb0ed1d54d520bb3eebfc9285a0b23da122.tar.xz
Fix cave-executables for cross
Change-Id: I3ab85c7e0c31a7792909e111e7bbe042fad589b7 Reviewed-on: https://galileo.mailstation.de/gerrit/1896 Reviewed-by: Kylie McClain <somasis@exherbo.org> Reviewed-by: Bo ├śrsted Andresen <zlin@exherbo.org>
-rw-r--r--src/clients/cave/executables_common.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/clients/cave/executables_common.cc b/src/clients/cave/executables_common.cc
index 47891c1..699397b 100644
--- a/src/clients/cave/executables_common.cc
+++ b/src/clients/cave/executables_common.cc
@@ -124,8 +124,13 @@ paludis::cave::executables_common(
throw BeMoreSpecific(spec, entries);
const std::string path(getenv_or_error("PATH"));
+ std::set<std::string> raw_paths;
+ tokenise<delim_kind::AnyOfTag, delim_mode::DelimiterTag>(path, ":", "", std::inserter(raw_paths, raw_paths.begin()));
+
std::set<std::string> paths;
- tokenise<delim_kind::AnyOfTag, delim_mode::DelimiterTag>(path, ":", "", std::inserter(paths, paths.begin()));
+ for (const std::string& raw_path : raw_paths)
+ paths.insert(stringify(FSPath(raw_path).realpath_if_exists()));
+
ExecutablesDisplayer ed(paths, displayer);
for (auto i(best ? entries->last() : entries->begin()), i_end(entries->end()) ;