fix md5sum format able to check by 'md5sum -c'
authorGui Chen <gui.chen@intel.com>
Mon, 9 Jun 2014 03:11:19 +0000 (23:11 -0400)
committeradmin <yuhuan.yang@samsung.com>
Thu, 4 Feb 2016 10:19:37 +0000 (18:19 +0800)
use two spaces instead of ' *' as seprator in MD5SUM

Change-Id: I0f37c3366d9e0c44c82b74c78d49a9647ce477ad
Signed-off-by: Gui Chen <gui.chen@intel.com>
mic/imager/baseimager.py

index 43896bf..4e82571 100644 (file)
@@ -1175,7 +1175,7 @@ class BaseImageCreator(object):
 
         md5sum = misc.get_md5sum(image_name)
         with open(image_name + ".md5sum", "w") as f:
-            f.write("%s %s" % (md5sum, os.path.basename(image_name)))
+            f.write("%s  %s" % (md5sum, os.path.basename(image_name)))
         self.outimage.append(image_name+".md5sum")
 
     def package(self, destdir = "."):
@@ -1314,7 +1314,7 @@ class BaseImageCreator(object):
                 # There needs to be two spaces between the sum and
                 # filepath to match the syntax with md5sum.
                 # This way also md5sum -c MD5SUMS can be used by users
-                wf.write("%s *%s\n" % (md5sum, f))
+                wf.write("%s  %s\n" % (md5sum, f))
 
         outimages.append("%s/MD5SUMS" % destdir)