Make the fetcher expand checksums
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | fetch2: Make SRC_URI[md5sum] and SRC_URI[sha256sum] expand their valuesbitbake/ | +2 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/1] Make the fetcher expand checksums
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(-)
Signature · 1 line
2.1.0