Commit ace2d2bd authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-install: disable scripts for outside vendors.

parent 4043b56d
...@@ -290,6 +290,17 @@ __epm_check_if_src_rpm() ...@@ -290,6 +290,17 @@ __epm_check_if_src_rpm()
done done
} }
__epm_check_vendor()
{
local i
for i in $* ; do
local vendor="$(epm print field Vendor for "$i")"
[ "$vendor" = "ALT Linux Team" ] && continue
warning "You are about install package $i from outside vendor '$vendor'. Use --scripts if you need run scripts from such packages."
noscripts="--noscripts"
done
}
epm_install_files() epm_install_files()
{ {
[ -z "$1" ] && return [ -z "$1" ] && return
...@@ -306,7 +317,8 @@ epm_install_files() ...@@ -306,7 +317,8 @@ 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 # don't check vendor if need run scripts if forced disabled it
[ -n "$scripts$noscripts" ] || __epm_check_vendor $@
sudocmd rpm -Uvh $force $noscripts $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
......
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