From 3adc1714dad5f685673c04d9f7e1a078104d369f49830029bfe54a2183f8dcb1 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Wed, 14 Feb 2018 14:07:02 +0000 Subject: [PATCH] - Fix %systemd_post(): it's never called during package removal Also make it useful by restoring its original implementation. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=28 --- macros.systemd | 16 ++++------------ systemd-rpm-macros.changes | 7 +++++++ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/macros.systemd b/macros.systemd index 665ba91..3d9906f 100644 --- a/macros.systemd +++ b/macros.systemd @@ -192,18 +192,10 @@ else # package uninstall \ fi \ %{nil} -# -# Options used if not in an installation systems -# -f that is fore service stop in removal -# -n that do not touch active service -# the default is to check for DISABLE_STOP_ON_REMOVAL environment -# variable if not found use the value read from /etc/sysconfig/services -# -%systemd_post(fn) \ -if [ "$1" -eq 0 -a -x /usr/bin/systemctl ]; then \ - # Package removal, not upgrade \ - /usr/bin/systemctl --no-reload disable %{?*} || : \ - %{expand:%%_stop_on_removal%{-f:_force}%{!-f:%{-n:_never}} %{?*}} \ +%systemd_post() \ +if [ $1 -eq 1 -a -x /usr/bin/systemctl ] ; then \ + # Initial installation \ + /usr/bin/systemctl --no-reload preset %{?*} || : \ fi \ %{nil} diff --git a/systemd-rpm-macros.changes b/systemd-rpm-macros.changes index d9c958d..48ce5f3 100644 --- a/systemd-rpm-macros.changes +++ b/systemd-rpm-macros.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Feb 14 14:04:19 UTC 2018 - fbui@suse.com + +- Fix %systemd_post(): it's never called during package removal + + Also make it useful by restoring its original implementation. + ------------------------------------------------------------------- Mon Feb 12 16:56:37 UTC 2018 - fbui@suse.com