Fix number check of test (builtin) in %pre scriptlet (boo#1197317)

OBS-URL: https://build.opensuse.org/package/show/server:mail/mailx?expand=0&rev=71
This commit is contained in:
Dr. Werner Fink 2022-03-21 10:32:34 +00:00 committed by Git OBS Bridge
parent 25850668bf
commit 2fc9076281
2 changed files with 11 additions and 5 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Mar 21 10:31:05 UTC 2022 - Dr. Werner Fink <werner@suse.de>
- Fix number check of test (builtin) in %pre scriptlet (boo#1197317)
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Feb 17 21:22:49 UTC 2022 - Stefan Schubert <schubi@suse.de> Thu Feb 17 21:22:49 UTC 2022 - Stefan Schubert <schubi@suse.de>

View File

@ -172,9 +172,10 @@ if test ! -e %{_bindir}/mailx; then
%{_sbindir}/update-alternatives --quiet --force --remove mail %{_bindir}/mailx %{_sbindir}/update-alternatives --quiet --force --remove mail %{_bindir}/mailx
fi fi
%else %else
%pre %pre
# removing old update-alternatives entries # removing old update-alternatives entries
if [ "$1" > 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ] ; then
%{_sbindir}/update-alternatives --quiet --force --remove mail %{_bindir}/mailx %{_sbindir}/update-alternatives --quiet --force --remove mail %{_bindir}/mailx
fi fi
%endif %endif