take care about the forceResolve in the testcases
authorStefan Schubert <schubi@suse.de>
Tue, 1 Apr 2008 13:31:29 +0000 (13:31 +0000)
committerStefan Schubert <schubi@suse.de>
Tue, 1 Apr 2008 13:31:29 +0000 (13:31 +0000)
zypp/solver/detail/Testcase.cc
zypp/solver/detail/Testcase.h

index 42e02cb..58eac7d 100644 (file)
@@ -378,7 +378,9 @@ bool Testcase::createTestcase(Resolver & resolver, bool dumpPool, bool runSolver
     HelixControl control (dumpPath + "/solver-test.xml",
                          repoTable,
                          ZConfig::instance().systemArchitecture(),
-                         pool.getRequestedLocales());
+                         pool.getRequestedLocales(),
+                         "solver-system.xml.gz",
+                         resolver.forceResolve());
 
     for (PoolItemList::const_iterator iter = items_to_install.begin(); iter != items_to_install.end(); iter++) {
        control.installResolvable (iter->resolvable(), iter->status());
@@ -432,7 +434,8 @@ HelixControl::HelixControl(const std::string & controlPath,
                           const RepositoryTable & repoTable,
                           const Arch & systemArchitecture,
                           const LocaleSet &languages,
-                          const std::string & systemPath)
+                          const std::string & systemPath,
+                          const bool forceResolve)
     :dumpFile (controlPath)
 {
     file = new ofstream(controlPath.c_str());
@@ -468,6 +471,10 @@ HelixControl::HelixControl(const std::string & controlPath,
        *file << TAB << "<locale name=\"" <<  iter->code()
              << "\" />" << endl;
     }
+    
+    if (forceResolve)
+       *file << TAB << "<forceResolve/>" << endl;
+    
     *file << "</setup>" << endl
          << "<trial>" << endl
          << "<showpool all=\"yes\"/>" << endl;
index 9ee4254..8176c64 100644 (file)
@@ -103,7 +103,8 @@ class  HelixControl {
                  const RepositoryTable & sourceTable,
                  const Arch & systemArchitecture,
                  const LocaleSet &languages,             
-                 const std::string & systemPath = "solver-system.xml.gz");
+                 const std::string & systemPath = "solver-system.xml.gz",
+                 const bool forceResolve = false);
     HelixControl ();    
     ~HelixControl ();