From: Michał Górny Date: Tue, 17 Sep 2019 07:07:34 +0000 (+0200) Subject: app-text/docbook-xml-simple-dtd: Restore .cat backup for non-empty too X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3009bf38b7da4e92990c197f7d8e4d2d2b0bfec9;p=gentoo.git app-text/docbook-xml-simple-dtd: Restore .cat backup for non-empty too Signed-off-by: Michał Górny --- 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 ca6929bbed33..19a3541028bd 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 @@ -36,8 +36,10 @@ pkg_preinst() { } pkg_postinst() { - if [[ ! -f ${EROOT}/etc/sgml/xml-simple-docbook-${PV}.cat ]]; then - cp "${T}"/xml-simple-docbook-${PV}.cat "${EROOT}"/etc/sgml/ || die + 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 sgml-catalog-r1_pkg_postinst 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 d4e1735315d0..bd0a32a10e5e 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 @@ -39,8 +39,10 @@ pkg_preinst() { } pkg_postinst() { - if [[ ! -f ${EROOT}/etc/sgml/xml-simple-docbook-${PV}.cat ]]; then - cp "${T}"/xml-simple-docbook-${PV}.cat "${EROOT}"/etc/sgml/ || die + 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 sgml-catalog-r1_pkg_postinst 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 b818a587508e..e68783e3d120 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 @@ -36,8 +36,10 @@ pkg_preinst() { } pkg_postinst() { - if [[ ! -f ${EROOT}/etc/sgml/xml-simple-docbook-${PV}.cat ]]; then - cp "${T}"/xml-simple-docbook-${PV}.cat "${EROOT}"/etc/sgml/ || die + 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 sgml-catalog-r1_pkg_postinst