From 56dd04e32ddf6a72dc4bafedfa500c0d6a506b0709ce6096ba162733833ac6ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Thu, 4 Feb 2021 14:41:17 +0000 Subject: [PATCH] Accepting request 869222 from home:lnussel:usrmove - fix update-alternatives usage. Needs to be in %postun according to https://en.opensuse.org/openSUSE:Packaging_Multiple_Version_guidelines#update-alternatives_mechanism OBS-URL: https://build.opensuse.org/request/show/869222 OBS-URL: https://build.opensuse.org/package/show/Base:System/mawk?expand=0&rev=26 --- mawk.changes | 6 ++++++ mawk.spec | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mawk.changes b/mawk.changes index 43d8809..3512be0 100644 --- a/mawk.changes +++ b/mawk.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 4 10:41:36 UTC 2021 - Ludwig Nussel + +- fix update-alternatives usage. Needs to be in %postun according to + https://en.opensuse.org/openSUSE:Packaging_Multiple_Version_guidelines#update-alternatives_mechanism + ------------------------------------------------------------------- Wed Dec 16 08:19:25 UTC 2020 - Ludwig Nussel diff --git a/mawk.spec b/mawk.spec index 892d076..7990c82 100644 --- a/mawk.spec +++ b/mawk.spec @@ -1,7 +1,7 @@ # # spec file for package mawk # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # Copyright (c) 2010 Guido Berhoerster. # # All modifications and additions to the file contributed by third parties @@ -83,8 +83,8 @@ make %{?_smp_mflags} check %endif --slave %{_mandir}/man1/awk.1.gz awk.1%{?ext_man} %{_mandir}/man1/mawk.1%{?ext_man} -%preun -if [ $1 -eq 0 ]; then +%postun +if [ ! -f %{_bindir}/mawk ]; then %{_sbindir}/update-alternatives --remove awk %{_bindir}/mawk fi