Commit 722b9b25 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-install: check if rpm is already installed with all options

parent afa01b8f
...@@ -268,7 +268,7 @@ epm_ni_install_names() ...@@ -268,7 +268,7 @@ epm_ni_install_names()
__epm_check_if_rpm_already_installed() __epm_check_if_rpm_already_installed()
{ {
# Not: we can make optimize if just check version? # Not: we can make optimize if just check version?
LANG=C sudorun rpm -Uvh $force $nodeps $@ 2>&1 | grep -q "is already installed" LANG=C sudorun rpm -Uvh "$@" 2>&1 | grep -q "is already installed"
} }
__handle_direct_install() __handle_direct_install()
...@@ -342,7 +342,7 @@ epm_install_files() ...@@ -342,7 +342,7 @@ epm_install_files()
sudocmd rpm -Uvh $force $noscripts $nodeps $files && save_installed_packages $files && return sudocmd rpm -Uvh $force $noscripts $nodeps $files && save_installed_packages $files && return
local RES=$? local RES=$?
# TODO: check rpm result code and convert it to compatible format if possible # TODO: check rpm result code and convert it to compatible format if possible
__epm_check_if_rpm_already_installed $files && return __epm_check_if_rpm_already_installed $force $noscripts $nodeps $files && return
# if run with --nodeps, do not fallback on hi level # if run with --nodeps, do not fallback on hi level
[ -n "$nodeps" ] && return $RES [ -n "$nodeps" ] && return $RES
...@@ -444,10 +444,11 @@ epm_install_files() ...@@ -444,10 +444,11 @@ epm_install_files()
fi fi
__epm_check_if_src_rpm $files __epm_check_if_src_rpm $files
sudocmd rpm -Uvh $force $noscripts $nodeps $files && return sudocmd rpm -Uvh $force $noscripts $nodeps $files && return
local RES=$? local RES=$?
__epm_check_if_rpm_already_installed $files && return __epm_check_if_rpm_already_installed $force $noscripts $nodeps $files && return
# if run with --nodeps, do not fallback on hi level # if run with --nodeps, do not fallback on hi level
[ -n "$nodeps" ] && return $RES [ -n "$nodeps" ] && return $RES
......
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