Commit 278103e7 authored by Vitaly Lipatov's avatar Vitaly Lipatov

autoorphans/autoremove: improve excludes

parent 725f623c
......@@ -34,7 +34,7 @@ case $PMTYPE in
assure_exists /etc/buildreqs/files/ignore.d/apt-scripts apt-scripts
echo "We will try remove all installed packages which are missed in repositories"
warning "Use with caution!"
local PKGLIST=$(__epm_orphan_altrpm | sed -e "s/\.32bit//g")
local PKGLIST=$(__epm_orphan_altrpm | sed -e "s/\.32bit//g" | grep -v -- "^kernel")
docmd epm remove $PKGLIST
;;
apt-dpkg|aptitude-dpkg)
......
......@@ -33,10 +33,10 @@ __epm_autoremove_altrpm()
# https://www.altlinux.org/APT_в_ALT_Linux/Советы_по_использованию#apt-cache_list-nodeps
showcmd "apt-cache list-nodeps | grep -- \"$libexclude\""
pkgs=$(apt-cache list-nodeps | grep -- "$libexclude" | \
grep -v -- "-devel$" | grep -v -- "-debuginfo$" | \
grep -v -- "-util" | grep -v -- "-tool" | grep -v -- "-plugin" | \
grep -E -v -- "-(devel|debuginfo)$" | \
grep -E -v -- "-(util|tool|plugin|daemon)" | \
sed -e "s/\.32bit$//g" | \
grep -v -- ^libreoffice | grep -v -- libnss- | grep -v -- libvirt-daemon )
grep -E -v -- "^(libsystemd|libreoffice|libnss)" )
[ -n "$pkgs" ] && sudocmd rpm -v -e $pkgs && flag=1
info "Removing unused python/perl modules..."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment