Skip to contentSkip to conversation

Avoid parse time errors due to dependency on x11, for distros without x11

PATCH In review Jens Rehsack 2 participants 2 messages Oct 28, 2015 – Oct 29, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 Avoid parse time errors due to dependency on x11, for distros without x11

BitBake raises some errors when processing recipes that depend on x11 for distros that don't have x11 in DISTRO_FEATURES. To work around that issue, REQUIRED_DISTRO_FEATURES = "x11" (from distro_features_check.bbclass) has been set for the following recipes:

* cacao (_class-target)
* classpath (_class-target)
* jamvm (_class-target)
* openjdk-7-release

That makes BitBake skip those recipes during the cache generation (they'd still be parsed, but ignored).

This patch improves the idea from Mario Domenech Goulart <[email protected]>

---
 recipes-core/cacao/cacao_1.6.1.bb             | 1 +
 recipes-core/classpath/classpath.inc          | 4 +---
 recipes-core/classpath/classpath_0.99.bb      | 4 ++++
 recipes-core/jamvm/jamvm.inc                  | 4 +---
 recipes-core/jamvm/jamvm_git.bb               | 4 ++++
 recipes-core/openjdk/openjdk-7_91b01-2.6.2.bb | 4 ++++
 recipes-core/openjdk/openjdk-common.inc       | 4 +---
 7 files changed, 16 insertions(+), 9 deletions(-)
recipes-core/cacao/cacao_1.6.1.bb +1 -0
index 564dd1e..f88293b 100644
@@ -18,6 +18,7 @@ SRC_URI[sha256sum] = "eecc8bd1b528a028f43d9d1d0c06b97855bbf1d40e03826d911ebbc0b6
 inherit java autotools-brokensep update-alternatives pkgconfig distro_features_check
 
 REQUIRED_DISTRO_FEATURES = "x11"
+REQUIRED_DISTRO_FEATURES_class-native := ""
 
 EXTRA_OECONF_class-native = "\
     --enable-debug \
recipes-core/classpath/classpath.inc +1 -3
index 0f760fe..1bdfd78 100644
@@ -7,9 +7,7 @@ LICENSE = "Classpath"
 
 PBN = "classpath"
 
-inherit autotools java gettext distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "x11"
+inherit autotools java gettext
 
 DEPENDS = "virtual/javac-native fastjar-native zip-native gmp antlr-native gtk+ gconf libxtst file"
 
recipes-core/classpath/classpath_0.99.bb +4 -0
index 8b3a6e3..6aa3baa 100644
@@ -1,5 +1,9 @@
 require classpath.inc
 
+inherit distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
 LIC_FILES_CHKSUM = "file://LICENSE;md5=92acc79f1f429143f4624d07b253702a"
 
 SRC_URI += " \
recipes-core/jamvm/jamvm.inc +1 -3
index e00813e..5893cbc 100644
@@ -21,9 +21,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/jamvm/jamvm-${PV}.tar.gz \
           "
 
 
-inherit java autotools update-alternatives pkgconfig distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "x11"
+inherit java autotools update-alternatives pkgconfig
 
 # This uses 32 bit arm, so force the instruction set to arm, not thumb
 ARM_INSTRUCTION_SET = "arm"
recipes-core/jamvm/jamvm_git.bb +4 -0
index 07eed6a..63364aa 100644
@@ -3,6 +3,10 @@
 
 require jamvm.inc
 
+inherit distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
 SRCREV = "ebd11bde0a97b57f0d18938c6b65468d3c932719"
 PV = "1.5.5+1.6.0-devel+git${SRCPV}"
 
recipes-core/openjdk/openjdk-7_91b01-2.6.2.bb +4 -0
index 2cc79d1..df91e4d 100644
@@ -1,5 +1,9 @@
 require openjdk-7-release-91b01.inc
 
+inherit distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
 PR = "${INC_PR}.1"
 
 SRC_URI[iced.md5sum] = "a16b3e800030db9d9b35f80dfd11883a"
recipes-core/openjdk/openjdk-common.inc +1 -3
index e3e597a..dc26522 100644
@@ -17,9 +17,7 @@ DEPENDS_append_libc-uclibc = " virtual/libiconv "
 # because structure sizes and/or alignment may differ.
 DEPENDS_append = " qemu-native "
 
-inherit java autotools gettext qemu pkgconfig distro_features_check
-
-REQUIRED_DISTRO_FEATURES = "x11"
+inherit java autotools gettext qemu pkgconfig
 
 # OpenJDK uses slightly different names for certain arches. We need to know
 #	this to create some files which are expected by the build.
Signature · 5 lines
1.9.1


-- 
Jens Rehsack - [email protected]
Acked-by on v1 1/4
#1 lore raw
Quoted 11 lines · Jens Rehsack

BitBake raises some errors when processing recipes that depend on x11 for distros that don't have x11 in DISTRO_FEATURES. To work around that issue, REQUIRED_DISTRO_FEATURES = "x11" (from distro_features_check.bbclass) has been set for the following recipes:

* cacao (_class-target)
* classpath (_class-target)
* jamvm (_class-target)
* openjdk-7-release

Quoted 6 lines

That makes BitBake skip those recipes during the cache generation (they'd still be parsed, but ignored).

This patch improves the idea from Mario Domenech Goulart <[email protected]>

Successfully tested this patch with OpenJDK 7u91b01 for a ARM Cortex A9 target with VFP & X11.

So feel free to add