From 4ae59bb29dff8b052e04c832e0b142828e2994b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= <slavek.banko@axis.cz>
Date: Mon, 27 Nov 2023 12:15:04 +0100
Subject: DEB tdebase: Prevent unwanted restarting TDM service during upgrade.
 This made it possible to add #DEBHELPER# back to TDM prerm script. This
 resolves issue TDE/tdebase#409.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 55fbcd419d4291d8234ec10577436c5c30dbff61)
---
 debian/_base/core/tdebase/debian/rules              | 3 +++
 debian/_base/core/tdebase/debian/tdm-trinity.postrm | 3 ---
 debian/_base/core/tdebase/debian/tdm-trinity.prerm  | 2 ++
 3 files changed, 5 insertions(+), 3 deletions(-)

(limited to 'debian')

diff --git a/debian/_base/core/tdebase/debian/rules b/debian/_base/core/tdebase/debian/rules
index ebcb8a186..f7d58351a 100755
--- a/debian/_base/core/tdebase/debian/rules
+++ b/debian/_base/core/tdebase/debian/rules
@@ -74,6 +74,9 @@ DEB_FIXPERMS_EXCLUDE := \
 
 DEB_DH_STRIP_ARGS  := --dbg-package=tdebase-trinity-dbg
 
+DEB_DH_INSTALLINIT_ARGS := --no-start --no-stop-on-upgrade --no-restart-after-upgrade
+DEB_DH_SYSTEMD_START_ARGS := --no-start --no-stop-on-upgrade --no-restart-after-upgrade
+
 DOC_HTML_PRUNE := ksplashml kcontrol khelpcenter tdesu knetattach tdeioslave kxkb tdedebugdialog kdcop
 
 PACKAGES_WITH_LIBS := kate-trinity kcontrol-trinity tdebase-trinity-bin kicker-trinity konqueror-trinity ksplash-trinity \
diff --git a/debian/_base/core/tdebase/debian/tdm-trinity.postrm b/debian/_base/core/tdebase/debian/tdm-trinity.postrm
index f20297bab..478413e3d 100644
--- a/debian/_base/core/tdebase/debian/tdm-trinity.postrm
+++ b/debian/_base/core/tdebase/debian/tdm-trinity.postrm
@@ -38,9 +38,6 @@ if [ "$1" = "purge" ] ; then
         update-rc.d tdm remove >/dev/null || true
     fi
 fi
-if [ -d /run/systemd/system ] ; then
-        systemctl --system daemon-reload >/dev/null || true
-fi
 
 #DEBHELPER#
 
diff --git a/debian/_base/core/tdebase/debian/tdm-trinity.prerm b/debian/_base/core/tdebase/debian/tdm-trinity.prerm
index eeecadfc5..34604ee00 100644
--- a/debian/_base/core/tdebase/debian/tdm-trinity.prerm
+++ b/debian/_base/core/tdebase/debian/tdm-trinity.prerm
@@ -178,4 +178,6 @@ if [ "$1" = "remove" -o "$1" = "deconfigure" ]; then
   fi
 fi
 
+#DEBHELPER#
+
 exit 0
-- 
cgit v1.2.1