Mailinglist Archive: zypp-commit (266 mails)

< Previous Next >
[zypp-commit] r11789 - /trunk/zypper/src/solve-commit.cc
  • From: jkupec@xxxxxxxxxxxxxxxx
  • Date: Mon, 24 Nov 2008 14:44:22 -0000
  • Message-id: <20081124144422.26DDFFB80A@xxxxxxxxxxxxxxxx>
Author: jkupec
Date: Mon Nov 24 15:44:21 2008
New Revision: 11789

URL: http://svn.opensuse.org/viewcvs/zypp?rev=11789&view=rev
Log:
- fixed generation of solver testcases for verify and dist-upgrade

Modified:
trunk/zypper/src/solve-commit.cc

Modified: trunk/zypper/src/solve-commit.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/solve-commit.cc?rev=11789&r1=11788&r2=11789&view=diff
==============================================================================
--- trunk/zypper/src/solve-commit.cc (original)
+++ trunk/zypper/src/solve-commit.cc Mon Nov 24 15:44:21 2008
@@ -922,9 +922,14 @@
return God->resolver()->doUpgrade(dup_stats);
}

+/**
+ * To be called after setting solver flags and calling solver methods
+ * (like doUpdate(), doUpgrade(), verify(), and resolve()) to generate
+ * solver testcase.
+ */
static void make_solver_test_case(Zypper & zypper)
{
- set_solver_flags(zypper);
+// set_solver_flags(zypper);

string testcase_dir("/var/log/zypper.solverTestCase");

@@ -952,17 +957,12 @@
*/
void solve_and_commit (Zypper & zypper)
{
- if (zypper.cOpts().count("debug-solver"))
- {
- make_solver_test_case(zypper);
- return;
- }
-
bool show_forced_problems = true;
bool commit_done = false;
do
{
- if (zypper.runtimeData().solve_before_commit) // e.g. doUpdate unsets this
flag, no need for solving
+ // e.g. doUpdate unsets this flag, no need for another solving
+ if (zypper.runtimeData().solve_before_commit)
{
MIL << "solving..." << endl;

@@ -983,18 +983,26 @@
zypper.out().info(_("Resolving package dependencies..."));
success = resolve(zypper);
}
- if (success)
+
+ // go on, we've got solution or we don't want a solution (we want
testcase)
+ if (success || zypper.cOpts().count("debug-solver"))
break;

success = show_problems(zypper);
- if (! success) {
- // TODO cancel transaction?
+ if (!success)
+ {
zypper.setExitCode(ZYPPER_EXIT_ERR_ZYPP); // bnc #242736
return;
}
}
}

+ if (zypper.cOpts().count("debug-solver"))
+ {
+ make_solver_test_case(zypper);
+ return;
+ }
+
MIL << "got solution, showing summary" << endl;

// returns SUMMARY_*

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages