From 0dbf112cf5a61151c1e51d93d4b72622b5708d0a Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Thu, 21 Mar 2024 09:57:29 +0000 Subject: [PATCH] coreos-cargo.eclass: Introduce variable to skip inherit Gentoo's cargo based ebuilds don't cross-compile well, so we need a way to inject coreos-cargo.eclass into them. Otherwise we'd need to fork the ebuilds into coreos-overlay and maintain them ourselves. The way we can do this is by sourcing the eclass from cros hooks and overriding src_unpack to call the eclass implementation. Inheriting an eclass is not allowed from hooks. Since we can't call any of the inherits a variable is introduced to skip them and EXPORT_FUNCTIONS. Signed-off-by: Jeremi Piotrowski --- .../third_party/coreos-overlay/eclass/coreos-cargo.eclass | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-cargo.eclass b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-cargo.eclass index c7076edefb..405696dc22 100644 --- a/sdk_container/src/third_party/coreos-overlay/eclass/coreos-cargo.eclass +++ b/sdk_container/src/third_party/coreos-overlay/eclass/coreos-cargo.eclass @@ -12,10 +12,12 @@ if [[ -z ${_COREOS_CARGO_ECLASS} ]]; then _COREOS_CARGO_ECLASS=1 # XXX: Don't require host dependencies to also be in the sysroot. -CATEGORY=dev-util PN=cargo inherit cargo -inherit toolchain-funcs +if [[ -z ${_COREOS_CARGO_SKIP_INHERIT} ]]; then + CATEGORY=dev-util PN=cargo inherit cargo + inherit toolchain-funcs -EXPORT_FUNCTIONS src_unpack + EXPORT_FUNCTIONS src_unpack +fi # @FUNCTION: coreos-cargo_src_unpack # @DESCRIPTION: