summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/openjade
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/openjade
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/openjade')
-rw-r--r--meta/recipes-devtools/openjade/openjade-native_1.3.2.bb19
1 files changed, 9 insertions, 10 deletions
diff --git a/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb b/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb
index afcb8ca13a..8b15b0c7ec 100644
--- a/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb
+++ b/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb
@@ -48,7 +48,6 @@ CXXFLAGS += "-fno-tree-dse"
48 48
49SSTATEPOSTINSTFUNCS += "openjade_sstate_postinst" 49SSTATEPOSTINSTFUNCS += "openjade_sstate_postinst"
50SYSROOT_PREPROCESS_FUNCS += "openjade_sysroot_preprocess" 50SYSROOT_PREPROCESS_FUNCS += "openjade_sysroot_preprocess"
51CLEANFUNCS += "openjade_sstate_clean"
52 51
53# configure.in needs to be reloacted to trigger reautoconf 52# configure.in needs to be reloacted to trigger reautoconf
54do_extraunpack () { 53do_extraunpack () {
@@ -104,6 +103,15 @@ openjade_sstate_postinst() {
104 ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-openjade \ 103 ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-openjade \
105 --add ${sysconfdir}/sgml/sgml-docbook.cat \ 104 --add ${sysconfdir}/sgml/sgml-docbook.cat \
106 ${sysconfdir}/sgml/openjade-${PV}.cat 105 ${sysconfdir}/sgml/openjade-${PV}.cat
106 cat << EOF > ${SSTATE_INST_POSTRM}
107#!/bin/sh
108# Ensure that the catalog file sgml-docbook.cat is properly
109# updated when the package is removed from sstate cache.
110files="${sysconfdir}/sgml/sgml-docbook.bak ${sysconfdir}/sgml/sgml-docbook.cat"
111for f in \$files; do
112 [ ! -f \$f ] || sed -i '/\/sgml\/openjade-${PV}.cat/d' \$f
113done
114EOF
107 fi 115 fi
108} 116}
109 117
@@ -111,12 +119,3 @@ openjade_sysroot_preprocess () {
111 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ 119 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
112 install -m 755 ${STAGING_BINDIR_NATIVE}/install-catalog ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-openjade 120 install -m 755 ${STAGING_BINDIR_NATIVE}/install-catalog ${SYSROOT_DESTDIR}${bindir_crossscripts}/install-catalog-openjade
113} 121}
114
115openjade_sstate_clean () {
116 # Ensure that the catalog file sgml-docbook.cat is properly
117 # updated when the package is removed from sstate cache.
118 files="${sysconfdir}/sgml/sgml-docbook.bak ${sysconfdir}/sgml/sgml-docbook.cat"
119 for f in $files; do
120 [ ! -f $f ] || sed -i '/\/sgml\/openjade-${PV}.cat/d' $f
121 done
122}