commit:     43a474eb12b0ff14f18688fcfcea48fae915be7b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 10 03:52:54 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 10 03:52:54 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43a474eb

net-firewall/nftables: add commentary re pkg_preinst check

Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-firewall/nftables/nftables-1.0.6.ebuild | 2 ++
 net-firewall/nftables/nftables-9999.ebuild  | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/net-firewall/nftables/nftables-1.0.6.ebuild 
b/net-firewall/nftables/nftables-1.0.6.ebuild
index 69e3d6988f20..bd4f23708a7e 100644
--- a/net-firewall/nftables/nftables-1.0.6.ebuild
+++ b/net-firewall/nftables/nftables-1.0.6.ebuild
@@ -169,6 +169,8 @@ src_install() {
 pkg_preinst() {
        local stderr
 
+       # There's a history of regressions with nftables upgrades. Add a safety
+       # check to help us spot them earlier.
        if [[ -d /sys/module/nf_tables ]] && [[ -x /sbin/nft ]] && [[ -z 
${ROOT} ]]; then
                # Check the current loaded ruleset, if any, using the newly
                # built instance of nft(8).

diff --git a/net-firewall/nftables/nftables-9999.ebuild 
b/net-firewall/nftables/nftables-9999.ebuild
index 2ef025795e56..f60144b1a850 100644
--- a/net-firewall/nftables/nftables-9999.ebuild
+++ b/net-firewall/nftables/nftables-9999.ebuild
@@ -167,6 +167,8 @@ src_install() {
 }
 
 pkg_preinst() {
+       # There's a history of regressions with nftables upgrades. Add a safety
+       # check to help us spot them earlier.
        if [[ -d /sys/module/nf_tables ]] && [[ -x /sbin/nft ]] && [[ -z 
${ROOT} ]]; then
                if ! /sbin/nft -t list ruleset | "${ED}"/sbin/nft -c -f -; then
                        eerror "Your currently loaded ruleset cannot be parsed 
by the newly built instance of"

Reply via email to