summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/docbook-sgml-dtd
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2014-03-12 05:58:47 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-17 14:01:42 +0000
commit3c70ad664685716d8d805aebf211daff4a062d1a (patch)
treeb94d4dfa1db03361a588a7c8e0414c46e690e93f /meta/recipes-devtools/docbook-sgml-dtd
parent5760485c6f9797c8c046d5eed4924ff792226269 (diff)
downloadpoky-3c70ad664685716d8d805aebf211daff4a062d1a.tar.gz
docbook-sgml-dtd-native: remove catalog file when do_clean
The docbook_sgml_dtd_sstate_postinst adds catalog file to /etc/sgml/sgml-docbook.cat and sgml-docbook.bak, but the do_clean would not remove the file, which would cause unexpected errors since we have multiple versions of docbook-sgml-dtd: docbook-sgml-dtd-3.1-native_3.1.bb docbook-sgml-dtd-4.1-native_4.1.bb docbook-sgml-dtd-4.5-native.bb If we run: $ bitbake docbook-sgml-dtd-4.1-native $ bitbake docbook-sgml-dtd-4.1-native -ccleansstate && bitbake docbook-sgml-dtd-3.1-native $ bitbake docbook-utils-native We would get this error: jade: cannot open "/path/to/etc/sgml/sgml-docbook-dtd-4.1.cat" (No such file or directory) make[2]: *** [sgmldiff.html] Error 1 Remove the catalog entry when do_clean will fix the problem. [YOCTO #5949] (From OE-Core rev: 87df114982db7a94fce8622b15458bbe2d2ddacc) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/docbook-sgml-dtd')
-rw-r--r--meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc b/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc
index 1b357b5368..b2381bd7d1 100644
--- a/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc
+++ b/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-native.inc
@@ -58,3 +58,15 @@ docbook_sgml_dtd_sysroot_preprocess () {
58 install -m 755 ${STAGING_BINDIR_NATIVE}/install-catalog ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-sgml-dtd-${DTD_VERSION} 58 install -m 755 ${STAGING_BINDIR_NATIVE}/install-catalog ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-docbook-sgml-dtd-${DTD_VERSION}
59} 59}
60 60
61CLEANFUNCS += "docbook_sgml_dtd_sstate_clean"
62
63docbook_sgml_dtd_sstate_clean () {
64 # Ensure that the catalog file sgml-docbook.cat is properly
65 # updated when the package is removed from sstate cache.
66 if [ -f ${sysconfdir}/sgml/sgml-docbook.bak ]; then
67 sed -i '/'"\/sgml\/sgml-docbook-dtd-${DTD_VERSION}.cat"'/d' \
68 ${sysconfdir}/sgml/sgml-docbook.bak
69 sed -i '/'"\/sgml\/sgml-docbook-dtd-${DTD_VERSION}.cat"'/d' \
70 ${sysconfdir}/sgml/sgml-docbook.cat
71 fi
72}