Mailinglist Archive: zypp-commit (232 mails)

< Previous Next >
[zypp-commit] <zypper> master : Don't force resolution in 'install' for non-package types (bnc #549940)
  • From: Ján Kupec <jkupec@xxxxxxx>
  • Date: Fri, 27 Nov 2009 12:36:59 +0100
  • Message-id: <E1NDzMN-00041l-0z@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 0aa4ba26a7e115d6237aef96c3589b597561ab5e
Author: Ján Kupec <jkupec@xxxxxxx>
Date: Fri Nov 27 12:36:59 2009 +0100

Don't force resolution in 'install' for non-package types (bnc #549940)
---
src/solve-commit.cc | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/src/solve-commit.cc b/src/solve-commit.cc
index 74bd119..f153b36 100755
--- a/src/solve-commit.cc
+++ b/src/solve-commit.cc
@@ -245,9 +245,22 @@ static void set_force_resolution(Zypper & zypper)
{
if (!zypper.globalOpts().non_interactive &&
(zypper.globalOpts().is_rug_compatible ||
- zypper.command() == ZypperCommand::INSTALL ||
zypper.command() == ZypperCommand::REMOVE))
force_resolution = true;
+ else if (!zypper.globalOpts().non_interactive &&
+ zypper.command() == ZypperCommand::INSTALL)
+ {
+ // if the command is 'install', force resolution only if the sole
+ // --type is 'package' or no --type is given (bnc #549940)
+ parsed_opts::const_iterator it;
+ if (zypper.cOpts().count("type") == 0 ||
+ ((it = zypper.cOpts().find("type")) != zypper.cOpts().end() &&
+ it->second.size() == 1 &&
+ it->second.front() == "package"))
+ force_resolution = true;
+ else
+ force_resolution = false;
+ }
else
force_resolution = false;
}
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages