]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
fetch2: Make SRC_URI[md5sum] and SRC_URI[sha256sum] expand their values
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Tue, 8 Mar 2016 23:53:58 +0000 (00:53 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 9 Mar 2016 22:42:26 +0000 (22:42 +0000)
For some reason, the values for SRC_URI[md5sum] and SRC_URI[sha256sum]
were not being expanded. That lead to the following code not working
as expected:

SRC_URI = "http://.../${PN}-${PV}.tar.gz"

MD5SUM = "123abc..."
SHA256SUM = "abcd1234..."

SRC_URI[md5sum] = "${MD5SUM}"
SRC_URI[sha256sum] = "${SHA256SUM}"

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/fetch2/__init__.py

index e8d3af72e89b11b11c16e800a59758c9d8d283df..f86014cbf15f84795ed8b4957b29789439fa4611 100644 (file)
@@ -1153,13 +1153,13 @@ class FetchData(object):
         elif self.type not in ["http", "https", "ftp", "ftps", "sftp"]:
             self.md5_expected = None
         else:
-            self.md5_expected = d.getVarFlag("SRC_URI", self.md5_name, False)
+            self.md5_expected = d.getVarFlag("SRC_URI", self.md5_name, True)
         if self.sha256_name in self.parm:
             self.sha256_expected = self.parm[self.sha256_name]
         elif self.type not in ["http", "https", "ftp", "ftps", "sftp"]:
             self.sha256_expected = None
         else:
-            self.sha256_expected = d.getVarFlag("SRC_URI", self.sha256_name, False)
+            self.sha256_expected = d.getVarFlag("SRC_URI", self.sha256_name, True)
         self.ignore_checksums = False
 
         self.names = self.parm.get("name",'default').split(',')