From: Ross Burton <ross.burton@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH v2 1/9] xmlcatalog: new class to update the XML catalogue
Date: Thu, 4 Apr 2019 23:16:36 +0100 [thread overview]
Message-ID: <20190404221644.20496-1-ross.burton@intel.com> (raw)
This is a new class to handle recipes that need to add/remove entries in the XML
Catalog(ue)[1]. In the future it will handle updating the catalogue on the
target, but the immediate requirement is during the build so currently this only
works with native recipes.
Note that as this is a new class and target use hasn't been implemented yet, it
is possible that the behaviour of this class will change.
[1] https://en.wikipedia.org/wiki/XML_catalog
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/classes/xmlcatalog.bbclass | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 meta/classes/xmlcatalog.bbclass
diff --git a/meta/classes/xmlcatalog.bbclass b/meta/classes/xmlcatalog.bbclass
new file mode 100644
index 00000000000..075aef8c0c4
--- /dev/null
+++ b/meta/classes/xmlcatalog.bbclass
@@ -0,0 +1,24 @@
+# A whitespace-separated list of XML catalogs to be registered, for example
+# "${sysconfdir}/xml/docbook-xml.xml".
+XMLCATALOGS ?= ""
+
+SYSROOT_PREPROCESS_FUNCS_append = " xmlcatalog_sstate_postinst"
+
+xmlcatalog_complete() {
+ ROOTCATALOG="${STAGING_ETCDIR_NATIVE}/xml/catalog"
+ if [ ! -f $ROOTCATALOG ]; then
+ mkdir --parents $(dirname $ROOTCATALOG)
+ xmlcatalog --noout --create $ROOTCATALOG
+ fi
+ for CATALOG in ${XMLCATALOGS}; do
+ xmlcatalog --noout --add nextCatalog unused file://$CATALOG $ROOTCATALOG
+ done
+}
+
+xmlcatalog_sstate_postinst() {
+ mkdir -p ${SYSROOT_DESTDIR}${bindir}
+ dest=${SYSROOT_DESTDIR}${bindir}/postinst-${PN}-xmlcatalog
+ echo '#!/bin/sh' > $dest
+ echo '${xmlcatalog_complete}' >> $dest
+ chmod 0755 $dest
+}
--
2.11.0
next reply other threads:[~2019-04-04 22:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-04 22:16 Ross Burton [this message]
2019-04-04 22:16 ` [PATCH v2 2/9] docbook-xml: use xmlcatalog class Ross Burton
2019-04-04 22:16 ` [PATCH v2 3/9] docbook-xsl: neaten documentation Ross Burton
2019-04-04 22:16 ` [PATCH v2 4/9] docbook-xsl: use xmlcatalog Ross Burton
2019-04-04 22:16 ` [PATCH v2 5/9] libxslt: update for new catalog path Ross Burton
2019-04-04 22:16 ` [PATCH v2 6/9] asciidoc: use correct XML " Ross Burton
2019-04-05 21:53 ` Khem Raj
2019-04-04 22:16 ` [PATCH v2 7/9] xmlto: remove XML catalog Ross Burton
2019-04-04 22:16 ` [PATCH v2 8/9] xmlto: clean up RDEPENDS Ross Burton
2019-04-04 22:16 ` [PATCH v2 9/9] gtk+: update for new catalog path Ross Burton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190404221644.20496-1-ross.burton@intel.com \
--to=ross.burton@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.