summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2023-04-29 03:23:28 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-05-25 10:33:15 +0100
commitddc06f0a30eb4d512aa1c4b41e4a0dd8b9385d20 (patch)
tree305f9080b64072f7a7ea2bd7641ab5e2072a6225 /bitbake/lib/bb/fetch2
parent9fa2c57313c2a89918ac4f9a884fad8614151685 (diff)
downloadpoky-ddc06f0a30eb4d512aa1c4b41e4a0dd8b9385d20.tar.gz
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>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/crate.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/crate.py b/bitbake/lib/bb/fetch2/crate.py
index a7021e5b36..2b8b6bc7a1 100644
--- a/bitbake/lib/bb/fetch2/crate.py
+++ b/bitbake/lib/bb/fetch2/crate.py
@@ -59,11 +59,11 @@ class Crate(Wget):
59 # version is expected to be the last token 59 # version is expected to be the last token
60 # but ignore possible url parameters which will be used 60 # but ignore possible url parameters which will be used
61 # by the top fetcher class 61 # by the top fetcher class
62 version, _, _ = parts[len(parts) -1].partition(";") 62 version = parts[-1].split(";")[0]
63 # second to last field is name 63 # second to last field is name
64 name = parts[len(parts) - 2] 64 name = parts[-2]
65 # host (this is to allow custom crate registries to be specified 65 # host (this is to allow custom crate registries to be specified
66 host = '/'.join(parts[2:len(parts) - 2]) 66 host = '/'.join(parts[2:-2])
67 67
68 # if using upstream just fix it up nicely 68 # if using upstream just fix it up nicely
69 if host == 'crates.io': 69 if host == 'crates.io':