Mailinglist Archive: zypp-commit (233 mails)

< Previous Next >
[zypp-commit] <zypper> master : zypper patch --with-interactive added (bnc #497711)
  • From: Ján Kupec <jkupec@xxxxxxx>
  • Date: Tue, 10 Nov 2009 15:34:45 +0100
  • Message-id: <E1N7rpR-0000jM-Lt@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit bfa47e50c4a516a31b812c92051583e53369964a
Author: Ján Kupec <jkupec@xxxxxxx>
Date: Fri Jul 3 09:52:14 2009 +0200

zypper patch --with-interactive added (bnc #497711)
---
src/Zypper.cc | 24 +++++++++++++++++++++---
src/update.cc | 3 ++-
2 files changed, 23 insertions(+), 4 deletions(-)

diff --git a/src/Zypper.cc b/src/Zypper.cc
index 51b8ec5..f32bc8a 100644
--- a/src/Zypper.cc
+++ b/src/Zypper.cc
@@ -1570,6 +1570,7 @@ void Zypper::processCommandOptions()
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 },
@@ -1604,7 +1605,10 @@ void Zypper::processCommandOptions()
"-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;
}

@@ -3712,6 +3716,22 @@ void Zypper::doCommand()
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"))
{
@@ -3758,8 +3778,6 @@ void Zypper::doCommand()
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);
diff --git a/src/update.cc b/src/update.cc
index 2cb6201..7e84c9c 100755
--- a/src/update.cc
+++ b/src/update.cc
@@ -596,7 +596,8 @@ mark_patch_update(ui::Selectable & s,
&& (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."),
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages