mirror of
git://git.yoctoproject.org/poky
synced 2026-08-14 12:39:20 +00:00
xmlcatalog: new class to update the XML catalogue
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 (From OE-Core rev: 28c58cff76b24cea2745352c6557a81c04d85138) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
2958dbfcc1
commit
ec43872af5
24
meta/classes/xmlcatalog.bbclass
Normal file
24
meta/classes/xmlcatalog.bbclass
Normal file
@ -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
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user