Commit 462255c3 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add --force-yes support

parent 4b8d9509
......@@ -96,6 +96,7 @@ short=
direct=
sort=
non_interactive=
force_yes=
skip_installed=
skip_missed=
show_command_only=
......@@ -442,6 +443,9 @@ check_option()
--auto|--assumeyes|--non-interactive) # HELPOPT: non interactive mode
non_interactive="--auto"
;;
--force-yes) # HELPOPT: force yes in a danger cases (f.i., during release upgrade)
force_yes="--force-yes"
;;
*)
return 1
;;
......
......@@ -93,7 +93,7 @@ epm_downgrade()
fi
;;
apt-dpkg)
local APTOPTIONS="$(subst_option non_interactive -y)"
local APTOPTIONS="$(subst_option non_interactive -y) $force_yes"
__epm_add_deb_apt_downgrade_preferences || return
if [ -n "$pkg_filenames" ] ; then
sudocmd apt-get $APTOPTIONS install $pkg_filenames
......
......@@ -60,7 +60,7 @@ epm_upgrade()
apt-rpm|apt-dpkg)
local APTOPTIONS="$(subst_option non_interactive -y) $(subst_option verbose "-o Debug::pkgMarkInstall=1 -o Debug::pkgProblemResolver=1")"
# Функцию добавления параметра при условии
CMD="apt-get $APTOPTIONS dist-upgrade $noremove"
CMD="apt-get $APTOPTIONS $noremove $force_yes dist-upgrade"
;;
aptitude-dpkg)
CMD="aptitude dist-upgrade"
......
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