All of lore.kernel.org
 help / color / mirror / Atom feed
From: git@git.openembedded.org
To: bitbake-devel@lists.openembedded.org
Subject: Joshua Lock : fetch2: enable checksum definition as SRC_URI parameter
Date: Thu, 27 Oct 2011 07:09:22 +0000 (UTC)	[thread overview]
Message-ID: <20111027070922.1B8DB1032C@opal> (raw)

Module: bitbake.git
Branch: master
Commit: 5f8f923b76722c9b6c7ffbe19e94df50f900155f
URL:    http://git.openembedded.org/?p=bitbake.git&a=commit;h=5f8f923b76722c9b6c7ffbe19e94df50f900155f

Author: Joshua Lock <josh@linux.intel.com>
Date:   Tue Oct 11 09:42:13 2011 -0700

fetch2: enable checksum definition as SRC_URI parameter

URI parameters should be able to be defined as a parameter of the SRC_URI,
this patch enables thus for checksums.

An example;

SRC_URI = "http://pkgconfig.freedesktop.org/releases/pkg-config-${PV}.tar.gz;md5sum=a3270bab3f4b69b7dc6dbdacbcae9745;sha256sum=3ba691ee2431f32ccb8efa131e59bf23e37f122dc66791309023ca6dcefcd10e"

Addresses the remainder of [YOCTO #1399]

Signed-off-by: Joshua Lock <josh@linux.intel.com>

---

 lib/bb/fetch2/__init__.py |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 71be6f4..a055faa 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -562,8 +562,14 @@ class FetchData(object):
         else:
             self.md5_name = "md5sum"
             self.sha256_name = "sha256sum"
-        self.md5_expected = bb.data.getVarFlag("SRC_URI", self.md5_name, d)
-        self.sha256_expected = bb.data.getVarFlag("SRC_URI", self.sha256_name, d)
+        if self.md5_name in self.parm:
+            self.md5_expected = self.parm[self.md5_name]
+        else:
+            self.md5_expected = bb.data.getVarFlag("SRC_URI", self.md5_name, d)
+        if self.sha256_name in self.parm:
+            self.sha256_expected = self.parm[self.sha256_name]
+        else:
+            self.sha256_expected = bb.data.getVarFlag("SRC_URI", self.sha256_name, d)
 
         self.names = self.parm.get("name",'default').split(',')
 




                 reply	other threads:[~2011-10-27  7:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20111027070922.1B8DB1032C@opal \
    --to=git@git.openembedded.org \
    --cc=bitbake-devel@lists.openembedded.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.