[yocto] [yocto-autobuilder][PATCH 1/2] PublishArtifacts.py: create md5sum files in same dir as artifacts

Bill Randle william.c.randle at intel.com
Wed Jul 6 13:16:39 PDT 2016


Previously all the md5sum files got put into the top level deploy directory.
This patch keeps the md5sum file in the same directory as the file it is
hashing. It also limits the traversal depth to five, to avoid hashing the
wic components that go into making the wic images.

Signed-off-by: Bill Randle <william.c.randle at intel.com>
---
 .../site-packages/autobuilder/buildsteps/PublishArtifacts.py         | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/PublishArtifacts.py b/lib/python2.7/site-packages/autobuilder/buildsteps/PublishArtifacts.py
index 111dad7..952a458 100644
--- a/lib/python2.7/site-packages/autobuilder/buildsteps/PublishArtifacts.py
+++ b/lib/python2.7/site-packages/autobuilder/buildsteps/PublishArtifacts.py
@@ -233,9 +233,8 @@ class PublishArtifacts(ShellCommand):
     def generateMD5cmd(self, artifact, deploy_dir):
         cmd = ""
         if os.environ.get('GEN_IMG_MD5') == "True":
-            cmd += "for x in `find " + deploy_dir + " -type f`;"
-            cmd += "do fname=`basename $x`;"
-            cmd += "md5sum $x >> " + deploy_dir + "/$fname.md5sum; done;"
+            cmd += "for x in `find " + deploy_dir + " -type f -maxdepth 5`;"
+            cmd += "do md5sum $x >> " + "$x.md5sum; done;"
         return cmd
 
     def getDeployNames(self, artifact, buildername):
-- 
2.5.5




More information about the yocto mailing list