[gnome-continuous-yocto/gnomeostree-3.28-rocko: 5840/8267] base: Simplify BASEDEPENDS construction
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 5840/8267] base: Simplify BASEDEPENDS construction
- Date: Sun, 17 Dec 2017 04:00:15 +0000 (UTC)
commit 558807cc30922dbcabe732662ab7f5230a7b3843
Author: Richard Purdie <richard purdie linuxfoundation org>
Date: Wed May 11 16:29:05 2016 +0100
base: Simplify BASEDEPENDS construction
This code dates from distant times before we had class overrides.
The comments are also rather stale. Rewrite this code using class
overrides which makes it safer, more modern and more easily
understandable.
(From OE-Core rev: fb3b160a6bf20a601d6cecf3f06a2b71c03fa91f)
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/classes/base.bbclass | 25 +++++++++----------------
meta/classes/gettext.bbclass | 2 +-
2 files changed, 10 insertions(+), 17 deletions(-)
---
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index d95afb7..7892665 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -61,22 +61,15 @@ oe_runmake() {
def base_dep_prepend(d):
- #
- # Ideally this will check a flag so we will operate properly in
- # the case where host == build == target, for now we don't work in
- # that case though.
- #
+ if d.getVar('INHIBIT_DEFAULT_DEPS', False):
+ return ""
+ return "${BASE_DEFAULT_DEPS}"
- deps = ""
- # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not
- # we need that built is the responsibility of the patch function / class, not
- # the application.
- if not d.getVar('INHIBIT_DEFAULT_DEPS', False):
- if (d.getVar('HOST_SYS') != d.getVar('BUILD_SYS')):
- deps += " virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc "
- return deps
+BASE_DEFAULT_DEPS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}compilerlibs virtual/libc"
-BASEDEPENDS = "${@base_dep_prepend(d)}"
+BASEDEPENDS = ""
+BASEDEPENDS_class-target = "${@base_dep_prepend(d)}"
+BASEDEPENDS_class-nativesdk = "${@base_dep_prepend(d)}"
DEPENDS_prepend="${BASEDEPENDS} "
diff --git a/meta/classes/gettext.bbclass b/meta/classes/gettext.bbclass
index 0be1424..d60a0c1 100644
--- a/meta/classes/gettext.bbclass
+++ b/meta/classes/gettext.bbclass
@@ -15,5 +15,5 @@ def gettext_oeconf(d):
DEPENDS_GETTEXT ??= "virtual/gettext gettext-native"
-BASEDEPENDS =+ "${@gettext_dependencies(d)}"
+BASEDEPENDS_append = " ${@gettext_dependencies(d)}"
EXTRA_OECONF_append = " ${@gettext_oeconf(d)}"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]