summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/sgml-common
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-15 11:48:39 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-16 15:24:02 +0100
commit2a2634e10debd81bb95fe7be5df92f89d67f80e2 (patch)
treeeb32ce1a59537ec2fa5301fb95464f5e55e36c37 /meta/recipes-devtools/sgml-common
parent0573dceb7ba9488cb62e08f8e139a75e32ca33ea (diff)
downloadpoky-2a2634e10debd81bb95fe7be5df92f89d67f80e2.tar.gz
openjade/sgml-common: Add sstate postrm commands
If you bump the PR of sgml-common and openjade-native but not sgml- common-native, you will see a failure as files were removed from the sysroot but still referenced by the sgml docbook catalog. To properly handle this, the clean function needs to run at sstate removal time, the problem is that this sstate removal can happen when the metadata isn't present, so the correct removal commands are unknown. To avoid this, we need to write the commands into a "postrm" script when we install the files, this can then be executed at sstate removal time. [YOCTO #8273] (From OE-Core rev: cdae3e76232110903d124195b036e4e70fb28aa4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/sgml-common')
-rw-r--r--meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb17
1 files changed, 8 insertions, 9 deletions
diff --git a/meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb b/meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb
index 597536570d..97b308a88b 100644
--- a/meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb
+++ b/meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb
@@ -22,8 +22,6 @@ S = "${WORKDIR}/sgml-common-${PV}"
22 22
23SYSROOT_PREPROCESS_FUNCS += "sgml_common_native_mangle" 23SYSROOT_PREPROCESS_FUNCS += "sgml_common_native_mangle"
24SSTATEPOSTINSTFUNCS += "sgml_common_sstate_postinst" 24SSTATEPOSTINSTFUNCS += "sgml_common_sstate_postinst"
25CLEANFUNCS += "sgml_common_sstate_clean"
26
27 25
28do_install_append() { 26do_install_append() {
29 # install-catalog script contains hard-coded references to 27 # install-catalog script contains hard-coded references to
@@ -59,13 +57,14 @@ sgml_common_sstate_postinst() {
59 fi 57 fi
60 done 58 done
61 fi 59 fi
62 fi 60 cat << EOF > ${SSTATE_INST_POSTRM}
63} 61#!/bin/sh
64 62
65sgml_common_sstate_clean () { 63# Ensure that the catalog file sgml-docbook.cat is properly
66 # Ensure that the catalog file sgml-docbook.cat is properly 64# updated when the package is removed from sstate cache.
67 # updated when the package is removed from sstate cache. 65if [ -f ${sysconfdir}/sgml/sgml-docbook.cat ]; then
68 if [ -f ${sysconfdir}/sgml/sgml-docbook.cat ]; then 66 sed -i '/\/sgml\/sgml-ent.cat/d' ${sysconfdir}/sgml/sgml-docbook.cat
69 sed -i '/\/sgml\/sgml-ent.cat/d' ${sysconfdir}/sgml/sgml-docbook.cat 67fi
68EOF
70 fi 69 fi
71} 70}