Commit af2412be authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-assure: improve version checking

parent b8f04c68
...@@ -108,7 +108,12 @@ __epm_assure() ...@@ -108,7 +108,12 @@ __epm_assure()
info "Installing appropriate package for $CMD command..." info "Installing appropriate package for $CMD command..."
__epm_need_update $PACKAGE $PACKAGEVERSION || return 0 __epm_need_update $PACKAGE $PACKAGEVERSION || return 0
docmd epm --auto install $PACKAGE docmd epm --auto install $PACKAGE || return
[ -n "$PACKAGEVERSION" ] || return 0
# check if we couldn't update and still need update
__epm_need_update $PACKAGE $PACKAGEVERSION && return 1
return 0
} }
......
...@@ -336,8 +336,10 @@ assure_exists() ...@@ -336,8 +336,10 @@ assure_exists()
{ {
load_helper epm-assure load_helper epm-assure
local package="$2" local package="$2"
local textpackage=
[ -n "$package" ] || package="$(__get_package_for_command "$1")" [ -n "$package" ] || package="$(__get_package_for_command "$1")"
__epm_assure "$1" $package $3 || fatal "Can't assure in '$1' command" [ -n "$3" ] && textpackage=" >= $3"
__epm_assure "$1" $package $3 || fatal "Can't assure in '$1' command from $package$textpackage package"
} }
eget() eget()
......
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