From: Michał Górny Date: Tue, 17 Sep 2019 07:07:33 +0000 (+0200) Subject: app-text/docbook-xml-dtd: Restore .cat backup for non-empty too X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c2dcf16a1ca58a9e7b9b932aaccd43454dcfeb21;p=gentoo.git app-text/docbook-xml-dtd: Restore .cat backup for non-empty too Signed-off-by: Michał Górny --- diff --git a/app-text/docbook-xml-dtd/docbook-xml-dtd-4.1.2-r7.ebuild b/app-text/docbook-xml-dtd/docbook-xml-dtd-4.1.2-r7.ebuild index fdf2ac2ad673..9d06ca5a5154 100644 --- a/app-text/docbook-xml-dtd/docbook-xml-dtd-4.1.2-r7.ebuild +++ b/app-text/docbook-xml-dtd/docbook-xml-dtd-4.1.2-r7.ebuild @@ -49,8 +49,10 @@ pkg_preinst() { } pkg_postinst() { - if [[ ! -f ${EROOT}/etc/sgml/xml-docbook-${PV}.cat ]]; then - cp "${T}"/xml-docbook-${PV}.cat "${EROOT}"/etc/sgml/ || die + local backup=${T}/xml-docbook-${PV}.cat + local real=${EROOT}/etc/sgml/xml-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-dtd/docbook-xml-dtd-4.2-r3.ebuild b/app-text/docbook-xml-dtd/docbook-xml-dtd-4.2-r3.ebuild index db788fca68f3..2864178f068a 100644 --- a/app-text/docbook-xml-dtd/docbook-xml-dtd-4.2-r3.ebuild +++ b/app-text/docbook-xml-dtd/docbook-xml-dtd-4.2-r3.ebuild @@ -49,8 +49,10 @@ pkg_preinst() { } pkg_postinst() { - if [[ ! -f ${EROOT}/etc/sgml/xml-docbook-${PV}.cat ]]; then - cp "${T}"/xml-docbook-${PV}.cat "${EROOT}"/etc/sgml/ || die + local backup=${T}/xml-docbook-${PV}.cat + local real=${EROOT}/etc/sgml/xml-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-dtd/docbook-xml-dtd-4.3-r2.ebuild b/app-text/docbook-xml-dtd/docbook-xml-dtd-4.3-r2.ebuild index db788fca68f3..2864178f068a 100644 --- a/app-text/docbook-xml-dtd/docbook-xml-dtd-4.3-r2.ebuild +++ b/app-text/docbook-xml-dtd/docbook-xml-dtd-4.3-r2.ebuild @@ -49,8 +49,10 @@ pkg_preinst() { } pkg_postinst() { - if [[ ! -f ${EROOT}/etc/sgml/xml-docbook-${PV}.cat ]]; then - cp "${T}"/xml-docbook-${PV}.cat "${EROOT}"/etc/sgml/ || die + local backup=${T}/xml-docbook-${PV}.cat + local real=${EROOT}/etc/sgml/xml-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-dtd/docbook-xml-dtd-4.4-r3.ebuild b/app-text/docbook-xml-dtd/docbook-xml-dtd-4.4-r3.ebuild index d0987c01141c..fb841c4266b0 100644 --- a/app-text/docbook-xml-dtd/docbook-xml-dtd-4.4-r3.ebuild +++ b/app-text/docbook-xml-dtd/docbook-xml-dtd-4.4-r3.ebuild @@ -50,8 +50,10 @@ pkg_preinst() { } pkg_postinst() { - if [[ ! -f ${EROOT}/etc/sgml/xml-docbook-${PV}.cat ]]; then - cp "${T}"/xml-docbook-${PV}.cat "${EROOT}"/etc/sgml/ || die + local backup=${T}/xml-docbook-${PV}.cat + local real=${EROOT}/etc/sgml/xml-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-dtd/docbook-xml-dtd-4.5-r2.ebuild b/app-text/docbook-xml-dtd/docbook-xml-dtd-4.5-r2.ebuild index d0987c01141c..fb841c4266b0 100644 --- a/app-text/docbook-xml-dtd/docbook-xml-dtd-4.5-r2.ebuild +++ b/app-text/docbook-xml-dtd/docbook-xml-dtd-4.5-r2.ebuild @@ -50,8 +50,10 @@ pkg_preinst() { } pkg_postinst() { - if [[ ! -f ${EROOT}/etc/sgml/xml-docbook-${PV}.cat ]]; then - cp "${T}"/xml-docbook-${PV}.cat "${EROOT}"/etc/sgml/ || die + local backup=${T}/xml-docbook-${PV}.cat + local real=${EROOT}/etc/sgml/xml-docbook-${PV}.cat + if ! cmp -s "${backup}" "${real}"; then + cp "${backup}" "${real}" || die fi build-docbook-catalog sgml-catalog-r1_pkg_postinst