12 #include <type_traits> 16 #include <string_view> 20 #include <zypp-core/base/DefaultIntegral> 37 #include <zypp-core/base/InputStream> 61 repo::RepoType probeCache(
const Pathname & path_r )
64 if ( PathInfo(path_r).isDir() )
66 if ( PathInfo(path_r/
"/repodata/repomd.xml").isFile() )
68 else if ( PathInfo(path_r/
"/content").isFile() )
70 else if ( PathInfo(path_r/
"/cookie").isFile() )
73 DBG <<
"Probed cached type " << ret <<
" at " << path_r << endl;
86 const char * envp = getenv(
"XDG_CACHE_HOME" );
91 ret = getenv(
"HOME" );
111 ,
_type(repo::RepoType::NONE_e)
149 std::string licenseStem(
"license" );
150 if ( !name_r.empty() )
153 licenseStem += name_r;
211 bool isAutoMirrorList =
false;
224 MIL <<
"Detected opensuse.org baseUrl with no mirrors, requesting them from : " << mlurl.
asString() << std::endl;
225 isAutoMirrorList =
true;
241 MIL <<
"Mirrorlist failed, repo either returns invalid data or has no mirrors at all!" << std::endl;
242 if ( !isAutoMirrorList ) {
244 data.
set(
"error", e );
263 origins.
addEndpoints( mirrs.transformedBegin(), mirrs.transformedEnd() );
286 return (*
baseUrls().transformedBegin()).asString();
287 return std::string();
320 [
this](
int num_r,
const std::string& line_r )->
bool 324 std::vector<std::string> words;
325 if (
str::split( line_r, std::back_inserter(words) ) > 1
326 && words[0].length() == 12 )
328 this->
_keywords.second.insert( ++words.begin(), words.end() );
359 return indeterminate;
367 if (
PathInfo(gpgcheckFile).isExist() )
369 TriBool linkval( indeterminate );
392 static const Pathname truePath(
"true" );
393 static const Pathname falsePath(
"false" );
394 static const Pathname indeterminatePath(
"indeterminate" );
397 static const ssize_t bufsiz = 63;
398 static char buf[bufsiz+1];
400 buf[ret == -1 ? 0 : ret] =
'\0';
405 if ( linkval == truePath )
407 else if ( linkval == falsePath )
409 else if ( linkval == indeterminatePath )
410 ret_r = indeterminate;
525 static const std::set<std::string_view> _builtins { {
526 "repo_sigcheck_plugin",
528 if ( _builtins.count( key_r ) )
530 if ( key_r.find(
'=' ) == std::string::npos )
532 return indeterminate;
548 template <
typename Fnc>
553 if ( indeterminate(dumpable) )
555 if constexpr ( std::is_invocable_v<Fnc, std::string_view, std::string_view, bool> ) {
556 fnc_r( k, v,
bool(dumpable) );
558 else if constexpr ( std::is_invocable_v<Fnc, std::string_view, std::string_view> ) {
562 static_assert( zyppng::always_false_v<Fnc>,
"Lambda must accept (k, v) or (k, v, b)" );
578 mutable std::pair<FalseBool, std::set<std::string> >
_keywords;
582 friend Impl * rwcowClone<Impl>(
const Impl * rhs );
585 {
return new Impl( *
this ); }
592 return str <<
"RepoInfo::Impl";
604 : _pimpl( new
Impl() )
680 {
if ( !
sameTriboolState( lhs, rhs ) ) { lhs = rhs;
return true; }
return false; }
684 bool changed =
false;
685 if ( changeGpgCheckTo( ogpg[0], g ) ) changed =
true;
686 if ( changeGpgCheckTo( ogpg[1], r ) ) changed =
true;
687 if ( changeGpgCheckTo( ogpg[2], p ) ) changed =
true;
697 bool changed =
false;
701 changed = changeGpgCheckTo( ogpg,
true, indeterminate, indeterminate );
704 changed = changeGpgCheckTo( ogpg,
true,
true,
true );
707 changed = changeGpgCheckTo( ogpg,
true,
false,
false );
710 changed = changeGpgCheckTo( ogpg,
true,
false, indeterminate );
713 changed = changeGpgCheckTo( ogpg,
true, indeterminate,
false );
716 changed = changeGpgCheckTo( ogpg, indeterminate, indeterminate, indeterminate );
719 changed = changeGpgCheckTo( ogpg,
false, indeterminate, indeterminate );
747 void RepoInfo::setMirrorListUrl(
const Url & url_r )
749 void RepoInfo::setMirrorListUrls( url_set urls )
751 void RepoInfo::setMetalinkUrls( url_set urls )
941 if ( licenseTgz.empty() )
945 cmd.push_back(
"tar" );
946 cmd.push_back(
"-t" );
947 cmd.push_back(
"-z" );
948 cmd.push_back(
"-f" );
949 cmd.push_back( licenseTgz.asString() );
953 static const std::string noAcceptanceFile =
"no-acceptance-needed\n";
956 if ( output == noAcceptanceFile )
962 MIL <<
"License(" << name_r <<
") in " <<
name() <<
" has to be accepted: " << (accept?
"true":
"false" ) << endl;
971 {
return getLicense( std::string(), lang_r ); }
976 if ( avlocales.empty() )
977 return std::string();
980 if ( !getLang && avlocales.find(
Locale::noCode ) == avlocales.end() )
982 WAR <<
"License(" << name_r <<
") in " <<
name() <<
" contains no fallback text!" << endl;
986 getLang = *avlocales.begin();
990 static const std::string licenseFileFallback(
"license.txt" );
991 std::string licenseFile( !getLang ? licenseFileFallback
995 cmd.push_back(
"tar" );
996 cmd.push_back(
"-x" );
997 cmd.push_back(
"-z" );
998 cmd.push_back(
"-O" );
999 cmd.push_back(
"-f" );
1001 cmd.push_back( licenseFile );
1020 if ( licenseTgz.empty() )
1024 cmd.push_back(
"tar" );
1025 cmd.push_back(
"-t" );
1026 cmd.push_back(
"-z" );
1027 cmd.push_back(
"-f" );
1028 cmd.push_back( licenseTgz.asString() );
1034 static const C_Str license(
"license." );
1035 static const C_Str dotTxt(
".txt\n" );
1038 if ( output.size() <= license.
size() + dotTxt.
size() )
1041 ret.insert(
Locale( std::string( output.c_str()+license.
size(), output.size()- license.
size() - dotTxt.
size() ) ) );
1057 str <<
"- url : " <<
url << std::endl;
1062 auto strif( [&] (
const std::string & tag_r,
const std::string & value_r ) {
1063 if ( ! value_r.empty() )
1064 str << tag_r << value_r << std::endl;
1070 str <<
"- type : " <<
type() << std::endl;
1071 str <<
"- priority : " <<
priority() << std::endl;
1074 #define OUTS(T,B) ( indeterminate(T) ? (std::string("D(")+(B?"Y":"N")+")") : ((bool)T?"Y":"N") ) 1084 str <<
"- gpgkey : " <<
url << std::endl;
1090 strif(
"- service : ",
service() );
1097 str << ( builtin_r ?
"- " :
"# " ) << k <<
": " << v << std::endl;
1106 str <<
"# Repository '"<<
alias()<<
"' is maintained by the '"<<
service()<<
"' service." << endl;
1107 str <<
"# Manual changes may be overwritten by a service refresh." << endl;
1108 str <<
"# See also 'man zypper', section 'Services'." << endl;
1110 RepoInfoBase::dumpAsIniOn(
str);
1119 if ( indent.empty() ) indent =
" ";
1124 str <<
"path="<<
path() << endl;
1148 std::string indent(
"gpgkey=");
1151 str << indent <<
url << endl;
1152 if ( indent[0] !=
' ' )
1164 str << k <<
"=" << v << endl;
1180 <<
" priority=\"" <<
priority() <<
"\"" 1181 <<
" enabled=\"" <<
enabled() <<
"\"" 1183 <<
" gpgcheck=\"" <<
gpgCheck() <<
"\"" 1193 str <<
" gpgkey=\"" <<
escape(tmpstr) <<
"\"";
1195 str <<
" mirrorlist=\"" <<
escape(tmpstr) <<
"\"";
1197 str <<
" metalink=\"" <<
escape(tmpstr) <<
"\"";
1203 str <<
"<url>" <<
escape((*it).asString()) <<
"</url>" << endl;
1207 str <<
"<extra key=\"" <<
escape(std::string(k)) <<
"\">" 1208 <<
escape(std::string(v))
1209 <<
"</extra>" << endl;
1212 str <<
"</repo>" << endl;
1226 #define OUTS( V ) case RepoInfo::V: return str << #V; break 1227 OUTS( GpgCheck::On );
1228 OUTS( GpgCheck::Strict );
1229 OUTS( GpgCheck::AllowUnsigned );
1230 OUTS( GpgCheck::AllowUnsignedRepo );
1231 OUTS( GpgCheck::AllowUnsignedPackage );
1233 OUTS( GpgCheck::Off );
1234 OUTS( GpgCheck::indeterminate );
1237 return str <<
"GpgCheck::UNKNOWN";
1245 bool canSkipMediaCheck = std::all_of( origins.begin(), origins.end(), [](
const MirroredOrigin &origin ) {
return origin.authority().url().schemeIsDownloading(); });
1246 if ( canSkipMediaCheck ) {
1248 if ( not mDataPath.empty() ) {
1249 PathInfo mediafile { mDataPath/
"media.1/media" };
1250 if ( mediafile.isExist() ) {
1252 if ( lverifier && lverifier.totalMedia() > 1 ) {
1253 canSkipMediaCheck =
false;
1258 if ( canSkipMediaCheck )
1259 DBG <<
"Can SKIP media.1/media check for status calc of repo " <<
alias() << endl;
1260 return not canSkipMediaCheck;
static const Locale noCode
Empty code.
std::map< std::string, std::string > _extraValues
Basically raw .repo file key-value lines.
const RepoVariablesReplacedUrl & mirrorListUrl() const
THE mirrorListUrl to work with (either_cfgMirrorlistUrl or _cfgMetalinkUrl)
Pathname filepath() const
File where this repo was read from.
static const ContentType repoRefreshMirrorlist
const RepoVariablesReplacedUrl & cfgMirrorlistUrl() const
Config file writing needs to tell them appart.
void setBaseUrl(Url url)
Clears current base URL list and adds url.
Pathname path() const
Repository path.
unsigned priority() const
Repository priority for solver.
bool hasLicense() const
Whether there is a license associated with the repo.
url_set gpgKeyUrls() const
The list of gpgkey URLs defined for this repo.
ZYPP_API detail::EscapedString escape(const std::string &in_r)
Escape xml special charaters (& -> &; from IoBind library).
void setGpgKeyUrl(const Url &gpgkey)
(leagcy API) Set the gpgkey URL defined for this repo
static unsigned defaultPriority()
The default priority (99).
Url rawGpgKeyUrl() const
(leagcy API) The 1st raw gpgkey URL defined for this repo (no variables replaced) ...
Url rawUrl() const
Pars pro toto: The first repository raw url (no variables replaced) this is either rawBaseUrls()...
TriBool rawPkgGpgCheck() const
const std::set< std::string > & contentKeywords() const
Content keywords defined.
std::chrono::steady_clock::time_point _lastMirrorUrlsUpdate
Namespace intended to collect all environment variables we use.
void packagesPath(Pathname new_r)
void setQueryParam(const std::string ¶m, const std::string &value)
Set or add value for the specified query parameter.
static ZConfig & instance()
Singleton ctor.
std::string service() const
Gets name of the service to which this repository belongs or empty string if it has been added manual...
bool usesAutoMetadataPaths() const
void setProbedType(const repo::RepoType &t) const
This allows to adjust the RepoType lazy, from NONE to some probed value, even for const objects...
void setPriority(unsigned newval_r)
Set repository priority for solver.
zypp::Url propagateQueryParams(zypp::Url url_r, const zypp::Url &template_r)
Pathname systemPackagesPath() const
Returns a path to the system-defined package cache.
void forDumpableExtraValues(Fnc &&fnc_r) const
Filter discarding not dumpable extra values.
MirroredOriginSet repoOrigins() const
The repodata origins.
int readlink(const Pathname &symlink_r, Pathname &target_r)
Like 'readlink'.
std::string asString(const Patch::Category &obj)
relates: Patch::Category string representation.
void rawGpgCheck(TriBool val_r)
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
Url rawCfgMetalinkUrl() const
The configured raw metalink url.
void addAuthorityEndpoint(OriginEndpoint endpoint)
Adds a single endpoint as an authority, routing it to the correct MirroredOrigin. ...
RepoVariablesReplacedUrl _cfgMirrorlistUrl
std::unordered_set< Locale > LocaleSet
const char * c_str() const
String representation.
bool pkgGpgCheckIsMandatory() const
Mandatory check (pkgGpgCheck is not off) must ask to confirm using unsigned packages.
int forEachLine(std::istream &str_r, const function< bool(int, std::string)> &consume_r)
Simple lineparser: Call functor consume_r for each line.
url_set rawGpgKeyUrls() const
The list of raw gpgkey URLs defined for this repo (no variables replaced)
String related utilities and Regular expression matching.
What is known about a repository.
bool hasExtraValue(const std::string &key_r) const
static bool warning(const std::string &msg_r, const UserData &userData_r=UserData())
send warning text
void setGpgCheck(TriBool value_r)
Set the value for gpgCheck (or indeterminate to use the default).
TriBool _rawPkgGpgCheck
need to check pkg sign.: Y/N/(ZConf(Y/N/gpgCheck))
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
std::string receiveLine()
Read one line from the input stream.
Request the standard behavior (as defined in zypp.conf or 'Job')
std::string basename() const
Return the last component of this path.
const RepoVariablesReplacedUrl & cfgMetalinkUrl() const
Config file writing needs to tell them appart.
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...
void internalSetValidRepoSignature(TriBool value_r)
Url gpgKeyUrl() const
(leagcy API) The 1st gpgkey URL defined for this repo
RepoVariablesReplacedUrl baseUrl() const
TriBool internalValidRepoSignature() const
Signature check result needs to be stored/retrieved from _metadataPath.
bool repoGpgCheck() const
Whether the signature of repo metadata should be checked for this repo.
bool triBoolFromPath(const Pathname &path_r, TriBool &ret_r) const
const_iterator begin() const
Iterator pointing to the first result.
void setValidRepoSignature(TriBool value_r)
Set the value for validRepoSignature (or indeterminate if unsigned).
urls_const_iterator baseUrlsBegin() const
iterator that points at begin of repository urls
bool seekToNode(int depth_r, const std::string &name_r)
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
bool baseUrlsEmpty() const
whether repository urls are available
bool emptyOrRoot() const
Test for "" or "/".
void setMirrorlistUrl(const Url &url)
Set the raw mirrorlist url.
std::string extraValue(const std::string &key_r) const
Return extra value for key_r or throws std::out_of_range.
const std::string & asString() const
MirroredOriginSet repoOrigins() const
RepoVariablesReplacedUrlList _baseUrls
baseUrls as configured
static Locale bestMatch(const LocaleSet &avLocales_r, Locale requested_r=Locale())
Return the best match for Locale requested_r within the available avLocales_r.
Url url() const
Pars pro toto: The first repository url, this is either baseUrls().front() or if no baseUrl is define...
Url mirrorListUrl() const
Url of a file which contains a list of repository urls.
bool empty() const
Test for an empty path.
void setPathName(const std::string &path, EEncoding eflag=zypp::url::E_DECODED)
Set the path name.
bool keepPackages() const
Whether packages downloaded from this repository will be kept in local cache.
unsigned split(const C_Str &line_r, TOutputIterator result_r, const C_Str &sepchars_r=" \, const Trim trim_r=NO_TRIM)
Split line_r into words.
std::string asString() const
Returns a default string representation of the Url object.
void resetMirrorUrls() const
bool gpgKeyUrlsEmpty() const
Whether gpgkey URLs are defined.
Url rawCfgMirrorlistUrl() const
The configured raw mirrorlist url.
filesystem::Pathname XDG_CACHE_HOME()
XDG_CACHE_HOME: base directory relative to which user specific non-essential data files should be sto...
GpgCheck
Some predefined settings.
TriBool pkgGpgCheck() const
Check rpm package signatures (indeterminate - according to gpgcheck)
std::string repoStatusString() const
bool pkgGpgCheck() const
Whether the signature of rpm packages should be checked for this repo.
bool setExtraValue(const std::string &key_r, std::string value_r)
Pathname packagesPath() const
Execute a program and give access to its io An object of this class encapsulates the execution of an ...
bool set(const std::string &key_r, AnyType val_r)
Set the value for key (nonconst version always returns true).
bool repoGpgCheckIsMandatory() const
Mandatory check (repoGpgCheck is on) must ask to confirm using unsigned repos.
Manages a data source characterized by an authoritative URL and a list of mirror URLs.
RepoVariablesReplacedUrlList & baseUrls()
void setRepoGpgCheck(TriBool value_r)
Set the value for repoGpgCheck (or indeterminate to use the default).
const std::string & asString() const
String representation.
TriBool triBoolFromPath(const Pathname &path_r) const
std::string alias() const
unique identifier for this source.
bool isExist() const
Return whether valid stat info exists.
std::string escape(const C_Str &str_r, const char sep_r)
Escape desired character c using a backslash.
std::string extraValue(const std::string &key_r) const
void addContent(const std::string &keyword_r)
bool gpgCheck() const
Turn signature checking on/off (on)
Convenience char* constructible from std::string and char*, it maps (char*)0 to an empty string...
std::optional< Pathname > _alternatePackagesPath
in case _packagesPath is not writable
Url rawMirrorListUrl() const
The raw mirrorListUrl (no variables replaced).
void setPath(const Pathname &path)
set the product path.
TriBool validRepoSignature() const
Whether the repo metadata are signed and successfully validated or indeterminate if unsigned...
Pathname dirname() const
Return all but the last component od this path.
LocaleSet getLicenseLocales() const
Return the locales the license is available for.
void setService(const std::string &name)
sets service which added this repository
RepoVariablesReplacedUrl _cfgMetalinkUrl
void setMetadataPath(const Pathname &path)
Set the path where the local metadata is stored.
bool baseUrlSet() const
Whether there are manualy configured repository urls.
RepoVariablesReplacedUrlList & gpgKeyUrls()
bool hasExtraValue(const std::string &key_r) const
Whether an extra value for key_r is set.
bool startsWith(const C_Str &str_r, const C_Str &prefix_r)
alias for hasPrefix
int close() override
Wait for the progamm to complete.
void getRawGpgChecks(TriBool &g_r, TriBool &r_r, TriBool &p_r) const
Raw values for RepoManager.
void setType(const repo::RepoType &t)
set the repository type
TriBool repoGpgCheck() const
Check repo matadata signatures (indeterminate - according to gpgcheck)
bool gpgCheck() const
Whether default signature checking should be performed.
TriBool _rawGpgCheck
default gpgcheck behavior: Y/N/ZConf
bool repoOriginsEmpty() const
whether repo origins are available
TriBool _validRepoSignature
have signed and valid repo metadata
bool hasContent() const
Check for content keywords.
std::vector< MirroredOrigin > _repoOrigins
std::pair< FalseBool, std::set< std::string > > _keywords
Pathname predownloadPath() const
void setKeepPackages(bool keep)
Set if packaqes downloaded from this repository will be kept in local cache.
std::string getLicense(const Locale &lang_r=Locale()) const
Return the best license for the current (or a specified) locale.
bool baseurl2dump() const
bool empty() const
Whether matches were found.
std::string asString(const Url &url_r)
url_set::size_type urls_size_type
bool seekToEndNode(int depth_r, const std::string &name_r)
const RepoVariablesReplacedUrlList & baseUrls() const
TriBool cfgPkgGpgCheck() const
std::ostream & dumpOn(std::ostream &str) const override
Write a human-readable representation of this RepoInfo object into the str stream.
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
relates: Capability Detailed stream output
TriBool _rawRepoGpgCheck
need to check repo sign.: Y/N/(ZConf(Y/N/gpgCheck))
bool requireStatusWithMediaFile() const
Returns true if this repository requires the media.1/media file to be included in the metadata status...
Find pathnames matching a pattern.
Pathname metadataPath() const
Path where this repo metadata was read from.
std::vector< std::string > Arguments
transform_iterator< repo::RepoVariablesUrlReplacer, url_set::const_iterator > urls_const_iterator
int unlink(const Pathname &path)
Like 'unlink'.
static const RepoType NONE
std::ostream & dumpAsXmlOn(std::ostream &str, const std::string &content="") const override
Write an XML representation of this RepoInfo object.
static const unsigned noPriority
repo::RepoType type() const
Pathname predownloadPath() const
Path where this repo packages are predownloaded.
TriBool isBuiltinExtraValue(std::string_view key_r) const
Return bool whether a dumpable key_r is known; indeterminate if the key must not be dumped...
bool usesAutoMetadataPaths() const
Whether metadataPath uses AUTO% setup.
int add(const Pathname &pattern_r, Flags flags_r=Flags())
Add pathnames matching pattern_r to the current result.
void setPackagesPath(const Pathname &path)
set the path where the local packages are stored
void addEndpoints(InputIterator first, InputIterator last)
A convenience method to add multiple endpoints from a range.
'Language[_Country]' codes.
static bool urlSupportsMirrorLink(const zypp::Url &url)
void setMetalinkUrl(const Url &url)
Set the raw metalink url.
static const RepoType RPMMD
void setGpgKeyUrls(url_set urls)
Set a list of gpgkey URLs defined for this repo.
const std::set< std::string > & contentKeywords() const
int symlink(const Pathname &oldpath, const Pathname &newpath)
Like 'symlink'.
void setProbedType(const repo::RepoType &t) const
static const RepoType YAST2
bool hasSuffix(const C_Str &str_r, const C_Str &suffix_r)
Return whether str_r has suffix suffix_r.
void rawRepoGpgCheck(TriBool val_r)
url_set rawBaseUrls() const
The complete set of raw repository urls (no variables replaced)
void setTargetDistribution(const std::string &targetDistribution)
Sets the distribution for which is this repository meant.
bool needToAcceptLicense() const
Whether the repo license has to be accepted, e.g.
Base class for Exception.
std::ostream & dumpAsIniOn(std::ostream &str) const override
Write this RepoInfo object into str in a .repo file format.
Impl & operator=(const Impl &)=delete
Url location() const
Returns the location URL for the repository, this is either the first configured baseUrl or a configu...
XmlString nodeText()
If the current node is not empty, advances the reader to the next node, and returns the value...
void addBaseUrl(Url url)
Add a base url.
void setMirrorlistUrl(const Url &url_r)
const RepoVariablesReplacedUrlList & gpgKeyUrls() const
bool sameTriboolState(tribool lhs, tribool rhs)
relates: TriBool whether 2 tribool have the same state (this is NOT ==)
std::string name() const
Repository name.
void pathNameSetTrailingSlash(bool apply_r=true)
Apply or remove a trailing '/' from pathName.
std::string asString() const
Explicit conversion to std::string.
Pathname licenseTgz(const std::string &name_r) const
Path to a license tarball in case it exists in the repo.
bool userMayWriteOrCreateDir(const Pathname &path_r)
Returns whether path_r denotes an existing directory with write permission for the current user or an...
void setType(const repo::RepoType &t)
bool internalUnsignedConfirmed() const
We definitely have a symlink pointing to "indeterminate" (for repoGpgCheckIsMandatory)? I.e.
RepoVariablesReplacedUrlList _gpgKeyUrls
Typesafe passing of user data via callbacks.
TriBool rawRepoGpgCheck() const
DefaultIntegral< unsigned, defaultPriority > priority
std::string targetDistribution() const
Distribution for which is this repository meant.
base::ValueTransform< Url, repo::RepoVariablesUrlReplacer > RepoVariablesReplacedUrl
relates: RepoVariablesUrlReplacer Helper managing repo variables replaced urls
Pathname packagesPath() const
packagesPath Checks if the effective user is allowed to write into the system package cache...
void setBaseUrls(url_set urls)
Clears current base URL list and adds an url_set.
Wrapper class for ::stat/::lstat.
static const RepoInfo noRepo
Represents no Repository (one with an empty alias).
std::string repoStatusString() const
A string value to track changes requiring a refresh.
urls_const_iterator baseUrlsEnd() const
iterator that points at end of repository urls
void addContent(const std::string &keyword_r)
Add content keywords.
void rawPkgGpgCheck(TriBool val_r)
static const RepoType RPMPLAINDIR
bool autorefresh() const
If true, the repostory must be refreshed before creating resolvables from it.
urls_size_type baseUrlsSize() const
number of repository urls
void setMetalinkUrl(const Url &url_r)
std::ostream & operator<<(std::ostream &str, const Capabilities &obj)
relates: Capabilities Stream output
const std::vector< Url > & getUrls() const
urls_size_type gpgKeyUrlsSize() const
Number of gpgkey URLs defined.
Pathname metadataPath() const
TriBool rawGpgCheck() const
Easy-to use interface to the ZYPP dependency resolver.
Pathname systemPackagesPath() const
Represents a single, configurable network endpoint, combining a URL with specific access settings...
static const unsigned defaultPriority
RepoVariablesReplacedUrlList _mirrorUrls
possible mirrors as fetched via mirrorlist or metalink
Impl * clone() const
clone for RWCOW_pointer
static unsigned noPriority()
The least priority (unsigned(-1)).
bool hasPrefix(const C_Str &str_r, const C_Str &prefix_r)
Return whether str_r has prefix prefix_r.
RepoVariablesReplacedUrlList & mirrorUrls() const
Fetch the repo mirrors from the server.
url_set baseUrls() const
The complete set of repository urls as configured.
void setPkgGpgCheck(TriBool value_r)
Set the value for pkgGpgCheck (or indeterminate to use the default).
repo::RepoType type() const
Type of repository,.
TriBool cfgRepoGpgCheck() const
const char * c_str() const
bool effectiveKeepPackages() const
keepPackages unless the package cache itself enforces keeping the packages.
bool setExtraValue(const std::string &key_r, std::string value_r)
Remember extra value_r for key_r.
void metadataPath(Pathname new_r)
A smart container that manages a collection of MirroredOrigin objects, automatically grouping endpoin...
Repository type enumeration.
bool hasContent(const std::string &keyword_r) const