libzypp 17.31.1
zypp::repo::RepoVariablesStringReplacer Struct Reference

Functor replacing repository variables. More...

#include <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 '.' ).

The $releasever value is overwritten by the environment variable ZYPP_REPO_RELEASEVER. This might be handy for distribution upogrades like this:
$ zypper lr -u
$ zypper dup
....upgrades to 13.2...
Use faked releasever (e.g.
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:$arch/ ->$basearch ->
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 545 of file

◆ operator()() [2/2]

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

Definition at line 549 of file

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