summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-10-07 03:47:11 +0100
committerSam James <sam@gentoo.org>2021-10-07 03:47:11 +0100
commit98669e96960101455f34cb8f7c710cdb0b84e73c (patch)
tree6c34f1050108da3f6bed479a61b667304323b133 /app-text/docbook-xml-simple-dtd
parentapp-text/docbook-xml-dtd: die on failed build-docbook-catalog (diff)
downloadgentoo-98669e96960101455f34cb8f7c710cdb0b84e73c.tar.gz
gentoo-98669e96960101455f34cb8f7c710cdb0b84e73c.tar.bz2
gentoo-98669e96960101455f34cb8f7c710cdb0b84e73c.zip
app-text/docbook-xml-simple-dtd: die on failed build-docbook-catalog
Fail loudly if build-docbook-catalog wasn't successful; this is likely due to /run not being (bind-)mounted (in chroots/new installs). Bug: https://bugs.gentoo.org/816303 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-text/docbook-xml-simple-dtd')
-rw-r--r--app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-1.0-r3.ebuild8
-rw-r--r--app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.4-r4.ebuild8
-rw-r--r--app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.5-r3.ebuild8
3 files changed, 18 insertions, 6 deletions
diff --git a/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-1.0-r3.ebuild b/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-1.0-r3.ebuild
index 2f7d18739a29..4650a13e7f00 100644
--- a/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-1.0-r3.ebuild
+++ b/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-1.0-r3.ebuild
@@ -38,14 +38,18 @@ pkg_preinst() {
pkg_postinst() {
local backup=${T}/xml-simple-docbook-${PV}.cat
local real=${EROOT}/etc/sgml/xml-simple-docbook-${PV}.cat
+
if ! cmp -s "${backup}" "${real}"; then
cp "${backup}" "${real}" || die
fi
- build-docbook-catalog
+
+ # See bug #816303 for rationale behind die
+ build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?"
sgml-catalog-r1_pkg_postinst
}
pkg_postrm() {
- build-docbook-catalog
+ # See bug #816303 for rationale behind die
+ build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?"
sgml-catalog-r1_pkg_postrm
}
diff --git a/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.4-r4.ebuild b/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.4-r4.ebuild
index 8e164c62c157..ebc3aba11d40 100644
--- a/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.4-r4.ebuild
+++ b/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.4-r4.ebuild
@@ -41,14 +41,18 @@ pkg_preinst() {
pkg_postinst() {
local backup=${T}/xml-simple-docbook-${PV}.cat
local real=${EROOT}/etc/sgml/xml-simple-docbook-${PV}.cat
+
if ! cmp -s "${backup}" "${real}"; then
cp "${backup}" "${real}" || die
fi
- build-docbook-catalog
+
+ # See bug #816303 for rationale behind die
+ build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?"
sgml-catalog-r1_pkg_postinst
}
pkg_postrm() {
- build-docbook-catalog
+ # See bug #816303 for rationale behind die
+ build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?"
sgml-catalog-r1_pkg_postrm
}
diff --git a/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.5-r3.ebuild b/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.5-r3.ebuild
index 64ebd01a1246..5e77faad0799 100644
--- a/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.5-r3.ebuild
+++ b/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.5-r3.ebuild
@@ -38,14 +38,18 @@ pkg_preinst() {
pkg_postinst() {
local backup=${T}/xml-simple-docbook-${PV}.cat
local real=${EROOT}/etc/sgml/xml-simple-docbook-${PV}.cat
+
if ! cmp -s "${backup}" "${real}"; then
cp "${backup}" "${real}" || die
fi
- build-docbook-catalog
+
+ # See bug #816303 for rationale behind die
+ build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?"
sgml-catalog-r1_pkg_postinst
}
pkg_postrm() {
- build-docbook-catalog
+ # See bug #816303 for rationale behind die
+ build-docbook-catalog || die "Failed to regenerate docbook catalog. Is /run mounted?"
sgml-catalog-r1_pkg_postrm
}