added a posttrans script to clean broken alternatives [release 2020.11-2mamba;Sun Nov 22 2020]

This commit is contained in:
Silvan Calarco 2024-01-06 08:14:11 +01:00
parent f3089045f7
commit 1bdbcedaab

View File

@ -18,7 +18,7 @@
Name: openmamba-release
Version: 2020.11
Release: 1mamba
Release: 2mamba
Summary: Release files for %{distroid} %{fullversion} %{?codename:(%codename)}
Group: System/Configuration
Vendor: openmamba
@ -35,7 +35,8 @@ Obsoletes: openmamba-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-root
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
Requires(post):gnupg
Requires(post):gnupg2
Requires(post):chkconfig
#Requires(post):rpm
%description
@ -116,6 +117,17 @@ if [ $1 -ge 1 ]; then
fi
:
%posttrans
# Clean broken alternatives
for r in `seq 1 3`; do
for l in /etc/alternatives/*; do
if [ ! -e "$l" ]; then
/usr/sbin/update-alternatives --remove `basename $l` `readlink -m $l` 2>/dev/null
fi
done
done
:
%files
%defattr(-,root,root)
%{_bindir}/%{distroid}-release
@ -140,6 +152,9 @@ fi
%config %{_sysconfdir}/yum/repos.d/openmamba-rolling-unstable.repo
%changelog
* Sun Nov 22 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 2020.11-2mamba
- added a posttrans script to clean broken alternatives
* Sat Nov 21 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 2020.11-1mamba
- update to 2020.11