From 6b85b9f617ef266d794891217780c951d5ff6081 Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Tue, 11 Oct 2011 09:42:13 -0700 Subject: [PATCH] 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/__init__.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 71be6f4..a055faa 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/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(',') -- 2.7.4