From 0b14db452413df414fbadf14d6dae287bc5ae9ca Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 24 May 2012 13:57:16 +0100 Subject: 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 --- bitbake/lib/bb/utils.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bitbake/lib/bb/utils.py') 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): for p in paths: next = os.path.join(p, item) if os.path.exists(next): + if not os.path.isabs(next): + next = os.path.abspath(next) return next return "" -- cgit v1.2.3-54-g00ecf