base.bbclass: Pass in PATH to popen.
authorKhem Raj <raj.khem@gmail.com>
Sat, 29 Aug 2009 21:42:42 +0000 (14:42 -0700)
committerKhem Raj <raj.khem@gmail.com>
Sun, 30 Aug 2009 22:02:12 +0000 (15:02 -0700)
On Mac OSX its not able to find md5sum if
path is not passed to os.popen shell.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Koen Kooi <koen@openembedded.org>
classes/base.bbclass

index 97ccf5d..d29ba4b 100644 (file)
@@ -84,7 +84,7 @@ def base_chk_file(parser, pn, pv, src_uri, localpath, data):
 
     # call md5(sum) and shasum
     try:
-        md5pipe = os.popen('md5sum ' + localpath)
+       md5pipe = os.popen('PATH=%s md5sum %s' % (bb.data.getVar('PATH', data, True), localpath))
         md5data = (md5pipe.readline().split() or [ "" ])[0]
         md5pipe.close()
     except OSError: