14#include <solv/solvversion.h>
20 static bool val = [](){
21 const char *
env = getenv(
"ZYPP_REPOMD_WITH_OTHER");
29 static bool val = [](){
30 const char *
env = getenv(
"ZYPP_REPOMD_WITH_FILELISTS");
44 if ( ! prefix_r.
empty() && prefix_r !=
"/" )
59 size_t hypoff =
base.find(
'-' );
60 if ( hypoff != std::string::npos )
61 base.replace( 0, hypoff + 1,
"" );
63 std::list<std::string> retlist;
66 for (
const auto & fn : retlist )
72 if ( !deltafile.
empty() )
113#if defined(LIBSOLVEXT_FEATURE_ZCHUNK_COMPRESSION)
114 const std::string & basetype { zchk ? typestr_r.substr( 0, typestr_r.size()-4 ) : typestr_r };
118 const std::string & basetype { typestr_r };
'Language[_Country]' codes.
Locale fallback() const
Return the fallback locale for this locale, if no fallback exists the empty Locale::noCode.
static ZConfig & instance()
Singleton ctor.
Wrapper class for stat/lstat.
std::string basename() const
Return the last component of this path.
bool empty() const
Test for an empty path.
Namespace intended to collect all environment variables we use.
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.
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.
const Pathname & _destDir
void addWantedLocale(Locale locale_r)
virtual ~RepomdFileCollector()
std::map< std::string, OnMediaLocation > _wantedFiles
virtual const Pathname & deltaDir() const =0
bool collect(const OnMediaLocation &loc_r, const std::string &typestr_r)
The callback invoked by the RepomdFileReader.
std::function< void(const OnMediaLocation &file)> FinalizeCb
void finalize(const FinalizeCb &cb)
virtual const RepoInfo & repoInfo() const =0
bool wantLocale(const Locale &locale_r) const
RepomdFileCollector(const Pathname &destDir_r)
LocaleSet _wantedLocales
Locales do download.