12 #ifndef ZYPP_REPOMANAGER_H 13 #define ZYPP_REPOMANAGER_H 18 #include <zypp/base/PtrTypes.h> 19 #include <zypp/base/Iterator.h> 20 #include <zypp/base/Flags.h> 22 #include <zypp/Pathname.h> 30 #include <zypp-core/ui/ProgressData> 179 bool hasRepo(
const std::string & alias )
const;
559 bool hasService(
const std::string & alias )
const;
575 void addService(
const std::string & alias,
const Url& url );
693 template<
typename OutputIterator>
695 OutputIterator out )
const 725 #endif // ZYPP2_REPOMANAGER_H RefreshCheckStatus checkIfToRefreshMetadata(const RepoInfo &info, const Url &url, RawMetadataRefreshPolicy policy)
RefreshCheckStatus
Possibly return state of checkIfRefreshMEtadata function.
RepoManagerOptions(const Pathname &root_r=Pathname())
Default ctor following ZConfig global settings.
constexpr std::string_view Url("url")
void getRepositoriesInService(const std::string &alias, OutputIterator out) const
fill to output iterator repositories in service name.
refresh is delayed due to settings
bool hasRepo(const std::string &alias) const
Pathname repoRawCachePath
std::string service() const
Gets name of the service to which this repository belongs or empty string if it has been added manual...
void removeService(const std::string &alias)
ServiceInfo getService(const std::string &alias) const
RepoSizeType repoSize() const
void refreshServices(const RefreshServiceOptions &options_r)
Pathname metadataPath(const RepoInfo &info) const
friend std::ostream & operator<<(std::ostream &str, const RepoManager &obj)
ZYPP_DECLARE_OPERATORS_FOR_FLAGS(DiskUsageCounter::MountPoint::HintFlags)
void modifyRepository(const RepoInfo &newinfo, const ProgressData::ReceiverFnc &progressrcv=ProgressData::ReceiverFnc())
bool hasRepo(const RepoInfo &info_r) const
String related utilities and Regular expression matching.
RefreshServiceFlags RefreshServiceOptions
Options tuning RefreshService.
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
What is known about a repository.
ServiceSet::size_type ServiceSizeType
RepoInfo getRepositoryInfo(const std::string &alias, OPT_PROGRESS)
ZYPP_DECLARE_FLAGS(RefreshServiceFlags, RefreshServiceBit)
Pathname knownServicesPath
void addRepositories(const Url &url, OPT_PROGRESS)
RepoInfo getRepo(const std::string &alias) const
void cleanPackages(const RepoInfo &info, OPT_PROGRESS, bool isAutoClean=false)
repo::ServiceType probeService(const Url &url) const
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
void buildCache(const RepoInfo &info, CacheBuildPolicy policy, OPT_PROGRESS)
Url::asString() view options.
void modifyService(const std::string &oldAlias, const ServiceInfo &newService)
Pathname repoSolvCachePath
repo::RepoType probe(const Url &url, const Pathname &path=Pathname()) const
void loadFromCache(const RepoInfo &info, OPT_PROGRESS)
std::set< ServiceInfo > ServiceSet
ServiceInfo typedefs.
RepoInfo getRepo(const RepoInfo &info_r) const
void addRepository(const RepoInfo &info, OPT_PROGRESS)
static RepoManagerOptions makeTestSetup(const Pathname &root_r)
Test setup adjusting all paths to be located below one root_r directory.
Pathname rootDir
remembers root_r value for later use
std::string alias() const
unique identifier for this source.
bool serviceEmpty() const
std::set< RepoInfo > RepoSet
RepoInfo typedefs.
MatchServiceAlias(const std::string &alias_)
Service type enumeration.
void cleanMetadata(const RepoInfo &info, OPT_PROGRESS)
const RepoSet & repos() const
Iterate the known repositories.
bool isCached(const RepoInfo &info) const
ServiceSet::const_iterator ServiceConstIterator
ServiceConstIterator serviceBegin() const
RefreshServiceBit
Flags for tuning RefreshService.
ServiceConstIterator serviceEnd() const
std::ostream & copy(std::istream &from_r, std::ostream &to_r)
Copy istream to ostream.
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
std::list< RepoInfo > readRepoFile(const Url &repo_file)
Parses repo_file and returns a list of RepoInfo objects corresponding to repositories found within th...
void refreshMetadata(const RepoInfo &info, RawMetadataRefreshPolicy policy, OPT_PROGRESS)
bool operator()(const RepoInfo &info) const
RepoSet::size_type RepoSizeType
std::list< RepoInfo > knownRepositories() const
List of known repositories.
RepoConstIterator repoBegin() const
std::string servicesTargetDistro
Target distro ID to be used when refreshing repo index services.
static std::string makeStupidAlias(const Url &url_r=Url())
Some stupid string but suitable as alias for your url if nothing better is available.
Functor thats filter RepoInfo by service which it belongs to.
Pathname repoPackagesCachePath
void removeRepository(const RepoInfo &info, OPT_PROGRESS)
static const ViewOption DEFAULTS
Default combination of view options.
void modifyService(const ServiceInfo &service)
RepoStatus metadataStatus(const RepoInfo &info) const
Track changing files or directories.
void modifyRepository(const std::string &alias, const RepoInfo &newinfo_r, OPT_PROGRESS)
ServiceSizeType serviceSize() const
Force refresh even if TTL is not reached.
Iterable< ServiceConstIterator > services() const
Iterate the known services.
void refreshService(const std::string &alias, const RefreshServiceOptions &options_r)
void addService(const ServiceInfo &service)
Easy-to use interface to the ZYPP dependency resolver.
RepoManager(const RepoManagerOptions &options=RepoManagerOptions())
RepoConstIterator repoEnd() const
void refreshGeoIp(const RepoInfo::url_set &urls)
void cleanCacheDirGarbage(OPT_PROGRESS)
RepoStatus cacheStatus(const RepoInfo &info) const
bool hasService(const std::string &alias) const
void cleanCache(const RepoInfo &info, OPT_PROGRESS)
std::list< ServiceInfo > knownServices() const
List of known services.
RepoSet::const_iterator RepoConstIterator
Repository type enumeration.
Force restoring repo enabled/disabled status.
Pathname packagesPath(const RepoInfo &info) const