Imported Upstream version 14.45.0
[platform/upstream/libzypp.git] / zypp / sat / Pool.h
index 7e3f761..9a29f33 100644 (file)
@@ -19,6 +19,7 @@
 #include "zypp/sat/detail/PoolMember.h"
 #include "zypp/Repository.h"
 #include "zypp/sat/WhatProvides.h"
+#include "zypp/sat/Queue.h"
 
 ///////////////////////////////////////////////////////////////////
 namespace zypp
@@ -65,6 +66,15 @@ namespace zypp
         /** Update housekeeping data if necessary (e.g. whatprovides). */
         void prepare() const;
 
+       /** \ref prepare plus some expensive checks done before solving only. */
+       void prepareForSolving() const;
+
+       /** Get rootdir (for file conflicts check) */
+       Pathname rootDir() const;
+
+       /** Set rootdir (for file conflicts check) */
+       void rootDir( const Pathname & root_r );
+
       public:
         /** Whether \ref Pool contains repos. */
         bool reposEmpty() const;
@@ -99,18 +109,11 @@ namespace zypp
         /** Reserved system repository alias \c @System. */
         static const std::string & systemRepoAlias();
 
-        /** Deprecated, use \ref systemRepoAlias() */
-        ZYPP_DEPRECATED static const std::string & systemRepoName()
-        { return systemRepoAlias(); } 
-
-
         /** Return the system repository if it is on the pool. */
-        Repository findSystemRepo() const
-        { return reposFind( systemRepoAlias() ); }
+        Repository findSystemRepo() const;
 
         /** Return the system repository, create it if missing. */
-        Repository systemRepo()
-        { return reposInsert( systemRepoAlias() ); }
+        Repository systemRepo();
 
       public:
         /** Load \ref Solvables from a solv-file into a \ref Repository named \c name_r.
@@ -127,6 +130,21 @@ namespace zypp
         Repository addRepoSolv( const Pathname & file_r, const RepoInfo & info_r );
 
       public:
+        /** Load \ref Solvables from a helix-file into a \ref Repository named \c name_r.
+         * Supports loading of gzip compressed files (.gz). In case of an exception
+         * the \ref Repository is removed from the \ref Pool.
+         * \throws Exception if loading the helix-file fails.
+         * \see \ref Repository::EraseFromPool
+        */
+        Repository addRepoHelix( const Pathname & file_r, const std::string & name_r );
+        /** \overload Using the files basename as \ref Repository name. */
+        Repository addRepoHelix( const Pathname & file_r );
+        /** \overload Using the \ref RepoInfo::alias \ref Repo name.
+         * Additionally stores the \ref RepoInfo. \See \ref Prool::setInfo.
+        */
+        Repository addRepoHelix( const Pathname & file_r, const RepoInfo & info_r );
+
+      public:
         /** Whether \ref Pool contains solvables. */
         bool solvablesEmpty() const;
 
@@ -159,6 +177,11 @@ namespace zypp
       public:
         /** \name Requested locales. */
         //@{
+       /** Set the default language for retrieving translated texts.
+        * Updated when calling \ref ZConfig::setTextLocale.
+        */
+       void setTextLocale( const Locale & locale_r );
+
         /** Set the requested locales.
          * Languages to be supported by the system, e.g. language specific
          * packages to be installed.
@@ -180,7 +203,7 @@ namespace zypp
         */
         const LocaleSet & getRequestedLocales() const;
 
-        /** Wheter this \ref Locale is in the set of requested locales. */
+        /** Whether this \ref Locale is in the set of requested locales. */
         bool isRequestedLocale( const Locale & locale_r ) const;
 
         /** Get the set of available locales.
@@ -189,11 +212,36 @@ namespace zypp
          */
         const LocaleSet & getAvailableLocales() const;
 
-        /** Wheter this \ref Locale is in the set of available locales. */
+        /** Whether this \ref Locale is in the set of available locales. */
         bool isAvailableLocale( const Locale & locale_r ) const;
         //@}
 
       public:
+        /** \name Multiversion install.
+         * Ident list of all packages that can be installed in different version
+         * at the same time. (\see \ref ZConfig::multiversionSpec)
+         */
+        //@{
+        typedef IdStringSet::const_iterator MultiversionIterator;
+
+        bool multiversionEmpty() const;
+        size_t multiversionSize() const;
+        MultiversionIterator multiversionBegin() const;
+        MultiversionIterator multiversionEnd() const;
+
+        bool isMultiversion( IdString ident_r ) const;
+        //@}
+
+      public:
+        /** \name Autoinstalled */
+        //@{
+        /** Get ident list of all autoinstalled solvables. */
+       Queue autoInstalled() const;
+       /** Set ident list of all autoinstalled solvables. */
+       void setAutoInstalled( const Queue & autoInstalled_r );
+        //@}
+
+      public:
         /** Expert backdoor. */
         ::_Pool * get() const;
       private: