summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2011-07-28 17:08:36 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-01 13:58:14 +0100
commit87d68520c190007869ed1877fbb40eef23763524 (patch)
tree77818ba76fe2e4f4d6e0d3ef84c3a555799057da
parentb372198fe3c9d8be18bd15545fb0bc4dd9d5aa68 (diff)
downloadopenembedded-core-87d68520c190007869ed1877fbb40eef23763524.tar.gz
openembedded-core-87d68520c190007869ed1877fbb40eef23763524.tar.bz2
openembedded-core-87d68520c190007869ed1877fbb40eef23763524.tar.xz
openembedded-core-87d68520c190007869ed1877fbb40eef23763524.zip
sgml-common-native: Read a catalog backup to repopulate sgml-docbook.cat
This reads the sgml-docbook.bak and adds the entries into sgml-docbook.cat since this occurs out of order during shared state sysroot populate. Signed-off-by: Saul Wold <sgw@linux.intel.com>
-rw-r--r--meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb18
1 files changed, 17 insertions, 1 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 2c8d874eb..af7e10427 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
@@ -13,7 +13,7 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://LICENSE-GPLv2;md5=ab8a50abe86dfc859e148baae043c89b"
SECTION = "base"
-PR = "r0"
+PR = "r1"
require sgml-common_${PV}.bb
inherit native
@@ -21,6 +21,8 @@ inherit native
S = "${WORKDIR}/sgml-common-${PV}"
SYSROOT_PREPROCESS_FUNCS += "sgml_common_native_mangle"
+SSTATEPOSTINSTFUNCS += "sgml_common_sstate_postinst"
+
do_install_append() {
# install-catalog script contains hard-coded references to
@@ -46,3 +48,17 @@ sgml_common_native_mangle () {
# Remove ${D} path from catalog file created by install-catalog script
sed -i -e "s|${D}||g" ${SYSROOT_DESTDIR}${sysconfdir}/sgml/catalog
}
+
+sgml_common_sstate_postinst() {
+ if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
+ then
+ if [ -e ${sysconfdir}/sgml/sgml-docbook.bak ]; then
+ for catalog in `awk '{print $2}' ${sysconfdir}/sgml/sgml-docbook.bak`; do
+ if [ ! `grep $catalog ${sysconfdir}/sgml/sgml-docbook.cat 1> /dev/null 2>&1` ]; then
+ ${bindir}/install-catalog \
+ --add ${sysconfdir}/sgml/sgml-docbook.cat $catalog
+ fi
+ done
+ fi
+ fi
+}