27 #undef ZYPP_BASE_LOGGER_LOGGROUP
28 #define ZYPP_BASE_LOGGER_LOGGROUP "zypp::misc"
39 MIL <<
str::form(
"*** Load system at '%s' (%lx)", sysRoot_r.c_str(), (
unsigned long)flags_r ) << endl;
41 if ( ! PathInfo( sysRoot_r ).isDir() )
55 getZYpp()->initializeTarget( sysRoot_r );
56 getZYpp()->target()->load();
64 for_( it, repos.begin(), repos.end() )
77 MIL <<
str::form(
"*** clean cache for repo '%s'\t", nrepo.
name().c_str() ) << endl;
84 if ( ! repoManager.
isCached( nrepo ) )
86 MIL <<
str::form(
"*** build cache for repo '%s'\t", nrepo.
name().c_str() ) << endl;
90 MIL <<
str::form(
"*** load repo '%s'\t", nrepo.
name().c_str() ) << std::flush;
103 MIL <<
str::form(
"*** Read system at '%s'", sysRoot_r.c_str() ) << endl;
std::string name() const
Repository short label.
bool haveZYpp() const
Whether the ZYpp instance is already created.
std::string alias() const
unique identifier for this source.
std::string historyAsString() const
The history as string.
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
void IWantIt() ZYPP_DEPRECATED
void loadFromCache(const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Load resolvables into the pool.
void refreshMetadata(const RepoInfo &info, RawMetadataRefreshPolicy policy=RefreshIfNeeded, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Refresh local raw cache.
What is known about a repository.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
bool enabled() const
If enabled is false, then this repository must be ignored as if does not exists, except when checking...
static ZYppFactory instance()
Singleton ctor.
Repository systemRepo()
Return the system repository, create it if missing.
#define ZYPP_RETHROW(EXCPT)
Drops a logline and rethrows, updating the CodeLocation.
static Pool instance()
Singleton ctor.
void defaultLoadSystem(const Pathname &sysRoot_r, LoadSystemFlags flags_r)
Create the ZYpp instance and load target and enabled repositories.
Repository reposFind(const std::string &alias_r) const
Find a Repository named alias_r.
std::string asString() const
Error message provided by dumpOn as string.
RefreshCheckStatus checkIfToRefreshMetadata(const RepoInfo &info, const Url &url, RawMetadataRefreshPolicy policy=RefreshIfNeeded)
Checks whether to refresh metadata for specified repository and url.
void cleanCache(const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
clean local cache
creates and provides information about known sources.
std::string form(const char *format,...)
Printf style construction of std::string.
repo::RepoType type() const
Type of repository,.
// Don't refresh existing repos.
// Create readonly ZYpp instance.
void buildCache(const RepoInfo &info, CacheBuildPolicy policy=BuildIfNeeded, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Refresh local cache.
Base class for Exception.
std::list< RepoInfo > knownRepositories() const
List of known repositories.
bool isCached(const RepoInfo &info) const
Whether a repository exists in cache.
Url url() const
Pars pro toto: The first repository url.
static const RepoType RPMPLAINDIR
static const std::string & systemRepoAlias()
Reserved system repository alias .