libzypp  14.36.0
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
 

Detailed Description

Functor replacing repository variables.

Replaces '$arch', '$basearch' and $releasever in a string with the global ZYpp 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

Definition at line 56 of file RepoVariables.h.

Member Function Documentation

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

Definition at line 177 of file RepoVariables.cc.


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