commit:     a950794bde5d33d035a3726f99cc3cbfa618c437
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 23 15:54:56 2021 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Jul 23 15:57:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a950794b

net-firewall/iptables: bypass 'eselect iptables unset' on upgrades

Closes: https://bugs.gentoo.org/760246
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 net-firewall/iptables/iptables-1.8.7.ebuild | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net-firewall/iptables/iptables-1.8.7.ebuild 
b/net-firewall/iptables/iptables-1.8.7.ebuild
index a6ba56cb354..079e1fb2cba 100644
--- a/net-firewall/iptables/iptables-1.8.7.ebuild
+++ b/net-firewall/iptables/iptables-1.8.7.ebuild
@@ -155,8 +155,10 @@ pkg_postinst() {
 }
 
 pkg_prerm() {
-       elog "Unsetting iptables symlinks before removal"
-       eselect iptables unset
+       if [[ -z ${REPLACED_BY_VERSION} ]]; then
+               elog "Unsetting iptables symlinks before removal"
+               eselect iptables unset
+       fi
 
        if ! has_version 'net-firewall/ebtables'; then
                elog "Unsetting ebtables symlinks before removal"

Reply via email to