ref: refs/heads/master commit 0aa4ba26a7e115d6237aef96c3589b597561ab5e Author: Ján Kupec <jkupec@suse.cz> 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@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org