Commit c6046641 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-autoremove: fix bug with next cycle in direct mode

parent 72a0ba28
...@@ -88,21 +88,25 @@ __epm_autoremove_altrpm_lib() ...@@ -88,21 +88,25 @@ __epm_autoremove_altrpm_lib()
local opt="$1" local opt="$1"
local libgrep='' local libgrep=''
info info
if [ "$opt" = "libs" ] ; then case "$opt" in
info "Removing all non -devel/-debuginfo libs packages not need by anything..." libs)
local develrule='-(devel|devel-static)$' info "Removing all non -devel/-debuginfo libs packages not need by anything..."
libgrep='^(lib|bzlib|zlib)' local develrule='-(devel|devel-static)$'
elif [ "$opt" = "i586-libs" ] ; then libgrep='^(lib|bzlib|zlib)'
info "Removing all non -devel/-debuginfo i586-libs packages not need by anything..." ;;
local develrule='-(devel|devel-static)$' i586-libs)
libgrep='^(i586-lib|i586-bzlib|i586-zlib)' info "Removing all non -devel/-debuginfo i586-libs packages not need by anything..."
elif [ "$opt" = "devel" ] ; then local develrule='-(devel|devel-static)$'
info "Removing all non -debuginfo libs packages (-devel too) not need by anything..." libgrep='^(i586-lib|i586-bzlib|i586-zlib)'
local develrule='-(NONONO)$' ;;
libgrep='^(lib|bzlib|zlib)' devel)
else info "Removing all non -debuginfo libs packages (-devel too) not need by anything..."
fatal "Internal error: unsupported opt $opt" local develrule='-(NONONO)$'
fi libgrep='^(lib|bzlib|zlib)'
;;
*)
fatal "Internal error: unsupported opt $opt"
esac
# https://www.altlinux.org/APT_в_ALT_Linux/Советы_по_использованию#apt-cache_list-nodeps # https://www.altlinux.org/APT_в_ALT_Linux/Советы_по_использованию#apt-cache_list-nodeps
showcmd "apt-cache list-nodeps | grep -E -- \"$libgrep\"" showcmd "apt-cache list-nodeps | grep -E -- \"$libgrep\""
...@@ -133,7 +137,7 @@ __epm_autoremove_altrpm_lib() ...@@ -133,7 +137,7 @@ __epm_autoremove_altrpm_lib()
if [ -n "$flag" ] ; then if [ -n "$flag" ] ; then
info "" info ""
info "call again for next cycle until all libs will be removed" info "call again for next cycle until all libs will be removed"
__epm_autoremove_altrpm_lib $nodevel __epm_autoremove_altrpm_lib $opt
fi fi
return 0 return 0
......
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