All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua G Lock <joshua.g.lock@linux.intel.com>
To: Bill Randle <william.c.randle@intel.com>, yocto@yoctoproject.org
Subject: Re: [yocto-autobuilder][PATCH] PublishArtifacts.py: generate md5sums for buildtools
Date: Wed, 17 Aug 2016 17:07:17 +0100	[thread overview]
Message-ID: <1471450037.19448.0.camel@linux.intel.com> (raw)
In-Reply-To: <1471059899-16091-1-git-send-email-william.c.randle@intel.com>

On Fri, 2016-08-12 at 20:44 -0700, Bill Randle wrote:
> Md5sum files were not being generated for the buildtools artifacts.
> Also,
> ignore files with a .md5sum extension when doing the sum.

Pushed to master, thanks.

Joshua

> 
> Signed-off-by: Bill Randle <william.c.randle@intel.com>
> ---
>  .../autobuilder/buildsteps/PublishArtifacts.py     | 27
> ++++++++++++++--------
>  1 file changed, 18 insertions(+), 9 deletions(-)
> 
> diff --git a/lib/python2.7/site-
> packages/autobuilder/buildsteps/PublishArtifacts.py
> b/lib/python2.7/site-
> packages/autobuilder/buildsteps/PublishArtifacts.py
> index f9ff4f6..1a938fc 100644
> --- a/lib/python2.7/site-
> packages/autobuilder/buildsteps/PublishArtifacts.py
> +++ b/lib/python2.7/site-
> packages/autobuilder/buildsteps/PublishArtifacts.py
> @@ -112,9 +112,11 @@ class PublishArtifacts(ShellCommand):
>                                          os.path.join(self.tmpdir,
> "deploy/images/*.zip") + \
>                                          " " + DEST + "/" +
> BA_PUBLISH_DIR + ";"
>                  elif artifact == "buildtools-tarball":
> +                    artifact_name, deploy_image_dir =
> self.getDeployNames(artifact, buildername)
> +                    command=command+self.generateMD5cmd(artifact,
> deploy_image_dir)
>                      command=command+"mkdir -p " + DEST +
> "/buildtools;"
>                      command=command+"cp -R --no-dereference --
> preserve=links " + \
> -                                    os.path.join(self.tmpdir,
> "deploy/sdk/*buildtools*") + \
> +                                    os.path.join(deploy_image_dir,
> "*buildtools*") + \
>                                      " " + DEST + "/buildtools;"
>                  elif artifact == "rpm":
>                      command=command+"mkdir -p " + os.path.join(DEST,
> RPM_PUBLISH_DIR) + ";"
> @@ -144,22 +146,26 @@ class PublishArtifacts(ShellCommand):
>                      else:
>                          command=command+"echo 'Skipping copy of
> sstate, PUBLISH_SSTATE not set.';"
>                  elif artifact == "toolchain":
> +                    artifact_name, deploy_image_dir =
> self.getDeployNames(artifact, buildername)
> +                    command=command+self.generateMD5cmd(artifact,
> deploy_image_dir)
>                      command=command+"mkdir -p " + os.path.join(DEST,
> X86TC_PUBLISH_DIR) + ";"
>                      command=command+"cp -R --no-dereference --
> preserve=links " + \
> -                                    os.path.join(self.tmpdir,
> "deploy/sdk/poky-*i686-core-image*.sh ") + \
> +                                    os.path.join(deploy_image_dir,
> "poky-*i686-core-image*.sh ") + \
>                                      os.path.join(DEST,
> X86TC_PUBLISH_DIR) + ";"
>                      command=command+"mkdir -p " + os.path.join(DEST,
> X8664TC_PUBLISH_DIR) + ";"
>                      command=command+"cp -R --no-dereference --
> preserve=links " + \
> -                                    os.path.join(self.tmpdir,
> "deploy/sdk/poky-*x86_64-core-image*.sh ") + \
> +                                    os.path.join(deploy_image_dir,
> "poky-*x86_64-core-image*.sh ") + \
>                                      os.path.join(DEST,
> X8664TC_PUBLISH_DIR) + ";"
>                  elif artifact == "uninative":
> +                    artifact_name, deploy_image_dir =
> self.getDeployNames(artifact, buildername)
> +                    command=command+self.generateMD5cmd(artifact,
> deploy_image_dir)
>                      command=command+"mkdir -p " + os.path.join(DEST,
> X86TC_PUBLISH_DIR) + ";"
>                      command=command+"cp -R --no-dereference --
> preserve=links " + \
> -                                    os.path.join(self.tmpdir,
> "deploy/sdk/i686-nativesdk-libc* ") + \
> +                                    os.path.join(deploy_image_dir,
> "i686-nativesdk-libc* ") + \
>                                      os.path.join(DEST,
> X86TC_PUBLISH_DIR) + ";"
>                      command=command+"mkdir -p " + os.path.join(DEST,
> X8664TC_PUBLISH_DIR) + ";"
>                      command=command+"cp -R --no-dereference --
> preserve=links " + \
> -                                    os.path.join(self.tmpdir,
> "deploy/sdk/x86_64-nativesdk-libc* ") + \
> +                                    os.path.join(deploy_image_dir,
> "x86_64-nativesdk-libc* ") + \
>                                      os.path.join(DEST,
> X8664TC_PUBLISH_DIR) + ";"
>                  elif artifact == "oe-toolchain":
>                      command=command+"mkdir -p " + os.path.join(DEST,
> X86TC_PUBLISH_DIR) + ";"
> @@ -209,7 +215,7 @@ class PublishArtifacts(ShellCommand):
>                                       os.path.join(self.basedir,
> "conf/") + \
>                                       "/* " + DEST + "/" +
> MACHINE_PUBLISH_DIR + "/" + artifact_name + "/conf;"
>                  elif artifact == "md5sums":
> -                    command = command + "echo 'MD5sums are generated
> and deployed from the image artifact';"
> +                    command = command + "echo 'MD5sums are generated
> and deployed from the image or toolchain artifact';"
>                  elif artifact == "None":
>                      command=command+"echo 'Skipping copy of " +
> artifact + ".';"
>                  else:
> @@ -248,8 +254,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
> -maxdepth 5`;"
> -            cmd += "do md5sum $x >> " + "$x.md5sum; done;"
> +            cmd += "for x in `find " + deploy_dir + " -maxdepth 5
> -type f`;"
> +            cmd += "do if [[ $x != *.md5sum ]]; then md5sum $x >> "
> + "$x.md5sum; fi; done;"
>          return cmd
>  
>      def getDeployNames(self, artifact, buildername):
> @@ -258,8 +264,11 @@ class PublishArtifacts(ShellCommand):
>              artifact_name = artifact_name + "-lsb"
>          if "-wic" in buildername:
>              deploy_dir_image =
> os.path.join(os.path.join(self.tmpdir, "deploy/wic_images/"),
> artifact)
> -        elif artifact_name is "md5sums":
> +        elif artifact_name == "md5sums":
>              deploy_dir_image = os.path.join(self.tmpdir,
> "deploy/images/")
> +        elif artifact_name == "uninative" or artifact_name ==
> "buildtools-tarball" \
> +          or artifact_name == "toolchain":
> +            deploy_dir_image = os.path.join(self.tmpdir,
> "deploy/sdk/")
>          else:
>              if self.layerversion_core is not None and
> int(self.layerversion_core) > 2:
>                  deploy_dir_image =
> os.path.join(os.path.join(self.tmpdir, "deploy/images/"), artifact)


      reply	other threads:[~2016-08-17 16:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-13  3:44 [yocto-autobuilder][PATCH] PublishArtifacts.py: generate md5sums for buildtools Bill Randle
2016-08-17 16:07 ` Joshua G Lock [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1471450037.19448.0.camel@linux.intel.com \
    --to=joshua.g.lock@linux.intel.com \
    --cc=william.c.randle@intel.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.