Imported Upstream version 17.8.0
[platform/upstream/libzypp.git] / zypp / sat / detail / PoolImpl.h
index 915e753..3350147 100644 (file)
@@ -66,6 +66,10 @@ namespace zypp
           const SerialNumber & serial() const
           { return _serial; }
 
+          /** Serial number changing whenever resusePoolIDs==true was used. ResPool must also invalidate it's PoolItems! */
+          const SerialNumber & serialIDs() const
+          { return _serialIDs; }
+
           /** Update housekeeping data (e.g. whatprovides).
            * \todo actually requires a watcher.
            */
@@ -123,7 +127,7 @@ namespace zypp
           /** Creating a new repo named \a name_r. */
           CRepo * _createRepo( const std::string & name_r );
 
-          /** Creating a new repo named \a name_r. */
+          /** Delete repo \a repo_r from pool. */
           void _deleteRepo( CRepo * repo_r );
 
           /** Adding solv file to a repo.
@@ -299,6 +303,21 @@ namespace zypp
 
           bool isOnSystemByUser( IdString ident_r ) const
           { return !_autoinstalled.contains( ident_r.id() ); }
+
+          bool isOnSystemByAuto( IdString ident_r ) const
+          { return _autoinstalled.contains( ident_r.id() ); }
+
+          /** Get ident list of all solvables that trigger the "reboot needed" flag. */
+         StringQueue rebootNeededIdents() const
+         { return _rebootNeeded; }
+
+         /** Set ident list of all solvables that trigger the "reboot needed" flag. */
+         void setRebootNeededIdents( const StringQueue & rebootNeeded_r )
+         { _rebootNeeded = rebootNeeded_r; }
+
+         bool triggersRebootNeededHint( IdString ident_r ) const
+          { return _rebootNeeded.contains( ident_r.id() ); }
+
           //@}
 
        public:
@@ -308,8 +327,10 @@ namespace zypp
         private:
           /** sat-pool. */
           CPool * _pool;
-          /** Serial number. */
+          /** Serial number - changes with each Pool content change. */
           SerialNumber _serial;
+          /** Serial number of IDs - changes whenever resusePoolIDs==true - ResPool must also invalidate it's PoolItems! */
+          SerialNumber _serialIDs;
           /** Watch serial number. */
           SerialNumberWatcher _watcher;
           /** Additional \ref RepoInfo. */
@@ -328,6 +349,9 @@ namespace zypp
           /**  */
          sat::StringQueue _autoinstalled;
 
+         /** database of all identifiers that will trigger the "reboot needed" flag */
+         sat::StringQueue _rebootNeeded;
+
          /** filesystems mentioned in /etc/sysconfig/storage */
          mutable scoped_ptr<std::set<std::string> > _requiredFilesystemsPtr;
       };