Commit 12cd6a7e authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-upgrade: don't allow unknown options (ALT bug 41225)

parent e70264cc
......@@ -470,6 +470,7 @@ check_filenames()
pkg_urls="$pkg_urls $opt"
else
has_space "$opt" && warning "There are space(s) in package name '$opt', it is not supported. Skipped." && continue
# TODO: don't add unknown options (like -y, --unknown) to pkg_names
pkg_names="$pkg_names $opt"
fi
quoted_args="$quoted_args \"$opt\""
......
......@@ -65,6 +65,11 @@ epm_upgrade()
(pkg_files=$pkg_files force="$force -F" epm_install)
return
elif [ -n "$pkg_names" ] ; then
# hack for https://bugzilla.altlinux.org/41225
case "$pkg_names" in
-*)
fatal "Option $pkg_names is not allowed here"
esac
load_helper epm-install
(pkg_names=$(get_only_installed_packages $pkg_names) epm_install)
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