libzypp  16.22.5
zypp::repo::RepoVariablesStringReplacer Struct Reference

Functor replacing repository variables. More...

#include <RepoVariables.h>

Inheritance diagram for zypp::repo::RepoVariablesStringReplacer:

Public Member Functions

std::string operator() (const std::string &value_r) const
 
std::string operator() (std::string &&value_r) const
 

Detailed Description

Functor replacing repository variables.

Replaces the built-in '$arch', '$basearch' and '$releasever' ans also custom repo variables (

See Also
Repository Variables) in a string with the assigned values.

Additionally $releasever_major and $releasever_minor can be used to refer to $releasever major number (everything up to the 1st '.' ) and minor number (everything after the 1st '.' ).

Note
The $releasever value is overwritten by the environment variable ZYPP_REPO_RELEASEVER. This might be handy for distribution upogrades like this:
$ export ZYPP_REPO_RELEASEVER=13.2
$ zypper lr -u
$ zypper dup
....upgrades to 13.2...
The same can be achieved by using zyppers –releasever global option:
$ zypper --releasever 13.2 lr -u
$ zypper --releasever 13.2 dup
....upgrades to 13.2...
(see Environment Variables)
Example:
ftp://user:secret@site.net/$arch/ -> ftp://user:secret@site.net/i686/
http://site.net/?basearch=$basearch -> http://site.net/?basearch=i386
See Also
RepoVarExpand for supported variable syntax.

Definition at line 106 of file RepoVariables.h.

Member Function Documentation

std::string zypp::repo::RepoVariablesStringReplacer::operator() ( const std::string &  value_r) const

Definition at line 540 of file RepoVariables.cc.

std::string zypp::repo::RepoVariablesStringReplacer::operator() ( std::string &&  value_r) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 544 of file RepoVariables.cc.


The documentation for this struct was generated from the following files: