summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-24 13:57:16 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-25 11:15:12 +0100
commit0b14db452413df414fbadf14d6dae287bc5ae9ca (patch)
tree91f91492ccd35e36b4777ec56c69173f8e7a51bb /bitbake/lib/bb
parent2d3ff5e6e17c3c8e0ba000c696da54e51167f15d (diff)
downloadpoky-0b14db452413df414fbadf14d6dae287bc5ae9ca.tar.gz
bitbake/utils.py: Ensure utils.which() returns full paths
If the path passed to which contains empty elements, it will search the current working directory for the file which is correct baheviour. Various pieces of code assume the path returned is a full path though. This commit ensures we don't return relative paths. (Bitbake rev: 4de24ccc10e40cc088b8515095df59f69b12715d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 7a73419fa3..fc389a3e2c 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -721,6 +721,8 @@ def which(path, item, direction = 0):
721 for p in paths: 721 for p in paths:
722 next = os.path.join(p, item) 722 next = os.path.join(p, item)
723 if os.path.exists(next): 723 if os.path.exists(next):
724 if not os.path.isabs(next):
725 next = os.path.abspath(next)
724 return next 726 return next
725 727
726 return "" 728 return ""