Imported Upstream version 14.45.0
[platform/upstream/libzypp.git] / zypp / sat / Transaction.cc
index 67502ec..560c7b1 100644 (file)
@@ -72,9 +72,9 @@ namespace zypp
       public:
        Impl()
          : _trans( ::transaction_create( nullptr ) )
-       { memset( _trans, 0, sizeof(_trans) ); }
+       { memset( _trans, 0, sizeof(*_trans) ); }
 
-       Impl( Default )
+       Impl( LoadFromPoolType )
          : _watcher( myPool().serial() )
          , _trans( nullptr )
        {
@@ -89,7 +89,7 @@ namespace zypp
          Queue noobsq;
          for_( it, sat::Pool::instance().multiversionBegin(), sat::Pool::instance().multiversionEnd() )
          {
-           noobsq.push( SOLVER_NOOBSOLETES | SOLVABLE_NAME );
+           noobsq.push( SOLVER_NOOBSOLETES | SOLVER_SOLVABLE_NAME );
            noobsq.push( it->id() );
          }
          Map noobsmap;
@@ -186,6 +186,16 @@ namespace zypp
        { detail::IdType * it( _find( solv_r ) ); return it ? iterator( self_r, it ) : end( self_r ); }
 
       public:
+       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
        {
          if ( ! solv_r )
@@ -277,6 +287,8 @@ namespace zypp
        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()
@@ -302,8 +314,8 @@ namespace zypp
       : _pimpl( Impl::nullimpl() )
     {}
 
-    Transaction::Transaction( Default )
-      : _pimpl( new Impl( Default() ) )
+    Transaction::Transaction( LoadFromPoolType )
+      : _pimpl( new Impl( loadFromPool ) )
     {}
 
     Transaction::~Transaction()
@@ -339,6 +351,15 @@ namespace zypp
     Transaction::iterator Transaction::find( const sat::Solvable & solv_r )
     { return _pimpl->find( _pimpl, solv_r ); }
 
+    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; }