int installedResult( Queue & result_r ) const
{ return ::transaction_installedresult( _trans, result_r ); }
+ StringQueue autoInstalled() const
+ { return _autoInstalled; }
+
+ void autoInstalled( const StringQueue & queue_r )
+ { _autoInstalled = queue_r; }
+
public:
StepType stepType( Solvable solv_r ) const
{
set_type _systemErase; // @System packages to be eased (otherse are TRANSACTION_IGNORE)
pmmap_type _pmMap; // Post mortem data of deleted @System solvables
+ StringQueue _autoInstalled; // ident strings of all packages that would be auto-installed after the transaction is run.
+
public:
/** Offer default Impl. */
static shared_ptr<Impl> nullimpl()
int Transaction::installedResult( Queue & result_r ) const
{ return _pimpl->installedResult( result_r ); }
+ StringQueue Transaction::autoInstalled() const
+ { return _pimpl->autoInstalled(); }
+
+ void Transaction::autoInstalled( const StringQueue & queue_r )
+ { _pimpl->autoInstalled( queue_r ); }
std::ostream & operator<<( std::ostream & str, const Transaction & obj )
{ return str << *obj._pimpl; }
#include "zypp/sat/SolvIterMixin.h"
#include "zypp/sat/Solvable.h"
+#include "zypp/sat/Queue.h"
#include "zypp/PoolItem.h"
namespace sat
{ /////////////////////////////////////////////////////////////////
- class Queue;
-
namespace detail
{
/** Needs to be outside \ref Transaction in order to be usable in SolvIterMixin. */
* packages is returned. (wraps libsolv::transaction_installedresult) */
int installedResult( Queue & result_r ) const;
+ /** Return the ident strings of all packages that would be auto-installed after the transaction is run. */
+ StringQueue autoInstalled() const;
+
+ /** Set the ident strings of all packages that would be auto-installed after the transaction is run. */
+ void autoInstalled( const StringQueue & queue_r );
+
public:
/** Implementation */
class Impl;
sat::Transaction Resolver::getTransaction()
{
- return sat::Transaction( sat::Transaction::loadFromPool );
+ // FIXME: That's an ugly way of pushing autoInstalled into the transaction.
+ sat::Transaction ret( sat::Transaction::loadFromPool );
+ ret.autoInstalled( _satResolver->autoInstalled() );
+ return ret;
}
}
}
+sat::StringQueue SATResolver::autoInstalled() const
+{
+ sat::StringQueue ret;
+ if ( _solv )
+ ::solver_get_userinstalled( _solv, ret, GET_USERINSTALLED_NAMES|GET_USERINSTALLED_INVERTED );
+ return ret;
+}
+
+sat::StringQueue SATResolver::userInstalled() const
+{
+ sat::StringQueue ret;
+ if ( _solv )
+ ::solver_get_userinstalled( _solv, ret, GET_USERINSTALLED_NAMES );
+ return ret;
+}
+
///////////////////////////////////////////////////////////////////
};// namespace detail
PoolItemList resultItemsToRemove () { return _result_items_to_remove; }
PoolItemList problematicUpdateItems() { return _problem_items; }
+ sat::StringQueue autoInstalled() const;
+ sat::StringQueue userInstalled() const;
};
///////////////////////////////////////////////////////////////////