SHA256
1
0
forked from pool/mvapich2

Accepting request 633761 from home:NMoreyChaisemartin:branches:science:HPC

- Fix handling of mpi-selector during updates (bsc#1098653)

OBS-URL: https://build.opensuse.org/request/show/633761
OBS-URL: https://build.opensuse.org/package/show/science:HPC/mvapich2?expand=0&rev=47
This commit is contained in:
Nicolas Morey-Chaisemartin 2018-09-06 15:42:12 +00:00 committed by Git OBS Bridge
parent 189ae137df
commit 11397ed657
2 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Sep 5 06:54:33 UTC 2018 - nmoreychaisemartin@suse.com
- Fix handling of mpi-selector during updates (bsc#1098653)
-------------------------------------------------------------------
Sun Aug 19 09:21:45 UTC 2018 - eich@suse.com

View File

@ -429,8 +429,10 @@ mkdir -p %{buildroot}%{_sysconfdir}/rpm
%post
/sbin/ldconfig
%if %{without hpc}
# Always register. We might be already registered in the case of an udate
# but mpi-selector handles it fine
/usr/bin/mpi-selector \
--register %{name}%{?pack_suff}-%{version} \
--register %{name}%{?pack_suff} \
--source-dir %{p_bindir} \
--yes
%endif
@ -438,7 +440,14 @@ mkdir -p %{buildroot}%{_sysconfdir}/rpm
%postun
/sbin/ldconfig
%if %{without hpc}
/usr/bin/mpi-selector --unregister %{name}%{?pack_suff}-%{version} --yes --silent
# Only unregister when uninstalling
if [ "$1" == "0" ]; then
/usr/bin/mpi-selector --unregister %{name}%{?pack_suff} --yes
# Deregister the default if we are uninstalling it
if [ "$(/usr/bin/mpi-selector --system --query)" == "%{name}%{?pack_suff}"]; then
/usr/bin/mpi-selector --system --unset --yes
fi
fi
%else
%hpc_module_delete_if_default
%endif