Mailinglist Archive: zypp-commit (266 mails)

< Previous Next >
[zypp-commit] r11706 - in /trunk/libzypp/zypp/solver/detail: Resolver.cc Resolver.h Testcase.cc Testcase.h
  • From: schubi2@xxxxxxxxxxxxxxxx
  • Date: Tue, 18 Nov 2008 15:17:20 -0000
  • Message-id: <20081118151720.3F13B9E48E@xxxxxxxxxxxxxxxx>
Author: schubi2
Date: Tue Nov 18 16:17:19 2008
New Revision: 11706

URL: http://svn.opensuse.org/viewcvs/zypp?rev=11706&view=rev
Log:
generating flags for distupgrade,verify and update in the testcases

Modified:
trunk/libzypp/zypp/solver/detail/Resolver.cc
trunk/libzypp/zypp/solver/detail/Resolver.h
trunk/libzypp/zypp/solver/detail/Testcase.cc
trunk/libzypp/zypp/solver/detail/Testcase.h

Modified: trunk/libzypp/zypp/solver/detail/Resolver.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Resolver.cc?rev=11706&r1=11705&r2=11706&view=diff
==============================================================================
--- trunk/libzypp/zypp/solver/detail/Resolver.cc (original)
+++ trunk/libzypp/zypp/solver/detail/Resolver.cc Tue Nov 18 16:17:19 2008
@@ -72,6 +72,7 @@
, _testing(false)
, _forceResolve(false)
, _upgradeMode(false)
+ , _updateMode(false)
, _verifying(false)
, _onlyRequires(indeterminate)
, _ignorealreadyrecommended(false)
@@ -113,6 +114,7 @@
void
Resolver::doUpdate()
{
+ _updateMode = true;
return _satResolver->doUpdate();
}


Modified: trunk/libzypp/zypp/solver/detail/Resolver.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Resolver.h?rev=11706&r1=11705&r2=11706&view=diff
==============================================================================
--- trunk/libzypp/zypp/solver/detail/Resolver.h (original)
+++ trunk/libzypp/zypp/solver/detail/Resolver.h Tue Nov 18 16:17:19 2008
@@ -106,6 +106,7 @@
// have unfulfilled requirements.
// This behaviour is favourited by ZMD
bool _upgradeMode; // Resolver has been called with doUpgrade
+ bool _updateMode; // Resolver has been called with doUpdate
bool _verifying; // The system will be checked
TriBool _onlyRequires; // do install required resolvables only
// no recommended resolvables, language
@@ -183,6 +184,10 @@
bool doUpgrade( zypp::UpgradeStatistics & opt_stats_r );
PoolItemList problematicUpdateItems( void ) const;

+ bool isUpgradeMode(){ return _upgradeMode;}; // Resolver has been
called with doUpgrade
+ bool isUpdateMode(){ return _updateMode;}; // Resolver has been
called with doUpdate
+ bool isVerifyingMode(){ return _verifying;}; // The system will be
checked
+
ResolverProblemList problems () const;
void applySolutions (const ProblemSolutionList &solutions);


Modified: trunk/libzypp/zypp/solver/detail/Testcase.cc
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Testcase.cc?rev=11706&r1=11705&r2=11706&view=diff
==============================================================================
--- trunk/libzypp/zypp/solver/detail/Testcase.cc (original)
+++ trunk/libzypp/zypp/solver/detail/Testcase.cc Tue Nov 18 16:17:19 2008
@@ -375,6 +375,13 @@
control.addDependencies (SystemCheck::instance().requiredSystemCap(),
SystemCheck::instance().conflictSystemCap());

+ if (resolver.isUpgradeMode())
+ control.distupgrade ();
+ if (resolver.isUpdateMode())
+ control.verifySystem ();
+ if (resolver.isVerifyingMode())
+ control.update();
+
return true;
}

@@ -459,8 +466,7 @@
*file << TAB << "<ignorealreadyrecommended/>" << endl;

*file << "</setup>" << endl
- << "<trial>" << endl
- << "<showpool all=\"yes\"/>" << endl;
+ << "<trial>" << endl;
}

HelixControl::HelixControl()
@@ -525,6 +531,21 @@
}
}

+void HelixControl::distupgrade()
+{
+ *file << "<distupgrade/>" << endl;
+}
+
+void HelixControl::verifySystem()
+{
+ *file << "<verify/>" << endl;
+}
+
+void HelixControl::update()
+{
+ *file << "<update/>" << endl;
+}
+

///////////////////////////////////////////////////////////////////
};// namespace detail

Modified: trunk/libzypp/zypp/solver/detail/Testcase.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/Testcase.h?rev=11706&r1=11705&r2=11706&view=diff
==============================================================================
--- trunk/libzypp/zypp/solver/detail/Testcase.h (original)
+++ trunk/libzypp/zypp/solver/detail/Testcase.h Tue Nov 18 16:17:19 2008
@@ -116,6 +116,11 @@
void deleteResolvable (const ResObject::constPtr &resObject,
const ResStatus &status);
void addDependencies (const CapabilitySet &capRequire, const CapabilitySet
&capConflict);
+
+ void distupgrade ();
+ void verifySystem ();
+ void update ();
+
std::string filename () { return dumpFile; }
};


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

< Previous Next >
This Thread
  • No further messages