mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 13:09:50 +00:00
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>
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
##
|
||||
|
||||
# add crate fetch support
|
||||
inherit crate-fetch
|
||||
inherit rust-common
|
||||
|
||||
# Where we download our registry and dependencies to
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
#
|
||||
# crate-fetch class
|
||||
#
|
||||
# Registers 'crate' method for Bitbake fetch2.
|
||||
#
|
||||
# Adds support for following format in recipe SRC_URI:
|
||||
# crate://<packagename>/<version>
|
||||
#
|
||||
|
||||
def import_crate(d):
|
||||
import crate
|
||||
if not getattr(crate, 'imported', False):
|
||||
bb.fetch2.methods.append(crate.Crate())
|
||||
crate.imported = True
|
||||
|
||||
python crate_import_handler() {
|
||||
import_crate(d)
|
||||
}
|
||||
|
||||
addhandler crate_import_handler
|
||||
crate_import_handler[eventmask] = "bb.event.RecipePreFinalise"
|
||||
|
||||
def crate_get_srcrev(d):
|
||||
import_crate(d)
|
||||
return bb.fetch2.get_srcrev(d)
|
||||
|
||||
# Override SRCPV to make sure it imports the fetcher first
|
||||
SRCPV = "${@crate_get_srcrev(d)}"
|
||||
Reference in New Issue
Block a user