diff options
author | Enrico Scholz <enrico.scholz@sigma-chemnitz.de> | 2023-04-05 14:21:25 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-04-06 14:28:59 +0100 |
commit | b92918eb0eb25e737e2ad044323a6607c37dab28 (patch) | |
tree | 1ccf671dfdf22dc50c51c9e67726cdef13794a8c /bitbake/lib/bb/fetch2 | |
parent | 08d564bd92fc476d7f0b4a6201b752e51cf93776 (diff) | |
download | poky-b92918eb0eb25e737e2ad044323a6607c37dab28.tar.gz |
bitbake: fetch2/crate: create versioned 'name' entries
It is common for rust packages to depend on different versions of the
same crate. E.g.
| crate://crates.io/windows_x86_64_msvc/0.42.2 \
| crate://crates.io/windows_x86_64_msvc/0.48.0 \
Identification only by the plain crate name makes the sha256sum
ambiguous
| SRC_URI[windows_x86_64_msvc.sha256sum] = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
| SRC_URI[windows_x86_64_msvc.sha256sum] = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
and requires lot of manual work to fix the SRC_URI list.
Making the 'name' property unique by appending the version allows
direct copy & paste of reported sha256sum errors to complete the
crates list.
(Bitbake rev: ae2efb05196f9e29ef56ad9a84e2eae5fbdd8030)
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r-- | bitbake/lib/bb/fetch2/crate.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/crate.py b/bitbake/lib/bb/fetch2/crate.py index 590dc9c126..a7021e5b36 100644 --- a/bitbake/lib/bb/fetch2/crate.py +++ b/bitbake/lib/bb/fetch2/crate.py | |||
@@ -72,7 +72,7 @@ class Crate(Wget): | |||
72 | ud.url = "https://%s/%s/%s/download" % (host, name, version) | 72 | ud.url = "https://%s/%s/%s/download" % (host, name, version) |
73 | ud.parm['downloadfilename'] = "%s-%s.crate" % (name, version) | 73 | ud.parm['downloadfilename'] = "%s-%s.crate" % (name, version) |
74 | if 'name' not in ud.parm: | 74 | if 'name' not in ud.parm: |
75 | ud.parm['name'] = name | 75 | ud.parm['name'] = '%s-%s' % (name, version) |
76 | 76 | ||
77 | logger.debug2("Fetching %s to %s" % (ud.url, ud.parm['downloadfilename'])) | 77 | logger.debug2("Fetching %s to %s" % (ud.url, ud.parm['downloadfilename'])) |
78 | 78 | ||