diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-15 11:48:39 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-15 22:56:37 +0100 |
commit | cdae3e76232110903d124195b036e4e70fb28aa4 (patch) | |
tree | 841d227b448619e012363ed9a197598631646170 /meta/recipes-devtools/sgml-common | |
parent | 2268efd0cd3ddb40870c4c424d10444ba86d2849 (diff) | |
download | openembedded-core-cdae3e76232110903d124195b036e4e70fb28aa4.tar.gz openembedded-core-cdae3e76232110903d124195b036e4e70fb28aa4.tar.bz2 openembedded-core-cdae3e76232110903d124195b036e4e70fb28aa4.zip |
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]
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.bb | 17 |
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}" SYSROOT_PREPROCESS_FUNCS += "sgml_common_native_mangle" SSTATEPOSTINSTFUNCS += "sgml_common_sstate_postinst" -CLEANFUNCS += "sgml_common_sstate_clean" - do_install_append() { # install-catalog script contains hard-coded references to @@ -59,13 +57,14 @@ sgml_common_sstate_postinst() { fi done fi - fi -} + cat << EOF > ${SSTATE_INST_POSTRM} +#!/bin/sh -sgml_common_sstate_clean () { - # Ensure that the catalog file sgml-docbook.cat is properly - # updated when the package is removed from sstate cache. - if [ -f ${sysconfdir}/sgml/sgml-docbook.cat ]; then - sed -i '/\/sgml\/sgml-ent.cat/d' ${sysconfdir}/sgml/sgml-docbook.cat +# Ensure that the catalog file sgml-docbook.cat is properly +# updated when the package is removed from sstate cache. +if [ -f ${sysconfdir}/sgml/sgml-docbook.cat ]; then + sed -i '/\/sgml\/sgml-ent.cat/d' ${sysconfdir}/sgml/sgml-docbook.cat +fi +EOF fi } |