bitbake/fetch2: When unpacking, only use PATH variable if its set

(Bitbake rev: ffec38675c0d78ee9fcd1d8f5a746d162145554e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2012-05-04 18:25:13 +01:00
parent 2605ca19c5
commit c9da0e31f8
1 changed files with 3 additions and 1 deletions

View File

@ -782,7 +782,9 @@ class FetchMethod(object):
bb.utils.mkdirhier(newdir)
os.chdir(newdir)
cmd = "PATH=\"%s\" %s" % (data.getVar('PATH', True), cmd)
path = data.getVar('PATH', True)
if path:
cmd = "PATH=\"%s\" %s" % (path, cmd)
bb.note("Unpacking %s to %s/" % (file, os.getcwd()))
ret = subprocess.call(cmd, preexec_fn=subprocess_setup, shell=True)