diff options
author | Joshua Lock <josh@linux.intel.com> | 2011-10-11 09:42:13 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-10-24 17:35:42 +0100 |
commit | cd1b27291d4af5dfe8e66ca09d4fede341921ea0 (patch) | |
tree | 23253124534c7e57b11a776718f07d45ec3e22cc /bitbake/lib/bb | |
parent | 64a54dbd73767f7641bbb9462f0f1d01c2316132 (diff) | |
download | poky-cd1b27291d4af5dfe8e66ca09d4fede341921ea0.tar.gz |
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]
(Bitbake rev: 5f8f923b76722c9b6c7ffbe19e94df50f900155f)
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 71be6f4b94..a055faaf19 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -562,8 +562,14 @@ class FetchData(object): | |||
562 | else: | 562 | else: |
563 | self.md5_name = "md5sum" | 563 | self.md5_name = "md5sum" |
564 | self.sha256_name = "sha256sum" | 564 | self.sha256_name = "sha256sum" |
565 | self.md5_expected = bb.data.getVarFlag("SRC_URI", self.md5_name, d) | 565 | if self.md5_name in self.parm: |
566 | self.sha256_expected = bb.data.getVarFlag("SRC_URI", self.sha256_name, d) | 566 | self.md5_expected = self.parm[self.md5_name] |
567 | else: | ||
568 | self.md5_expected = bb.data.getVarFlag("SRC_URI", self.md5_name, d) | ||
569 | if self.sha256_name in self.parm: | ||
570 | self.sha256_expected = self.parm[self.sha256_name] | ||
571 | else: | ||
572 | self.sha256_expected = bb.data.getVarFlag("SRC_URI", self.sha256_name, d) | ||
567 | 573 | ||
568 | self.names = self.parm.get("name",'default').split(',') | 574 | self.names = self.parm.get("name",'default').split(',') |
569 | 575 | ||