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;
#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
void loadFromCache(const RepoInfo &info, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Load resolvables into the pool.
const char * c_str() const
String representation.
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.
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...
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.
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.
// Don't refresh existing repos.
// Create readonly ZYpp instance.
Repository reposFind(const std::string &alias_r) const
Find a Repository named alias_r.
void buildCache(const RepoInfo &info, CacheBuildPolicy policy=BuildIfNeeded, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
Refresh local cache.
Base class for Exception.
std::string name() const
Repository name.
Wrapper class for ::stat/::lstat.
std::list< RepoInfo > knownRepositories() const
List of known repositories.
static const RepoType RPMPLAINDIR
static const std::string & systemRepoAlias()
Reserved system repository alias .
Easy-to use interface to the ZYPP dependency resolver.
bool isCached(const RepoInfo &info) const
Whether a repository exists in cache.
repo::RepoType type() const
Type of repository,.