From 11397ed657348bbc6d79db23e67cedd470f10b011f36a0147547f9a4e98af8f3 Mon Sep 17 00:00:00 2001 From: Nicolas Morey-Chaisemartin Date: Thu, 6 Sep 2018 15:42:12 +0000 Subject: [PATCH 1/4] 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 --- mvapich2.changes | 5 +++++ mvapich2.spec | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/mvapich2.changes b/mvapich2.changes index f20dc5b..8e14bf7 100644 --- a/mvapich2.changes +++ b/mvapich2.changes @@ -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 diff --git a/mvapich2.spec b/mvapich2.spec index cdeaabc..258cc2b 100644 --- a/mvapich2.spec +++ b/mvapich2.spec @@ -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 From 4b0d49ba11567caca1b9642731b648ae24989193d427f1f5d910b5b2e444b799 Mon Sep 17 00:00:00 2001 From: Nicolas Morey-Chaisemartin Date: Fri, 7 Sep 2018 09:15:20 +0000 Subject: [PATCH 2/4] Accepting request 633986 from home:NMoreyChaisemartin:branches:science:HPC Fix == OBS-URL: https://build.opensuse.org/request/show/633986 OBS-URL: https://build.opensuse.org/package/show/science:HPC/mvapich2?expand=0&rev=48 --- mvapich2.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mvapich2.spec b/mvapich2.spec index 258cc2b..e6018e7 100644 --- a/mvapich2.spec +++ b/mvapich2.spec @@ -441,7 +441,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/rpm /sbin/ldconfig %if %{without hpc} # Only unregister when uninstalling -if [ "$1" == "0" ]; then +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 From 761458d45b7f267b71c73b5289bc24db9f86f485ac5b849255df8d37d5acc9a7 Mon Sep 17 00:00:00 2001 From: Nicolas Morey-Chaisemartin Date: Tue, 11 Sep 2018 07:41:47 +0000 Subject: [PATCH 3/4] Accepting request 634891 from home:NMoreyChaisemartin:branches:science:HPC - Remove bashism in postun scriptlet OBS-URL: https://build.opensuse.org/request/show/634891 OBS-URL: https://build.opensuse.org/package/show/science:HPC/mvapich2?expand=0&rev=49 --- mvapich2.changes | 5 +++++ mvapich2.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mvapich2.changes b/mvapich2.changes index 8e14bf7..a518800 100644 --- a/mvapich2.changes +++ b/mvapich2.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Sep 10 12:15:10 UTC 2018 - nmoreychaisemartin@suse.com + +- Remove bashism in postun scriptlet + ------------------------------------------------------------------- Wed Sep 5 06:54:33 UTC 2018 - nmoreychaisemartin@suse.com diff --git a/mvapich2.spec b/mvapich2.spec index e6018e7..54b1a8f 100644 --- a/mvapich2.spec +++ b/mvapich2.spec @@ -444,7 +444,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/rpm 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 + if [ "$(/usr/bin/mpi-selector --system --query)" = "%{name}%{?pack_suff}"]; then /usr/bin/mpi-selector --system --unset --yes fi fi From 2c31a2b8fa49dabeb12bde44fe17a9d03f9f45ea2ae5add7e3f4750deaeaa054 Mon Sep 17 00:00:00 2001 From: Nicolas Morey-Chaisemartin Date: Mon, 17 Sep 2018 09:24:22 +0000 Subject: [PATCH 4/4] Accepting request 636121 from home:NMoreyChaisemartin:branches:science:HPC Fix scriptlet OBS-URL: https://build.opensuse.org/request/show/636121 OBS-URL: https://build.opensuse.org/package/show/science:HPC/mvapich2?expand=0&rev=50 --- mvapich2.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mvapich2.spec b/mvapich2.spec index 54b1a8f..708fc7b 100644 --- a/mvapich2.spec +++ b/mvapich2.spec @@ -444,7 +444,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/rpm 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 + if [ "$(/usr/bin/mpi-selector --system --query)" = "%{name}%{?pack_suff}" ]; then /usr/bin/mpi-selector --system --unset --yes fi fi