Commit 40ce7026 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm install: don't disable rpm scripts for vendors from /etc/eepm/vendorallowscripts.list

parent f613b72f
......@@ -92,6 +92,19 @@ __epm_package_ok_scripts()
return $res
}
__epm_vendor_ok_scripts()
{
local vendor="$1"
local alf="$CONFIGDIR/vendorallowscripts.list"
[ -s "$alf" ] || return 1
[ -n "$vendor" ] || return 1
local tmpalf=$(__convert_pkgallowscripts_to_regexp "$alf")
echo "$vendor" | grep -q -f $tmpalf
local res=$?
rm $tmpalf
return $res
}
# Args: package names. Set noscripts for outside packages.
__epm_check_vendor()
{
......@@ -110,8 +123,16 @@ __epm_check_vendor()
[ -n "$rpmversion" ] || continue
vendor="$(epm print field Vendor for "$i" 2>/dev/null)"
# TODO: check GPG
# check separately to be quiet
[ "$vendor" = "ALT Linux Team" ] && continue
if __epm_vendor_ok_scripts "$vendor" ; then
warning "Scripts are ENABLED for package $i from outside vendor '$vendor' (this vendor is listed in $CONFIGDIR/vendorallowscripts.list). Use --noscripts if you need disable scripts in such packages."
continue
fi
if __epm_package_ok_scripts "$i" ; then
warning "Scripts are ENABLED for package $i from outside vendor '$vendor' (the package is listed in $CONFIGDIR/pkgallowscripts.list). Use --noscripts if you need disable scripts in such packages."
continue
......
# Place here Vendor names who are allowed to use scripts in their rpm packages
# Packages from these vendors will install with scripts by default
ALT Linux Team
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