[zypp-commit] r10252 - /trunk/libzypp/zypp/solver/detail/SATResolver.cc
![](https://seccdn.libravatar.org/avatar/b2c8050acc12d6c8fc86d8342006391c.jpg?s=120&d=mm&r=g)
Author: schubi2
Date: Wed May 28 15:23:22 2008
New Revision: 10252
URL: http://svn.opensuse.org/viewcvs/zypp?rev=10252&view=rev
Log:
SOLVER_ERASE_SOLVABLE_NAME: As we do not know, if this request has come
from resolvePool or resolveQueue we will have to take care for both
cases. (bnc#393969)
Modified:
trunk/libzypp/zypp/solver/detail/SATResolver.cc
Modified: trunk/libzypp/zypp/solver/detail/SATResolver.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/solver/detail/SATResolver.cc?rev=10252&r1=10251&r2=10252&view=diff
==============================================================================
--- trunk/libzypp/zypp/solver/detail/SATResolver.cc (original)
+++ trunk/libzypp/zypp/solver/detail/SATResolver.cc Wed May 28 15:23:22 2008
@@ -846,6 +846,24 @@
// helper function
//----------------------------------------------------------------------------
+struct FindPackage : public resfilter::ResObjectFilterFunctor
+{
+ ProblemSolutionCombi *problemSolution;
+ TransactionKind action;
+ FindPackage (ProblemSolutionCombi *p, const TransactionKind act)
+ : problemSolution (p)
+ , action (act)
+ {
+ }
+
+ bool operator()( PoolItem p)
+ {
+ problemSolution->addSingleAction (p, action);
+ return true;
+ }
+};
+
+
string SATResolver::SATprobleminfoString(Id problem, string &detail, Id &ignoreId)
{
@@ -1036,7 +1054,7 @@
break;
case SOLVER_INSTALL_SOLVABLE_NAME:
{
- IdString ident( what );
+ IdString ident( what );
SolverQueueItemInstall_Ptr install =
new SolverQueueItemInstall(_pool, ident.asString(), false );
problemSolution->addSingleAction (install, REMOVE_SOLVE_QUEUE_ITEM);
@@ -1048,7 +1066,16 @@
break;
case SOLVER_ERASE_SOLVABLE_NAME:
{
+ // As we do not know, if this request has come from resolvePool or
+ // resolveQueue we will have to take care for both cases.
IdString ident( what );
+ FindPackage info (problemSolution, KEEP);
+ invokeOnEach( _pool.byIdentBegin( ident ),
+ _pool.byIdentEnd( ident ),
+ functor::chain (resfilter::ByInstalled (), // ByInstalled
+ resfilter::ByTransact ()), // will be deinstalled
+ functor::functorRef
participants (1)
-
schubi2@svn.opensuse.org