mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 12:32:15 +02:00
bitbake: fetch2/crate: Simplify extraction of crate names and versions from URIs
(Bitbake rev: 4f2d8bcbaea33425f6de2c3c88a0beabec8a59f9) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
9fa2c57313
commit
ddc06f0a30
@@ -59,11 +59,11 @@ class Crate(Wget):
|
||||
# version is expected to be the last token
|
||||
# but ignore possible url parameters which will be used
|
||||
# by the top fetcher class
|
||||
version, _, _ = parts[len(parts) -1].partition(";")
|
||||
version = parts[-1].split(";")[0]
|
||||
# second to last field is name
|
||||
name = parts[len(parts) - 2]
|
||||
name = parts[-2]
|
||||
# host (this is to allow custom crate registries to be specified
|
||||
host = '/'.join(parts[2:len(parts) - 2])
|
||||
host = '/'.join(parts[2:-2])
|
||||
|
||||
# if using upstream just fix it up nicely
|
||||
if host == 'crates.io':
|
||||
|
||||
Reference in New Issue
Block a user