14 #include <zypp/base/LogTools.h> 15 #include <zypp/PathInfo.h> 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;
55 getZYpp()->initializeTarget( sysRoot_r );
56 getZYpp()->target()->load();
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;
RefreshCheckStatus checkIfToRefreshMetadata(const RepoInfo &info, const Url &url, RawMetadataRefreshPolicy policy)
#define ZYPP_THROW(EXCPT)
Drops a logline and throws the Exception.
bool haveZYpp() const
Whether the ZYpp instance is already created.
void IWantIt() ZYPP_DEPRECATED
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
const char * c_str() const
String representation.
What is known about a repository.
static ZYppFactory instance()
Singleton ctor.
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
bool enabled() const
If enabled is false, then this repository must be ignored as if does not exists, except when checking...
void buildCache(const RepoInfo &info, CacheBuildPolicy policy, OPT_PROGRESS)
void loadFromCache(const RepoInfo &info, OPT_PROGRESS)
Repository systemRepo()
Return the system repository, create it if missing.
Url url() const
Pars pro toto: The first repository url.
#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.
std::string alias() const
unique identifier for this source.
std::string asString() const
Error message provided by dumpOn as string.
std::string historyAsString() const
The history as string.
bool isCached(const RepoInfo &info) const
// Don't refresh existing repos.
void refreshMetadata(const RepoInfo &info, RawMetadataRefreshPolicy policy, OPT_PROGRESS)
// Create readonly ZYpp instance.
Repository reposFind(const std::string &alias_r) const
Find a Repository named alias_r.
Base class for Exception.
std::list< RepoInfo > knownRepositories() const
List of known repositories.
std::string name() const
Repository name.
Wrapper class for ::stat/::lstat.
static const RepoType RPMPLAINDIR
static const std::string & systemRepoAlias()
Reserved system repository alias .
Easy-to use interface to the ZYPP dependency resolver.
repo::RepoType type() const
Type of repository,.
void cleanCache(const RepoInfo &info, OPT_PROGRESS)