#include <set>
#include "zypp/base/LogTools.h"
+#include "zypp/base/LogControl.h"
#include "zypp/sat/Solvable.h"
#include "zypp/sat/WhatObsoletes.h"
#include "zypp/pool/GetResolvablesToInsDel.h"
#include "zypp/pool/PoolStats.h"
#include "zypp/solver/detail/InstallOrder.h"
+#include "zypp/Resolver.h"
+#include "zypp/sat/Transaction.h"
+
using std::endl;
using zypp::solver::detail::InstallOrder;
//
GetResolvablesToInsDel::GetResolvablesToInsDel( ResPool pool_r, Order order_r )
{
+ zypp::base::LogControl::TmpLineWriter shutUp;
typedef std::set<PoolItem> PoolItemSet;
PoolItemList & dellist_r( _toDelete );
}
+ void GetResolvablesToInsDel::debugDiffTransaction() const
+ {
+ SEC << "START debugDiffTransaction" << endl;
+ sat::Transaction trans( ResPool::instance().resolver().getTransaction() );
+
+ {
+ const PoolItemList & clist( _toDelete );
+ for_( it, clist.begin(), clist.end() )
+ {
+ sat::Transaction::const_iterator ci( trans.find( *it ) );
+ if ( ci == trans.end() )
+ ERR << "Missing to del in NEW trans: " << *it << endl;
+ }
+ }
+ {
+ const PoolItemList & clist( _toInstall );
+ for_( it, clist.begin(), clist.end() )
+ {
+ sat::Transaction::const_iterator ci( trans.find( *it ) );
+ if ( ci == trans.end() )
+ ERR << "Missing to ins in NEW trans: " << *it << endl;
+ }
+ }
+ {
+ const PoolItemList & clist( _toSrcinstall );
+ for_( it, clist.begin(), clist.end() )
+ {
+ sat::Transaction::const_iterator ci( trans.find( *it ) );
+ if ( ci == trans.end() )
+ ERR << "Missing srcins in NEW trans: " << *it << endl;
+ }
+ }
+
+ SEC << "END debugDiffTransaction" << endl;
+ }
+
/******************************************************************
**
** FUNCTION NAME : operator<<
#include <list>
#include "zypp/ResPool.h"
+#include "zypp/base/Deprecated.h"
///////////////////////////////////////////////////////////////////
namespace zypp
/** Collect transacting items and sort according to prereqs and
* media access.
*
- * \todo Replace \c enum \c Order and take a functor that
- * that determines how to group the resolvables.
+ * \deprecated Use class \ref sat::Transaction which does a better job
+ * esp. when packages are to be deleted.
*/
- struct GetResolvablesToInsDel
+ struct ZYPP_DEPRECATED GetResolvablesToInsDel
{
typedef std::list<PoolItem> PoolItemList;
GetResolvablesToInsDel( ResPool pool_r,
Order order_r = ORDER_BY_SOURCE );
+ /** Diff with new style \ref Transacrion and write result to log. */
+ void debugDiffTransaction() const;
+
PoolItemList _toDelete;
PoolItemList _toInstall;
PoolItemList _toSrcinstall;