Stop working on 'autopkg' branch and commit unfinished script mk-obsoletes-table.sh

This commit is contained in:
Mikhail Novosyolov 2019-01-29 21:22:58 +03:00
parent aab5337097
commit 080b8a3a24

23
mk-obsoletes-table.sh Executable file
View file

@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Create a table to automatically obsolete old packages by new ones
# This VERY UGLY script will probably be never ran again (ran it when updating samba from 4.6 to 4.9)
# Author: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
while read -r line
do
#echo "$line"
line_nosubdir="$(echo "$line" | sed -e 's,/samba,,g')"
sudo chroot /mnt/rosa-2016.1 /bin/rpm -qf --queryformat '%{NAME}\n' "$line" 2>/dev/null || \
sudo chroot /mnt/rosa-2016.1 /bin/rpm -qf --queryformat '%{NAME}\n' "$line_nosubdir"
done < <(cat autopkg.spec.in | grep '^%{_libdir}' | sed -e "s,%{_libdir},$(rpm --eval %{_libdir}),g" -e 's/\*//')
# lib64samba-credentials0
# lib64samba-errors1
# lib64samba-hostconfig0
# lib64samba-passdb0
# lib64samba-policy0
# lib64samba-server0
# lib64samba-util0
# lib64smbclient-devel
# lib64smbconf0
# lib64tevent-util0