From ca7349f01097df07b4921c45ce101a36c1c05170ab394c3316d0b2545bbaf0f2 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 17 Jan 2014 16:20:51 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=488 --- macros.systemd | 14 ++++++++++++++ systemd.changes | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/macros.systemd b/macros.systemd index dc70ceb7..1a003957 100644 --- a/macros.systemd +++ b/macros.systemd @@ -46,6 +46,13 @@ if [ $FIRST_ARG -eq 1 ]; then \ touch "/var/lib/systemd/migrated/$sysv_service" || : \ done \ else \ + if [ $FIRST_ARG -gt 1 ]; then \ + for service in %{?*} ; do \ + if [ ! -e "/usr/lib/systemd/system/$service" ]; then \ + touch "/run/rpm-%{name}-update-$service-new-in-upgrade" \ + fi \ + done \ + fi \ for service in %{?*} ; do \ sysv_service=${service%.*} \ if [ ! -e "/var/lib/systemd/migrated/$sysv_service" ]; then \ @@ -74,6 +81,13 @@ if [ -n "$services_to_migrate" ]; then \ /usr/sbin/systemd-sysv-convert --apply $services_to_migrate >/dev/null 2>&1 || : \ elif [ $FIRST_ARG -eq 1 ]; then \ /usr/bin/systemctl preset %{?*} >/dev/null 2>&1 || : \ +elif [ $FIRST_ARG -gt 1 ]; then \ + for service in %{?*} ; do \ + if [ -e "/run/rpm-%{name}-update-$service-new-in-upgrade" ]; then \ + rm -f "/run/rpm-%{name}-update-$service-new-in-upgrade" \ + /usr/bin/systemctl preset "$service" >/dev/null 2>&1 || : \ + fi \ + done \ fi \ %{nil} diff --git a/systemd.changes b/systemd.changes index 7540da07..620dfd30 100644 --- a/systemd.changes +++ b/systemd.changes @@ -15,6 +15,11 @@ Fri Jan 17 12:24:13 UTC 2014 - werner@suse.de sure that required dependencies are handles as required ones. This should fix bnc#858864 and bnc#857204. +------------------------------------------------------------------- +Thu Jan 16 16:08:00 UTC 2014 - lnussel@suse.de + +- apply preset also to service files that are new in upgrade + ------------------------------------------------------------------- Wed Jan 15 14:11:02 UTC 2014 - werner@suse.de