54 if (it->first ==
"name" )
56 else if ( it->first ==
"enabled" )
58 else if ( it->first ==
"priority" )
59 info.
setPriority( str::strtonum<unsigned>( it->second ) );
60 else if ( it->first ==
"baseurl" && !it->second.empty())
62 else if ( it->first ==
"path" )
63 info.
setPath( Pathname(it->second) );
64 else if ( it->first ==
"type" )
66 else if ( it->first ==
"autorefresh" )
68 else if ( it->first ==
"mirrorlist" && !it->second.empty())
70 else if ( it->first ==
"gpgkey" && !it->second.empty())
72 std::vector<std::string> keys;
73 str::split( it->second, std::back_inserter(keys) );
77 else if ( it->first ==
"gpgcheck" )
79 else if ( it->first ==
"keeppackages" )
81 else if ( it->first ==
"service" )
83 else if ( it->first ==
"proxy" )
85 if (it->second !=
"_none_" )
95 ERR <<
"Unknown attribute in [" << *its <<
"]: " << it->second <<
" ignored" << endl;
117 : _callback(callback)
125 : _callback(callback)
void setGpgKeyUrl(const Url &gpgkey)
Key to use for gpg checking of this repository.
MapKVIteratorTraits< SectionSet >::Key_const_iterator section_const_iterator
void setQueryParam(const std::string ¶m, const std::string &value)
Set or add value for the specified query parameter.
function< bool(const RepoInfo &)> ProcessRepo
Callback definition.
void setAutorefresh(bool autorefresh)
enable or disable autorefresh
void setPriority(unsigned newval_r)
Set repository priority for solver.
unsigned split(const C_Str &line_r, _OutputIterator result_r, const C_Str &sepchars_r=" \t")
Split line_r into words.
void setMirrorListUrl(const Url &url)
Set mirror list url.
void setEnabled(bool enabled)
enable or disable the repository
void setAlias(const std::string &alias)
set the repository alias
void setFilepath(const Pathname &filename)
set the path to the .repo file
What is known about a repository.
std::ostream & operator<<(std::ostream &str, const IniDict &obj)
RepoFileReader(const Pathname &repo_file, const ProcessRepo &callback, const ProgressData::ReceiverFnc &progress=ProgressData::ReceiverFnc())
Constructor.
bool isValid() const
Verifies the Url.
function< bool(const ProgressData &)> ReceiverFnc
Most simple version of progress reporting The percentage in most cases.
static void repositories_in_stream(const InputStream &is, const RepoFileReader::ProcessRepo &callback, const ProgressData::ReceiverFnc &progress)
List of RepoInfo's from a file.
void setPath(const Pathname &path)
set the product path.
void setService(const std::string &name)
sets service which added this repository
section_const_iterator sectionsBegin() const
void setType(const repo::RepoType &t)
set the repository type
void setKeepPackages(bool keep)
Set if packaqes downloaded from this repository will be kept in local cache.
Read repository data from a .repo file.
entry_const_iterator entriesEnd(const std::string §ion) const
void addBaseUrl(const Url &url)
Add a base url.
Parses a INI file and offers its structure as a dictionary.
bool strToTrue(const C_Str &str)
Parsing boolean from string.
Regular expression match result.
entry_const_iterator entriesBegin(const std::string §ion) const
void setGpgCheck(bool check)
Whether to check or not this repository with gpg.
bool regex_match(const std::string &s, smatch &matches, const regex ®ex)
regex ZYPP_STR_REGEX regex ZYPP_STR_REGEX
EntrySet::const_iterator entry_const_iterator
void setName(const std::string &name)
set the repository name
section_const_iterator sectionsEnd() const
Repository type enumeration.