diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/crate.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/crate.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bitbake/lib/bb/fetch2/crate.py b/bitbake/lib/bb/fetch2/crate.py index f091200dd9..2889e39c73 100644 --- a/bitbake/lib/bb/fetch2/crate.py +++ b/bitbake/lib/bb/fetch2/crate.py | |||
@@ -56,8 +56,10 @@ class Crate(Wget): | |||
56 | if len(parts) < 5: | 56 | if len(parts) < 5: |
57 | raise bb.fetch2.ParameterError("Invalid URL: Must be crate://HOST/NAME/VERSION", ud.url) | 57 | raise bb.fetch2.ParameterError("Invalid URL: Must be crate://HOST/NAME/VERSION", ud.url) |
58 | 58 | ||
59 | # last field is version | 59 | # version is expected to be the last token |
60 | version = parts[len(parts) - 1] | 60 | # but ignore possible url parameters which will be used |
61 | # by the top fetcher class | ||
62 | version, _, _ = parts[len(parts) -1].partition(";") | ||
61 | # second to last field is name | 63 | # second to last field is name |
62 | name = parts[len(parts) - 2] | 64 | name = parts[len(parts) - 2] |
63 | # host (this is to allow custom crate registries to be specified | 65 | # host (this is to allow custom crate registries to be specified |
@@ -69,7 +71,8 @@ class Crate(Wget): | |||
69 | 71 | ||
70 | ud.url = "https://%s/%s/%s/download" % (host, name, version) | 72 | ud.url = "https://%s/%s/%s/download" % (host, name, version) |
71 | ud.parm['downloadfilename'] = "%s-%s.crate" % (name, version) | 73 | ud.parm['downloadfilename'] = "%s-%s.crate" % (name, version) |
72 | ud.parm['name'] = name | 74 | if 'name' not in ud.parm: |
75 | ud.parm['name'] = name | ||
73 | 76 | ||
74 | logger.debug2("Fetching %s to %s" % (ud.url, ud.parm['downloadfilename'])) | 77 | logger.debug2("Fetching %s to %s" % (ud.url, ud.parm['downloadfilename'])) |
75 | 78 | ||