diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-01-19 14:21:40 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-01-19 23:03:44 +0000 |
commit | 2a5dcb0662054c1d6bbe5ffe1c48fee10be30bd0 (patch) | |
tree | 2aaddf09a62d73803078aeb3ed01d1b1477347cc /meta/classes | |
parent | cf43eccc5c4da3e1e5bd1e20d595f4b225cf005f (diff) | |
download | poky-2a5dcb0662054c1d6bbe5ffe1c48fee10be30bd0.tar.gz |
crate-fetch: Switch to version contained in bitbake
This avoids various sstate fetch errors from weird silent failures in the sstate
archive testing code caused by lack of srcrev support in the crate fetcher.
(From OE-Core rev: 8205668a339946974b4460cf1ca7e6e7a645479b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/cargo_common.bbclass | 1 | ||||
-rw-r--r-- | meta/classes/crate-fetch.bbclass | 28 |
2 files changed, 0 insertions, 29 deletions
diff --git a/meta/classes/cargo_common.bbclass b/meta/classes/cargo_common.bbclass index 23d82aa6ab..90fad75415 100644 --- a/meta/classes/cargo_common.bbclass +++ b/meta/classes/cargo_common.bbclass | |||
@@ -9,7 +9,6 @@ | |||
9 | ## | 9 | ## |
10 | 10 | ||
11 | # add crate fetch support | 11 | # add crate fetch support |
12 | inherit crate-fetch | ||
13 | inherit rust-common | 12 | inherit rust-common |
14 | 13 | ||
15 | # Where we download our registry and dependencies to | 14 | # Where we download our registry and dependencies to |
diff --git a/meta/classes/crate-fetch.bbclass b/meta/classes/crate-fetch.bbclass deleted file mode 100644 index a7fa22b2a0..0000000000 --- a/meta/classes/crate-fetch.bbclass +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | # | ||
2 | # crate-fetch class | ||
3 | # | ||
4 | # Registers 'crate' method for Bitbake fetch2. | ||
5 | # | ||
6 | # Adds support for following format in recipe SRC_URI: | ||
7 | # crate://<packagename>/<version> | ||
8 | # | ||
9 | |||
10 | def import_crate(d): | ||
11 | import crate | ||
12 | if not getattr(crate, 'imported', False): | ||
13 | bb.fetch2.methods.append(crate.Crate()) | ||
14 | crate.imported = True | ||
15 | |||
16 | python crate_import_handler() { | ||
17 | import_crate(d) | ||
18 | } | ||
19 | |||
20 | addhandler crate_import_handler | ||
21 | crate_import_handler[eventmask] = "bb.event.RecipePreFinalise" | ||
22 | |||
23 | def crate_get_srcrev(d): | ||
24 | import_crate(d) | ||
25 | return bb.fetch2.get_srcrev(d) | ||
26 | |||
27 | # Override SRCPV to make sure it imports the fetcher first | ||
28 | SRCPV = "${@crate_get_srcrev(d)}" | ||