aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/sgml-common
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2013-10-31 14:00:12 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-01 11:08:31 +0000
commit0636093711547957a8f5b25322bd3e0da367cfc4 (patch)
tree7b11c81c4e8023f580c48603f5efd20899efbe96 /meta/recipes-devtools/sgml-common
parent4facf4df0bc0d71d11ba53737faff6f2c6e5863b (diff)
downloadopenembedded-core-contrib-0636093711547957a8f5b25322bd3e0da367cfc4.tar.gz
sgml-common: make postinst run successfully at rootfs time
Take $D into consideration and make postinst run successfully at rootfs time. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-devtools/sgml-common')
-rw-r--r--meta/recipes-devtools/sgml-common/sgml-common_0.6.3.bb16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/recipes-devtools/sgml-common/sgml-common_0.6.3.bb b/meta/recipes-devtools/sgml-common/sgml-common_0.6.3.bb
index 43553795f1..6098673a35 100644
--- a/meta/recipes-devtools/sgml-common/sgml-common_0.6.3.bb
+++ b/meta/recipes-devtools/sgml-common/sgml-common_0.6.3.bb
@@ -32,6 +32,7 @@ do_compile_append() {
FILES_${PN} += "${datadir}/sgml"
pkg_postinst_${PN}() {
+ if [ "x$D" = "x" ]; then
install-catalog \
--add ${sysconfdir}/sgml/sgml-ent.cat \
${datadir}/sgml/sgml-iso-entities-8879.1986/catalog
@@ -39,6 +40,21 @@ pkg_postinst_${PN}() {
install-catalog \
--add ${sysconfdir}/sgml/sgml-docbook.cat \
${sysconfdir}/sgml/sgml-ent.cat
+ else
+ if ! grep -q ${datadir}/sgml/sgml-iso-entities-8879.1986/catalog $D${sysconfdir}/sgml/sgml-ent.cat; then
+ echo "CATALOG ${datadir}/sgml/sgml-iso-entities-8879.1986/catalog" >> $D${sysconfdir}/sgml/sgml-ent.cat
+ fi
+ if ! grep -q ${sysconfdir}/sgml/sgml-ent.cat $D${sysconfdir}/sgml/catalog; then
+ echo "CATALOG ${sysconfdir}/sgml/sgml-ent.cat" >> $D${sysconfdir}/sgml/catalog
+ fi
+
+ if ! grep -q ${sysconfdir}/sgml/sgml-ent.cat $D${sysconfdir}/sgml/sgml-docbook.cat; then
+ echo "CATALOG ${sysconfdir}/sgml/sgml-ent.cat" >> $D${sysconfdir}/sgml/sgml-docbook.cat
+ fi
+ if ! grep -q ${sysconfdir}/sgml/sgml-docbook.cat $D${sysconfdir}/sgml/catalog; then
+ echo "CATALOG ${sysconfdir}/sgml/sgml-docbook.cat" >> $D${sysconfdir}/sgml/catalog
+ fi
+ fi
}
pkg_postrm_${PN}() {