From 54f3752b3fb9ded157bdc634cc40998750bca525 Mon Sep 17 00:00:00 2001 From: Thomas Deutschmann Date: Tue, 2 Aug 2016 14:59:43 +0200 Subject: net-firewall/shorewall: Fix REPLACING_VERSIONS usage Gentoo-Bug: https://bugs.gentoo.org/589482 Package-Manager: portage-2.3.0 Closes: https://github.com/gentoo/gentoo/pull/2000 Signed-off-by: Patrice Clement --- net-firewall/shorewall/shorewall-5.0.10.ebuild | 40 ++++++++++++++----------- net-firewall/shorewall/shorewall-5.0.4.ebuild | 40 ++++++++++++++----------- net-firewall/shorewall/shorewall-5.0.7.2.ebuild | 40 ++++++++++++++----------- net-firewall/shorewall/shorewall-5.0.9.2.ebuild | 40 ++++++++++++++----------- 4 files changed, 92 insertions(+), 68 deletions(-) (limited to 'net-firewall') diff --git a/net-firewall/shorewall/shorewall-5.0.10.ebuild b/net-firewall/shorewall/shorewall-5.0.10.ebuild index f87c043d2af8..011c75dde90e 100644 --- a/net-firewall/shorewall/shorewall-5.0.10.ebuild +++ b/net-firewall/shorewall/shorewall-5.0.10.ebuild @@ -400,29 +400,35 @@ pkg_postinst() { fi - if [[ -n "${REPLACING_VERSIONS}" && ${REPLACING_VERSIONS} < ${MY_MAJOR_RELEASE_NUMBER} ]]; then - # This is an upgrade + local v + for v in ${REPLACING_VERSIONS}; do + if ! version_is_at_least ${MY_MAJOR_RELEASE_NUMBER} ${v}; then + # This is an upgrade - elog "You are upgrading from a previous major version. It is highly recommended that you read" - elog "" - elog " - /usr/share/doc/shorewall*/releasenotes.tx*" - elog " - http://shorewall.net/upgrade_issues.htm#idp8704902640" - - if use ipv4; then - elog "" - elog "You can auto-migrate your configuration using" + elog "You are upgrading from a previous major version. It is highly recommended that you read" elog "" - elog " # shorewall update -A" + elog " - /usr/share/doc/shorewall*/releasenotes.tx*" + elog " - http://shorewall.net/Shorewall-5.html#idp51151872" - if use ipv6; then - elog " # shorewall6 update -A" + if use ipv4; then + elog "" + elog "You can auto-migrate your configuration using" + elog "" + elog " # shorewall update -A" + + if use ipv6; then + elog " # shorewall6 update -A" + fi + + elog "" + elog "But if you are not familiar with the \"shorewall[6] update\" command," + elog "please read the shorewall[6] man page first." fi - elog "" - elog "But if you are not familiar with the \"shorewall[6] update\" command," - elog "please read the shorewall[6] man page first." + # Show this elog only once + break fi - fi + done if ! use init; then elog "" diff --git a/net-firewall/shorewall/shorewall-5.0.4.ebuild b/net-firewall/shorewall/shorewall-5.0.4.ebuild index 0c749b300094..56004893d4af 100644 --- a/net-firewall/shorewall/shorewall-5.0.4.ebuild +++ b/net-firewall/shorewall/shorewall-5.0.4.ebuild @@ -400,29 +400,35 @@ pkg_postinst() { fi - if [[ -n "${REPLACING_VERSIONS}" && ${REPLACING_VERSIONS} < ${MY_MAJOR_RELEASE_NUMBER} ]]; then - # This is an upgrade + local v + for v in ${REPLACING_VERSIONS}; do + if ! version_is_at_least ${MY_MAJOR_RELEASE_NUMBER} ${v}; then + # This is an upgrade - elog "You are upgrading from a previous major version. It is highly recommended that you read" - elog "" - elog " - /usr/share/doc/shorewall*/releasenotes.tx*" - elog " - http://shorewall.net/upgrade_issues.htm#idp8704902640" - - if use ipv4; then - elog "" - elog "You can auto-migrate your configuration using" + elog "You are upgrading from a previous major version. It is highly recommended that you read" elog "" - elog " # shorewall update -A" + elog " - /usr/share/doc/shorewall*/releasenotes.tx*" + elog " - http://shorewall.net/Shorewall-5.html#idp51151872" - if use ipv6; then - elog " # shorewall6 update -A" + if use ipv4; then + elog "" + elog "You can auto-migrate your configuration using" + elog "" + elog " # shorewall update -A" + + if use ipv6; then + elog " # shorewall6 update -A" + fi + + elog "" + elog "But if you are not familiar with the \"shorewall[6] update\" command," + elog "please read the shorewall[6] man page first." fi - elog "" - elog "But if you are not familiar with the \"shorewall[6] update\" command," - elog "please read the shorewall[6] man page first." + # Show this elog only once + break fi - fi + done if ! use init; then elog "" diff --git a/net-firewall/shorewall/shorewall-5.0.7.2.ebuild b/net-firewall/shorewall/shorewall-5.0.7.2.ebuild index 879e1b54a943..112aa2077c1f 100644 --- a/net-firewall/shorewall/shorewall-5.0.7.2.ebuild +++ b/net-firewall/shorewall/shorewall-5.0.7.2.ebuild @@ -400,29 +400,35 @@ pkg_postinst() { fi - if [[ -n "${REPLACING_VERSIONS}" && ${REPLACING_VERSIONS} < ${MY_MAJOR_RELEASE_NUMBER} ]]; then - # This is an upgrade + local v + for v in ${REPLACING_VERSIONS}; do + if ! version_is_at_least ${MY_MAJOR_RELEASE_NUMBER} ${v}; then + # This is an upgrade - elog "You are upgrading from a previous major version. It is highly recommended that you read" - elog "" - elog " - /usr/share/doc/shorewall*/releasenotes.tx*" - elog " - http://shorewall.net/upgrade_issues.htm#idp8704902640" - - if use ipv4; then - elog "" - elog "You can auto-migrate your configuration using" + elog "You are upgrading from a previous major version. It is highly recommended that you read" elog "" - elog " # shorewall update -A" + elog " - /usr/share/doc/shorewall*/releasenotes.tx*" + elog " - http://shorewall.net/Shorewall-5.html#idp51151872" - if use ipv6; then - elog " # shorewall6 update -A" + if use ipv4; then + elog "" + elog "You can auto-migrate your configuration using" + elog "" + elog " # shorewall update -A" + + if use ipv6; then + elog " # shorewall6 update -A" + fi + + elog "" + elog "But if you are not familiar with the \"shorewall[6] update\" command," + elog "please read the shorewall[6] man page first." fi - elog "" - elog "But if you are not familiar with the \"shorewall[6] update\" command," - elog "please read the shorewall[6] man page first." + # Show this elog only once + break fi - fi + done if ! use init; then elog "" diff --git a/net-firewall/shorewall/shorewall-5.0.9.2.ebuild b/net-firewall/shorewall/shorewall-5.0.9.2.ebuild index f87c043d2af8..011c75dde90e 100644 --- a/net-firewall/shorewall/shorewall-5.0.9.2.ebuild +++ b/net-firewall/shorewall/shorewall-5.0.9.2.ebuild @@ -400,29 +400,35 @@ pkg_postinst() { fi - if [[ -n "${REPLACING_VERSIONS}" && ${REPLACING_VERSIONS} < ${MY_MAJOR_RELEASE_NUMBER} ]]; then - # This is an upgrade + local v + for v in ${REPLACING_VERSIONS}; do + if ! version_is_at_least ${MY_MAJOR_RELEASE_NUMBER} ${v}; then + # This is an upgrade - elog "You are upgrading from a previous major version. It is highly recommended that you read" - elog "" - elog " - /usr/share/doc/shorewall*/releasenotes.tx*" - elog " - http://shorewall.net/upgrade_issues.htm#idp8704902640" - - if use ipv4; then - elog "" - elog "You can auto-migrate your configuration using" + elog "You are upgrading from a previous major version. It is highly recommended that you read" elog "" - elog " # shorewall update -A" + elog " - /usr/share/doc/shorewall*/releasenotes.tx*" + elog " - http://shorewall.net/Shorewall-5.html#idp51151872" - if use ipv6; then - elog " # shorewall6 update -A" + if use ipv4; then + elog "" + elog "You can auto-migrate your configuration using" + elog "" + elog " # shorewall update -A" + + if use ipv6; then + elog " # shorewall6 update -A" + fi + + elog "" + elog "But if you are not familiar with the \"shorewall[6] update\" command," + elog "please read the shorewall[6] man page first." fi - elog "" - elog "But if you are not familiar with the \"shorewall[6] update\" command," - elog "please read the shorewall[6] man page first." + # Show this elog only once + break fi - fi + done if ! use init; then elog "" -- cgit v1.2.3-65-gdbad