11#include <solv/solvversion.h>
12#include <zypp/base/String.h>
13#include <zypp/base/LogTools.h>
14#include <zypp/base/Function.h>
20#include <zypp-core/base/UserRequestException>
32 static bool val = [](){
33 const char * env =
getenv(
"ZYPP_REPOMD_WITH_OTHER");
41 static bool val = [](){
42 const char * env =
getenv(
"ZYPP_REPOMD_WITH_FILELISTS");
72 std::string base { file.
basename() };
73 size_t hypoff = base.find(
"-" );
74 if (
hypoff != std::string::npos )
75 base.replace( 0,
hypoff + 1,
"" );
132#if defined(LIBSOLVEXT_FEATURE_ZCHUNK_COMPRESSION)
232 if ( !
ret.empty() &&
ri.requireStatusWithMediaFile() )
Interface of repomd.xml file reader.
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
void start(const Pathname &dest_dir, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
start the transfer to a destination directory dest_dir The media has to be provides with setMediaSetA...
void enqueueDigested(const OnMediaLocation &resource, const FileChecker &checker=FileChecker())
Enqueue a object for transferal, they will not be transferred until start() is called.
void setMediaSetAccess(MediaSetAccess &media)
Sets the media set access that will be used to precache and to download the files when start is calle...
'Language[_Country]' codes.
function< bool(const ProgressData &) ReceiverFnc)
Most simple version of progress reporting The percentage in most cases.
What is known about a repository.
Pathname path() const
Repository path.
Track changing files or directories.
static ZConfig & instance()
Singleton ctor.
Wrapper class for stat/lstat.
std::string basename() const
Return the last component of this path.
Reads through a repomd.xml file and collects type, location, checksum and other data about metadata f...
const RepoInfo & repoInfo() const
void defaultDownloadMasterIndex(MediaSetAccess &media_r, const Pathname &destdir_r, const Pathname &masterIndex_r)
Common workflow downloading a (signed) master index file.
Downloader for YUM (rpm-nmd) repositories Encapsulates all the knowledge of which files have to be do...
void download(MediaSetAccess &media_r, const Pathname &destDir_r, const ProgressData::ReceiverFnc &progress_r=ProgressData::ReceiverFnc()) override
Download metadata to a local directory.
RepoStatus status(MediaSetAccess &media_r) override
Status of the remote repository.
bool ZYPP_REPOMD_WITH_FILELISTS()
bool ZYPP_REPOMD_WITH_OTHER()
int readdir(std::list< std::string > &retlist_r, const Pathname &path_r, bool dots_r)
Return content of directory via retlist.
void downloadMediaInfo(const Pathname &dest_dir, MediaSetAccess &media, const ProgressData::ReceiverFnc &progressrcv)
Downloads the media info (/media.1) to a local directory.
bool startsWith(const C_Str &str_r, const C_Str &prefix_r)
alias for hasPrefix
bool endsWith(const C_Str &str_r, const C_Str &prefix_r)
alias for hasSuffix
bool strToBool(const C_Str &str, bool default_r)
Parse str into a bool depending on the default value.
Easy-to use interface to the ZYPP dependency resolver.
function< void(const Pathname &file) FileChecker)
Functor signature used to check files.
std::unordered_set< Locale > LocaleSet
Helper filtering the files offered by a RepomdFileReader.
LocaleSet _wantedLocales
Locales do download.
const Pathname & deltaDir() const
const Pathname & _destDir
bool wantLocale(const Locale &locale_r) const
void addWantedLocale(Locale locale_r)
std::map< std::string, OnMediaLocation > _wantedFiles
bool operator()(const OnMediaLocation &loc_r, const std::string &typestr_r)
The callback invoked by the RepomdFileReader.
Impl(Downloader &downloader_r, MediaSetAccess &media_r, const Pathname &destDir_r)