13#include <zypp/base/Logger.h>
14#include <zypp/base/Exception.h>
40 struct QueryInstalledEditionHelper
42 bool operator()(
const std::string & name_r,
const Edition & ed_r,
const Arch & arch_r )
const
44 rpm::librpmDb::db_const_iterator it;
45 for ( it.findByName( name_r ); *it; ++it )
47 if ( arch_r == it->tag_arch()
77 _impl->_packageProviderPolicy.queryInstalledCB( QueryInstalledEditionHelper() );
119 if ( getenv(
"ZYPP_COMMIT_NO_PACKAGE_CACHE") )
121 MIL <<
"$ZYPP_COMMIT_NO_PACKAGE_CACHE is set." << endl;
122 _pimpl.reset(
new Impl( packageProvider_r ) );
140 {
_pimpl->setCommitList( commitList_r ); }
143 {
return _pimpl->get( citem_r ); }
146 {
return _pimpl->preloaded(); }
149 {
_pimpl->preloaded( newval_r ); }
static const Edition noedition
Value representing noedition ("") This is in fact a valid Edition.
Combining sat::Solvable and ResStatus.
static ResPool instance()
Singleton ctor.
repository_iterator knownRepositoriesBegin() const
repository_iterator knownRepositoriesEnd() const
Candidate delta and patches for a package.
Policies and options for PackageProvider.
Provide a package from a Repo.
ManagedFile providePackage() const
Provide the package.
ManagedFile providePackageFromCache() const
Provide the package if it is cached.
Base for CommitPackageCache implementations (implements no chache).
Target::commit helper optimizing package provision.
~CommitPackageCache()
Dtor.
void setCommitList(std::vector< sat::Solvable > commitList_r)
Download(commit) sequence of solvables to compute read ahead.
bool preloaded() const
Whether preloaded hint is set.
CommitPackageCache(const PackageProvider &packageProvider_r=RepoProvidePackage())
Ctor.
RW_pointer< Impl > _pimpl
Pointer to implementation.
ManagedFile get(const PoolItem &citem_r)
Provide a package.
function< ManagedFile(const PoolItem &pi, bool fromCache_r)> PackageProvider
ManagedFile operator()(const PoolItem &pi, bool fromCache_r)
Provide package optionally fron cache only.
String related utilities and Regular expression matching.
std::ostream & operator<<(std::ostream &str, const CommitPackageCache &obj)
Easy-to use interface to the ZYPP dependency resolver.
bool isKind(const ResKind &kind_r) const
repo::PackageProviderPolicy _packageProviderPolicy
repo::RepoMediaAccess _access
std::list< Repository > _repos