static struct option update_options[] = {
{"repo", required_argument, 0, 'r'},
{"skip-interactive", no_argument, 0, 0 },
+ {"with-interactive", no_argument, 0, 0 },
{"auto-agree-with-licenses", no_argument, 0, 'l'},
{"debug-solver", no_argument, 0, 0 },
{"no-recommends", no_argument, 0, 0 },
"-r, --repo <alias|#|URI> Load only the specified repository.\n"
"-D, --dry-run Test the update, do not actually update.\n"
"-d, --download-only Only download the packages, do not install.\n"
- );
+ //! \todo merge this with the above string for 11.3
+ ) + string(_(
+ " --with-interactive Do not skip interactive patches.\n"
+ ));
break;
}
if (copts.count("no-confirm"))
_gopts.non_interactive = true;
+ bool skip_interactive = false;
+ if (copts.count("skip-interactive"))
+ {
+ if (copts.count("with-interactive"))
+ {
+ out().error(str::form(_("%s contradicts %s"), "--with-interactive", "--skip-interactive"));
+ setExitCode(ZYPPER_EXIT_ERR_INVALID_ARGS);
+ return;
+ }
+ skip_interactive = true;
+ }
+ // bnc #497711
+ else if (globalOpts().non_interactive && !copts.count("with-interactive"))
+ skip_interactive = true;
+ MIL << "Skipping interactive patches: " << (skip_interactive ? "yes" : "no") << endl;
+
ResKindSet kinds;
if (copts.count("type"))
{
load_resolvables(*this);
resolve(*this); // needed to compute status of PPP
- bool skip_interactive =
- copts.count("skip-interactive") || globalOpts().non_interactive;
if (copts.count("bugzilla") || copts.count("bz") || copts.count("cve"))
mark_updates_by_issue(*this);
&& (patch->interactive() || !patch->licenseToConfirm().empty()))
{
// Skipping a patch because it is marked as interactive or has
- // license to confirm and --skip-interactive is requested.
+ // license to confirm and --skip-interactive is requested
+ // (i.e. also --non-interactive, since it implies --skip-interactive)
Zypper::instance()->out().warning(str::form(
// translators: %s is the name of a patch
_("'%s' is interactive, skipping."),