#include "zypp/sat/detail/PoolMember.h"
#include "zypp/Repository.h"
#include "zypp/sat/WhatProvides.h"
+#include "zypp/sat/SolvableSet.h"
#include "zypp/sat/Queue.h"
///////////////////////////////////////////////////////////////////
/** 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;
/** Iterator behind the last \ref Repository. */
RepositoryIterator reposEnd() const;
+ /** Iterate the repositories. */
+ Iterable<RepositoryIterator> repos() const
+ { return makeIterable( reposBegin(), reposEnd() ); }
+
/** Return a \ref Repository named \c alias_r.
* It a such a \ref Repository does not already exist
* a new empty \ref Repository is created.
Repository reposInsert( const std::string & alias_r );
/** Find a \ref Repository named \c alias_r.
- * Returns \ref norepository if there is no such \ref Repository.
+ * Returns \ref noRepository if there is no such \ref Repository.
*/
Repository reposFind( const std::string & alias_r ) const;
void reposErase( const std::string & alias_r )
{ reposFind( alias_r ).eraseFromPool(); }
+ /** Remove all repos from the pool.
+ * This also shrinks a pool which may have become large
+ * after having added and removed repos lots of times.
+ */
+ void reposEraseAll()
+ { while ( ! reposEmpty() ) reposErase( reposBegin()->alias() ); }
+
public:
/** Reserved system repository alias \c @System. */
static const std::string & systemRepoAlias();
/** Iterator behind the last \ref Solvable. */
SolvableIterator solvablesEnd() const;
+ /** Iterate the solvables. */
+ Iterable<SolvableIterator> solvables() const
+ { return makeIterable( solvablesBegin(), solvablesEnd() ); }
+
public:
- /** \name Iterate all Solvables matching a \c _Filter. */
+ /** \name Iterate all Solvables matching a \c TFilter. */
//@{
- template<class _Filter>
- filter_iterator<_Filter,SolvableIterator> filterBegin( const _Filter & filter_r ) const
+ template<class TFilter>
+ filter_iterator<TFilter,SolvableIterator> filterBegin( const TFilter & filter_r ) const
{ return make_filter_iterator( filter_r, solvablesBegin(), solvablesEnd() ); }
- template<class _Filter>
- filter_iterator<_Filter,SolvableIterator> filterEnd( const _Filter & filter_r ) const
+ template<class TFilter>
+ filter_iterator<TFilter,SolvableIterator> filterEnd( const TFilter & filter_r ) const
{ return make_filter_iterator( filter_r, solvablesEnd(), solvablesEnd() ); }
//@}
/** Whether this \ref Locale is in the set of requested locales. */
bool isRequestedLocale( const Locale & locale_r ) const;
+
+ /** Start tracking changes based on this \a locales_r. */
+ void initRequestedLocales( const LocaleSet & locales_r );
+
+ /** Added since last initRequestedLocales. */
+ const LocaleSet & getAddedRequestedLocales() const;
+
+ /** Removed since last initRequestedLocales.*/
+ const LocaleSet & getRemovedRequestedLocales() const;
+
+
/** Get the set of available locales.
* This is computed from the package data so it actually
* represents all locales packages claim to support.
//@}
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;
- //@}
+ /** \name Multiversion install.
+ * Whether the pool contains packages which are multiversion installable.
+ * \see \ref Solvable::multiversionInstall
+ * \see \ref ZConfig::multiversionSpec
+ */
+ //@{
+ typedef SolvableSet MultiversionList;
+ const MultiversionList & multiversion() const;
+ /** \deprecated Legacy, use multiversion().empty() instead. */
+ ZYPP_DEPRECATED bool multiversionEmpty() const { return multiversion().empty(); }
+ //@}
public:
/** \name Autoinstalled */
inline bool operator!=( const Pool & lhs, const Pool & rhs )
{ return lhs.get() != rhs.get(); }
+ /** Create solv file content digest for zypper bash completion */
+ void updateSolvFileIndex( const Pathname & solvfile_r );
+
/////////////////////////////////////////////////////////////////
} // namespace sat
///////////////////////////////////////////////////////////////////