Control: tag -1 + patch

Hi,

Carsten Schoenert (2026-10-27):
> would you mind to have a look at this please and create a patch or MR?
> You are still much deeper in the details.

Here's an untested patch.

I can imagine a very unlikely scenario in which the user has installed
a third-party profile and created this symlink to disable it, in which
case it could be a problem to unconditionally delete it on every
upgrade. But I don't think it's worth bothering about this too much.
If you think it's worth it, you might want to add version checking
guard code to ensure the removal only happens once (so the user can
revert it).

Bonus: 2nd patch to make the code less confusing.

Cheers,
-- 
intrigeri

>From 0d18bbd7d43ad158548e67276518b9aec97fa40d Mon Sep 17 00:00:00 2001
From: intrigeri <[email protected]>
Date: Tue, 27 Oct 2026 08:56:58 +0000
Subject: [PATCH 1/2] Delete obsolete
 /etc/apparmor.d/disable/usr.bin.thunderbird (Closes: #1152229)

---
 debian/thunderbird.postinst | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/debian/thunderbird.postinst b/debian/thunderbird.postinst
index 0392a4a9409..72b5d05aae3 100644
--- a/debian/thunderbird.postinst
+++ b/debian/thunderbird.postinst
@@ -69,6 +69,9 @@ case "$1" in
                 fi
             fi
         fi
+
+        # Remove obsolete symlink
+        rm -f /etc/apparmor.d/disable/usr.bin.thunderbird
     ;;
 
     configure|abort-upgrade)
-- 
2.55.0

>From 9a76cad274151c2a9be496fcecb49bfa0fc55bed Mon Sep 17 00:00:00 2001
From: intrigeri <[email protected]>
Date: Tue, 27 Oct 2026 08:57:41 +0000
Subject: [PATCH 2/2] Remove pattern than never matches

The "configure" pattern line 26 overrides this one.

Spotted by ShellCheck (SC2221).
---
 debian/thunderbird.postinst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/thunderbird.postinst b/debian/thunderbird.postinst
index 72b5d05aae3..ca288557fec 100644
--- a/debian/thunderbird.postinst
+++ b/debian/thunderbird.postinst
@@ -74,7 +74,7 @@ case "$1" in
         rm -f /etc/apparmor.d/disable/usr.bin.thunderbird
     ;;
 
-    configure|abort-upgrade)
+    abort-upgrade)
         touch ${THUNDERBIRD_LIBDIR}/.autoreg
     ;;
 
-- 
2.55.0

Reply via email to