Skip to contentSkip to conversation

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

PATCH New Richard Purdie 1 participant 1 message May 4, 2012

lore
Share & tools
lore
#0 lore raw

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

---

bitbake/lib/bb/fetch2/__init__.py +3 -1
index 1e28e25..ee5cd07 100644
@@ -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)