Patchwork [bitbake-devel] bitbake/fetch2: When unpacking, only use PATH variable if its set

login
register
mail settings
Submitter Richard Purdie
Date May 4, 2012, 5:25 p.m.
Message ID <1336152313.23777.27.camel@ted>
Download mbox | patch
Permalink /patch/27081/
State New
Headers show

Comments

Richard Purdie - May 4, 2012, 5:25 p.m.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---

Patch

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 1e28e25..ee5cd07 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -783,7 +783,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)