libzypp 17.37.17
zypp::repo::RepoVariablesStringReplacer Struct Reference

Functor replacing repository variables. More...

#include <zypp/repo/RepoVariables.h>

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 105 of file RepoVariables.h.

Member Function Documentation

◆ operator()() [1/2]

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

Definition at line 558 of file RepoVariables.cc.

◆ operator()() [2/2]

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

Definition at line 562 of file RepoVariables.cc.


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