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