SHA256
1
0
forked from pool/slurm

- Shield comments between script snippets with a %{!?nil:...} to

avoid them being interpreted as scripts - in which case the update
  level is passed as argument (see chapter 'Shared libraries' in:
  https://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets)
  (bsc#1100850).

OBS-URL: https://build.opensuse.org/package/show/network:cluster/slurm?expand=0&rev=62
This commit is contained in:
Egbert Eich 2018-07-11 12:08:06 +00:00 committed by Git OBS Bridge
parent 1337fac8b2
commit 62ef6634bc
2 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Jul 11 12:04:55 UTC 2018 - eich@suse.com
- Shield comments between script snippets with a %{!?nil:...} to
avoid them being interpreted as scripts - in which case the update
level is passed as argument (see chapter 'Shared libraries' in:
https://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets)
(bsc#1100850).
-------------------------------------------------------------------
Tue Jun 5 13:24:43 UTC 2018 - cgoll@suse.com

View File

@ -562,12 +562,14 @@ exit 0
%post -n libpmi%{pmi_so} -p /sbin/ldconfig
%postun -n libpmi%{pmi_so} -p /sbin/ldconfig
%{!?nil:
# On update the %%postun code of the old package restarts the
# service. This breaks in case the ABI between slurm and its
# plugins has changed as updates are not atomic. Since we cannot
# fix the old scripts we need these macros as a workaround.
# They should be removed at some point.
# Do pretrans in lua: https://fedoraproject.org/wiki/Packaging:Scriptlets
}
%define _test_rest() %{?with_systemd: os.remove("/run/%{1}.rst")
if os.execute() and os.getenv("YAST_IS_RUNNING") ~= "instsys" then
if os.execute("systemctl status %{1} &>/dev/null") then
@ -576,7 +578,9 @@ exit 0
end
}
%define _rest() %{?with_systemd:[ -e /run/%{1}.rst ] && { systemctl status %{1} &>/dev/null || systemctl restart %{1}; }; rm -f /run/%{1}.rst;}
%{!?nil:
# Until a posttrans macro has been added to macros.systemd, we need this
}
%define _res_update() %{?with_systemd:%{expand:%%_restart_on_update %{?*}};}
%pretrans -p <lua>