Commit b3931304 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-upgrade: return error status if there are no packages for upgrade

parent b594841c
......@@ -37,8 +37,6 @@ epm_upgrade()
load_helper epm-removerepo
load_helper epm-Install
try_change_alt_repo
epm_addrepo "$@"
local installlist="$(get_task_packages $*)"
# hack: drop -devel packages to avoid package provided by multiple packages
installlist="$(estrlist reg_exclude ".*-devel .*-devel-static" "$installlist")"
......@@ -46,6 +44,13 @@ epm_upgrade()
# install only installed packages (simulate upgrade packages)
installlist="$(get_only_installed_packages "$installlist")"
[ -n "$verbose" ] && info "Packages to upgrade: $installlist"
if [ -z "$installlist" ] ; then
warning "There is no installed packages for upgrade from task $*"
exit 22
fi
try_change_alt_repo
epm_addrepo "$@"
(pkg_names="$installlist" epm_Install) || fatal "Can't update repo"
epm_removerepo "$@"
end_change_alt_repo
......
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