Skip to contentSkip to conversation

buildtools-tarball: add nativesdk-libxml2-utils

PATCH New Chen Qi 1 participant 3 messages Jul 10, 2019

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

v2 cover buildtools-tarball: add nativesdk-libxml2-utils

Changes in V2:
* Let xmlcatalog.bbclass hold 'libxml2-native' dependency.

The following changes since commit 2a6094ca8c4aa5c00636df77669e5bca6ad52bcf:

oeqa/bbtests: Tweak test bitbake output pattern matching (2019-07-09 23:30:44 +0100)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib ChenQi/buildtools-xmlcatalog
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/buildtools-xmlcatalog

Chen Qi (2):
buildtools-tarball: add nativesdk-libxml2-utils
xmlcatalog: hold libxml2-native dependency

 meta/classes/xmlcatalog.bbclass                                     | 2 ++
 meta/conf/bitbake.conf                                              | 3 +++
 meta/recipes-core/meta/buildtools-tarball.bb                        | 1 +
 meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb           | 2 --
 meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb | 2 --
 5 files changed, 6 insertions(+), 4 deletions(-)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH v2 1/2 buildtools-tarball: add nativesdk-libxml2-utils

For build-sysroots.bb, the xmlcatalog would not be in its staging directory. Causing the following error for eSDK.

ERROR: build-sysroots-1.0-r0 do_build_native_sysroot: Command '/PATH/TO/IMAGE/testsdkext/tmp/sysroots/x86_64/usr/bin/postinst-docbook-xml-dtd4-native-xmlcatalog' returned non-zero exit status 127.
ERROR: build-sysroots-1.0-r0 do_build_native_sysroot: Function failed: do_build_native_sysroot

The problem could be reproduced by the following steps.
1. Add in local.conf:
IMAGE_INSTALL_append = " btrfs-tools" DISTRO_FEATURES_append = " api-documentation" INHERIT += "testsdk"
2. bitbake core-image-minimal -c populate_sdk_ext
3. bitbake core-image-minimal -c testsdkext

So we add nativesdk-libxml2-utils to buildtools-tarball to ensure the existence of xmlcatalog. Also add it to HOSTTOOLS_NONFATAL so it could be seen by bitbake.

---
 meta/conf/bitbake.conf                       | 3 +++
 meta/recipes-core/meta/buildtools-tarball.bb | 1 +
 2 files changed, 4 insertions(+)
meta/conf/bitbake.conf +3 -0
index 5e93f5c..2f64eae 100644
@@ -517,6 +517,9 @@ HOSTTOOLS_NONFATAL += "scp"
 # Link to git-lfs if present
 HOSTTOOLS_NONFATAL += "git-lfs"
 
+# build-sysroot needs xmlcatalog in order for eSDK installation
+HOSTTOOLS_NONFATAL += "xmlcatalog"
+
 CCACHE ??= ""
 
 TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
meta/recipes-core/meta/buildtools-tarball.bb +1 -0
index 91df6f1..d39d6f7 100644
@@ -25,6 +25,7 @@ TOOLCHAIN_HOST_TASK ?= "\
     nativesdk-texinfo \
     nativesdk-libnss-nis \
     nativesdk-rpcsvc-proto \
+    nativesdk-libxml2-utils \
     "
 
 MULTIMACH_TARGET_SYS = "${SDK_ARCH}-nativesdk${SDK_VENDOR}-${SDK_OS}"
Signature · 1 line
1.9.1
author
#2 lore raw

PATCH v2 2/2 xmlcatalog: hold libxml2-native dependency

In reply to Chen Qi

Put libxml2-native dependency in this class and remove it from recipes inheriting this class.

In fact, if a recipe inherits this class and does not have libxml2-native, the xmlcatalog_sstate_postinst would fail.

---
 meta/classes/xmlcatalog.bbclass                                     | 2 ++
 meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb           | 2 --
 meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb | 2 --
 3 files changed, 2 insertions(+), 4 deletions(-)
meta/classes/xmlcatalog.bbclass +2 -0
index 075aef8..ae4811f 100644
@@ -1,3 +1,5 @@
+DEPENDS = "libxml2-native"
+
 # A whitespace-separated list of XML catalogs to be registered, for example
 # "${sysconfdir}/xml/docbook-xml.xml".
 XMLCATALOGS ?= ""
meta/recipes-devtools/docbook-xml/docbook-xml-dtd4_4.5.bb +0 -2
index 4b6a28e..6452c8d 100644
@@ -8,8 +8,6 @@ HOMEPAGE = "http://www.docbook.org/xml/"
 LICENSE = "OASIS"
 LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE-OASIS;md5=c608985dd5f7f215e669e7639a0b1d2e"
 
-DEPENDS = "libxml2-native"
-
 # Note: the upstream sources are not distributed with a license file.
 # LICENSE-OASIS is included as a "patch" to workaround this. When
 # upgrading this recipe, please verify whether this is still needed.
meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.79.1.bb +0 -2
index ff38e87..c5d3a24 100644
@@ -14,8 +14,6 @@ UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/docbook/files/docbook-xsl/
 # Reject versions ending in .0 as those are release candidates
 UPSTREAM_CHECK_REGEX = "/docbook-xsl/(?P<pver>(\d+[\.\-_]*)+(?!\.0)\.\d+)/"
 
-DEPENDS = "libxml2-native"
-
 S = "${WORKDIR}/docbook-xsl-${PV}"
 
 inherit allarch xmlcatalog
Signature · 1 line
1.9.1