Some of you may know about the '$releasever' placeholder which can be used in 
yum .repo files. On openSUSE the variable is substituted by the current 
distributions version (here 13.1):

  $ zypper ar -f -n 'packman ($releasever)' \\$releasever packman
  Adding repository 'packman (13.1)' ................................[done]
  Repository 'packman (13.1)' successfully added
  Enabled     : Yes
  Autorefresh : Yes
  GPG check   : Yes
  URI         :

  $ cat /etc/zypp/repos.d/packman.repo
  name=packman ($releasever)

  $ $ zypper lr packman
  Alias          : packman
  Name           : packman (13.1)
  URI            :

Defined like this, the repo will always match your distributions version. 
After having upgraded to 13.2, the repo will be 'packman (13.2)' at (provided the directory layout 
on the server does not change and a repo for this version is already 

The missing link is the distribution upgrade itself; the system is still 13.1 
but you want to refer to the 13.2 repos.

This gap is now closed by the new '--releasever VERSION' global option. It 
allows to define the substitution value for '$releasever':

  $ zypper --releasever 31.2 lr packman
  Alias          : packman
  Name           : packman (13.2)
  URI            :

To check where '$releasever' is used and where still fixed version strings 

  $ zypper --releasever @--HERE--@ lr -u

You can directly edit the /etc/zypp/repos.d/*.repo files and add $releasever 
to names and baseurls. Don't use it within the alias, it won't be replaced 

If all repos are prepared you can try switching to the new version repos:

  $ zypper --releasever 31.2 refresh

If you're lucky and all required repos are available you can upgrade:

  $ zypper --releasever 31.2 dup

Once openSUSE 13.2 is installed, the --releasever option is no longer needed.


    Michael Andres

Key fingerprint = 2DFA 5D73 18B1 E7EF A862  27AC 3FB8 9E3A 27C6 B0E4
Michael Andres       SUSE LINUX GmbH, Development,
Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 74 053-0
SUSE Linux GmbH GF: Felix Imend├Ârffer, Jane Smithard, Jennifer Guild
       Dilip Upmanyu, Graham Norton, HRB 21284 (AG N├╝rnberg)
To unsubscribe, e-mail:
To contact the owner, e-mail:

Reply via email to