[bitbake-devel] [PATCH 0/1] Make the fetcher expand checksums
Peter Kjellerstedt
peter.kjellerstedt at axis.com
Tue Mar 8 23:53:57 UTC 2016
We needed a way to override the checksums for a recipe from a
configuration file, e.g., local.conf. I first tried the naive:
SRC_URI_pn-myrecipe[md5sum] = "123abc..."
SRC_URI_pn-myrecipe[sha256sum] = "abcd1234..."
which of course did not work. Then I modified the recipe as:
SRC_URI = "http://.../${PN}-${PV}.tar.gz"
MD5SUM = "123abc..."
SHA256SUM = "abcd1234..."
SRC_URI[md5sum] = "${MD5SUM}"
SRC_URI[sha256sum] = "${SHA256SUM}"
which I had assumed would work, but it did not. Finally I tried:
MD5SUM = "123abc..."
SHA256SUM = "abcd1234..."
SRC_URI = "http://.../${PN}-${PV}.tar.gz;md5sum=${MD5SUM};sha256sum=${SHA256SUM}"
which actually did work.
Looking into why the second solution above did not work it turned out
that the fetcher code called d.getVarFlag("SRC_URI", ..., False),
i.e., without expanding the checksum values. I cannot see any reason
not to expand the values, so the following patch does that.
//Peter
The following changes since commit 5ac3dc76a5afc2ed35b1abfc8e330e0c580eadf0:
image.bbclass: fix incomplete .rootfs customization (2016-03-07 22:10:54 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib pkj/expand_checksums
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=pkj/expand_checksums
Peter Kjellerstedt (1):
fetch2: Make SRC_URI[md5sum] and SRC_URI[sha256sum] expand their
values
bitbake/lib/bb/fetch2/__init__.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.1.0
More information about the bitbake-devel
mailing list