[oe-commits] Marcin Juszkiewicz : base.bbclass: fix quoting for md5/ sha256 checksums checking

git version control git at git.openembedded.org
Mon Mar 15 08:38:34 UTC 2010


Module: openembedded.git
Branch: shr/unstable
Commit: f362c9bb1ec5a010917a155b1649de890720d9c8
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=f362c9bb1ec5a010917a155b1649de890720d9c8

Author: Marcin Juszkiewicz <marcin at juszkiewicz.com.pl>
Date:   Mon Mar 15 07:55:49 2010 +0100

base.bbclass: fix quoting for md5/sha256 checksums checking

Signed-off-by: Marcin Juszkiewicz <marcin at juszkiewicz.com.pl>

---

 classes/base.bbclass |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/classes/base.bbclass b/classes/base.bbclass
index a54e699..2f36312 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -81,7 +81,7 @@ def base_chk_file_vars(parser, localpath, params, data):
 
     if want_md5sum:
         try:
-	    md5pipe = os.popen('PATH=%s md5sum %s' % (bb.data.getVar('PATH', data, True), 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, e:
@@ -92,7 +92,7 @@ def base_chk_file_vars(parser, localpath, params, data):
 
     if want_sha256sum:
         try:
-            shapipe = os.popen('PATH=%s oe_sha256sum %s' % (bb.data.getVar('PATH', data, True), localpath))
+            shapipe = os.popen('PATH=%s oe_sha256sum "%s"' % (bb.data.getVar('PATH', data, True), localpath))
             sha256data = (shapipe.readline().split() or [ "" ])[0]
             shapipe.close()
         except OSError, e:
@@ -131,14 +131,14 @@ def base_chk_file(parser, pn, pv, src_uri, localpath, data):
 
     # call md5(sum) and shasum
     try:
-	md5pipe = os.popen('PATH=%s md5sum %s' % (bb.data.getVar('PATH', data, True), 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:
         raise Exception("Executing md5sum failed")
 
     try:
-        shapipe = os.popen('PATH=%s oe_sha256sum %s' % (bb.data.getVar('PATH', data, True), localpath))
+        shapipe = os.popen('PATH=%s oe_sha256sum "%s"' % (bb.data.getVar('PATH', data, True), localpath))
         shadata = (shapipe.readline().split() or [ "" ])[0]
         shapipe.close()
     except OSError:





More information about the Openembedded-commits mailing list