Commit 4043b56d authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-install: add --noscripts support for rpm install

parent 674cce3b
...@@ -93,6 +93,7 @@ force= ...@@ -93,6 +93,7 @@ force=
repack= repack=
inscript= inscript=
scripts= scripts=
noscripts=
short= short=
direct= direct=
sort= sort=
...@@ -395,9 +396,12 @@ check_option() ...@@ -395,9 +396,12 @@ check_option()
--repack) # HELPOPT: repack rpm package(s) before install --repack) # HELPOPT: repack rpm package(s) before install
repack="--repack" repack="--repack"
;; ;;
--scripts) # HELPOPT: include scripts in repacked rpm package(s) (see --repack or repacking when foreign package is installed) --scripts) # HELPOPT: include scripts in repacked rpm package(s) (see --repack or repacking when foreign package is installed)
scripts="--scripts" scripts="--scripts"
;; ;;
--noscripts) # HELPOPT: disable scripts in install packages
noscripts="--noscripts"
;;
--sort) # HELPOPT: sort output, f.i. --sort=size (supported only for packages command) --sort) # HELPOPT: sort output, f.i. --sort=size (supported only for packages command)
# TODO: how to read arg? # TODO: how to read arg?
sort="$1" sort="$1"
......
...@@ -307,6 +307,7 @@ epm_install_files() ...@@ -307,6 +307,7 @@ epm_install_files()
# do not using low-level for install by file path (FIXME: reasons?) # do not using low-level for install by file path (FIXME: reasons?)
if ! is_dirpath "$@" || [ "$(get_package_type "$@")" = "rpm" ] ; then if ! is_dirpath "$@" || [ "$(get_package_type "$@")" = "rpm" ] ; then
sudocmd rpm -Uvh $force $nodeps $@ && save_installed_packages $@ && return sudocmd rpm -Uvh $force $nodeps $@ && save_installed_packages $@ && return
sudocmd rpm -Uvh $force $noscripts $nodeps $@ && save_installed_packages $@ && 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 $@ && return __epm_check_if_rpm_already_installed $@ && return
...@@ -347,7 +348,7 @@ epm_install_files() ...@@ -347,7 +348,7 @@ epm_install_files()
*-rpm) *-rpm)
__epm_check_if_try_install_deb $@ && return __epm_check_if_try_install_deb $@ && return
__epm_check_if_src_rpm $@ __epm_check_if_src_rpm $@
sudocmd rpm -Uvh $force $nodeps $@ && return sudocmd rpm -Uvh $force $noscripts $nodeps $@ && return
local RES=$? local RES=$?
__epm_check_if_rpm_already_installed $@ && return __epm_check_if_rpm_already_installed $@ && return
......
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