[yocto] [PATCH 3/3] PublishArtifacts: add md5sums artifact

Jate S jatedev at gmail.com
Fri Jun 6 14:06:50 PDT 2014


I just grabbed the current master.

I changed my local conf definition so it would do the MakeImageMD5s.
It creates them inside of the build directory by default.

After doing this, the PublishArtifacts was still failing because the
cp command could not find the md5sum files. It looks in the
tmp/deploy/images directory.

I applied this patch so that the MakeImageMD5s step would generate
them in the temp/deploy/images directory and allow the PublishArtifact
build step to work.

diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/MakeImageMD5s.py
index 84839fb..7bfb2b3 100644
--- a/lib/python2.7/site-packages/autobuilder/buildsteps/MakeImageMD5s.py
+++ b/lib/python2.7/site-packages/autobuilder/buildsteps/MakeImageMD5s.py
@@ -35,7 +35,7 @@ class MakeImageMD5s(ShellCommand):
         command=""
         if str(os.environ.get('PUBLISH_BUILDS')) == "True":
             command = command + "for x in `find build/tmp/deploy/images -type f
-            command = command + "filenm=`basename $x`; md5sum $x >> $filenm.md5
+            command = command + "md5sum $x >> $x.md5sum; done"
         else:
             command="echo 'Not publishing build, skipping step'"
         self.command = command

After seeing this patch, I wonder if this should be applied to
PublishArtifacts now.

- Jate S.

On Tue, Jun 3, 2014 at 9:03 PM, Lynn 'Cyrin' Conway <lynncyrin at gmail.com> wrote:
> REF: Bug ID 6354
>
> Added a md5sums artifact into PublishArtifacts
>
> Signed-off-by: Lynn 'Cyrin' Conway <lynncyrin at gmail.com>
> ---
>  .../autobuilder/buildsteps/PublishArtifacts.py     |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/PublishArtifacts.py b/lib/python2.7/site-packages/autobuilder/buildsteps/PublishArtifacts.py
> index db86ec2..bb69d18 100644
> --- a/lib/python2.7/site-packages/autobuilder/buildsteps/PublishArtifacts.py
> +++ b/lib/python2.7/site-packages/autobuilder/buildsteps/PublishArtifacts.py
> @@ -180,6 +180,10 @@ class PublishArtifacts(ShellCommand):
>                      command=command+"cp -R --no-dereference " + \
>                                       os.path.join(self.basedir, "conf/") + \
>                                       "/* " + DEST + "/" + MACHINE_PUBLISH_DIR + "/" + artifact_name + "/conf;"
> +                elif artifact == "md5sums":
> +                    artifact_name, deploy_image_dir = self.getDeployNames(artifact, buildername)
> +                    command = command + "for x in `find " + deploy_image_dir + " -type f`; do "
> +                    command = command + "filenm=`basename $x`; md5sum $x >> $filenm.md5sum; done"
>                  elif artifact == "None":
>                      command=command+"echo 'Skipping copy of " + artifact + ".'"
>                  else:
> @@ -216,7 +220,7 @@ class PublishArtifacts(ShellCommand):
>              artifact_name = artifact_name + "-lsb"
>          if self.layerversion_core is not None and int(self.layerversion_core) > 2:
>              deploy_dir_image = os.path.join(os.path.join(self.basedir, "tmp/deploy/images/"), artifact)
> -        else:
> +        else:1
>              deploy_dir_image = os.path.join(self.basedir, "tmp/deploy/images/")
>          return artifact_name, deploy_dir_image
>
> --
> 1.7.9.5
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



More information about the yocto mailing list