repos and $releasever

Hi,

I’m a little confused about my repos, after upgrading to 15.3.

Please ignore the home*, server* and devel* repos, I’ve added them manually.

That’s how the repos are shown by zypper:

# zypper repos --uri
Die Repository-Prioritäten sind ohne Effekt. Alle aktivierten Repositorys teilen sich die gleiche Priorität.

#  | Alias                           | Name                                                                                        | Enabled   | GPG Check       | Refresh        | URI
---+---------------------------------+---------------------------------------------------------------------------------------------+-----------+-----------------+----------------+----------------------------------------------------------------------------------------
 1 | openSUSE_Leap_$releasever       | home:sdoconnell:coturn.repo                                                                 | Nein      | ----            | ----           | https://download.opensuse.org/repositories/home:/sdoconnell:/coturn/openSUSE_Leap_15.3/
 2 | openSUSE_Leap_${releasever}     | server:monitoring                                                                           | Nein      | ----            | ----           | https://download.opensuse.org/repositories/server:/monitoring/openSUSE_Leap_15.3/
 3 | openSUSE_Leap_${releasever}_1   | devel-languages-perl                                                                        | Nein      | ----            | ----           | https://download.opensuse.org/repositories/devel:/languages:/perl/openSUSE_Leap_15.3/
 4 | repo-$releasever-non-oss        | openSUSE-15.1 Non-OSS                                                                       | Ja        | (r ) Ja         | Nein           | http://download.opensuse.org/distribution/leap/15.3/repo/non-oss/
 5 | repo-$releasever-oss            | openSUSE-15.1 OSS                                                                           | Ja        | (r ) Ja         | Nein           | http://download.opensuse.org/distribution/leap/15.3/repo/oss/
 6 | repo-$releasever-update-non-oss | openSUSE-15.1 Updates Non-OSS                                                               | Ja        | (r ) Ja         | Ja             | http://download.opensuse.org/update/leap/15.3/non-oss/
 7 | repo-$releasever-update-oss     | openSUSE-15.1 Updates OSS                                                                   | Ja        | (r ) Ja         | Ja             | http://download.opensuse.org/update/leap/15.3/oss
 8 | repo-backports-debug-update     | Update repository with updates for openSUSE Leap debuginfo packages from openSUSE Backports | Nein      | ----            | ----           | http://download.opensuse.org/update/leap/15.3/backports_debug/
 9 | repo-backports-update           | Update repository of openSUSE Backports                                                     | Ja        | (r ) Ja         | Ja             | http://download.opensuse.org/update/leap/15.3/backports/
10 | repo-sle-debug-update           | Update repository with debuginfo for updates from SUSE Linux Enterprise 15                  | Nein      | ----            | ----           | http://download.opensuse.org/debug/update/leap/15.3/sle/
11 | repo-sle-update                 | Update repository with updates from SUSE Linux Enterprise 15                                | Ja        | (r ) Ja         | Ja             | http://download.opensuse.org/update/leap/15.3/sle/
12 | server:php:applications.repo    | server:php:applications.repo                                                                | Ja        | (r ) Ja         | Ja             | http://download.opensuse.org/repositories/server:/php:/applications/openSUSE_Leap_15.3/

For me at first a strange mismatch between “Name”, containing “…15.1…” and the URLs, which good luck are correct.

And, more confusing, if I look at /etc/zypp/repos.d, string “…15.2…” is shown:

# ls -l
insgesamt 48
-rw-r--r-- 1 root root 222  2. Jul 12:20 coturn.repo
-rw-r--r-- 1 root root 207  2. Jul 12:20 openSUSE_Leap_15.2_1.repo
-rw-r--r-- 1 root root 210  2. Jul 12:20 openSUSE_Leap_15.2.repo
-rw-r--r-- 1 root root 244  2. Jul 12:20 repo-backports-debug-update.repo
-rw-r--r-- 1 root root 199  2. Jul 12:20 repo-backports-update.repo
-rw-r--r-- 1 root root 193  2. Jul 12:20 repo-distribution-non-oss.repo
-rw-r--r-- 1 root root 181  2. Jul 12:20 repo-distribution-oss.repo
-rw-r--r-- 1 root root 222  2. Jul 12:20 repo-sle-debug-update.repo
-rw-r--r-- 1 root root 208  2. Jul 12:20 repo-sle-update.repo
-rw-r--r-- 1 root root 197  2. Jul 12:20 repo-update-non-oss.repo
-rw-r--r-- 1 root root 184  2. Jul 12:20 repo-update-oss.repo
-rw-r--r-- 1 root root 226  2. Jul 12:20 server:php:applications.repo.repo

All working as of now, live upgrade yesterday ran smooth, but makes me nervous :slight_smile:
Any suggestion for a cleanup?

Thanks,
Michael

Your last Code-Tag showing the names of the files that stored the Info for zypper…
No Problem.

You can change the Alias or Name also by changing it in the files you posted…
I think you have added 15.2 in your Alias and used the sed command to change the URL…

As you may have already found out, the URLs (defined in baseurl=) are the deciding factor. They tell zypper/YaST where the repos are.

The names are just names and should tell you, the system manager, what these repos are for. And yes, having the string 15.1 in that name is confusing. Better choose a name that tells what the repo is for, but without pointer to any version in it.

The Aliases are more or less the same. They should be easy to remember and easy to use in shell commands (mostly using zypper). You wil find that the Alias is defined in the *.repo file (between the ] and also is used as the file name for the repo (with the .repo suffix added).
It seems that some software that adds repos take unneeded difficult names for repos, I have even seen the URL put in it as part of an Alias. Again, maybe better change them to short strings and without any version indication, not even $releasever.

As an example, I tidied up my 15.2 repos:

boven:/etc/zypp/repos.d # l
total 60
drwxr-xr-x  2 root root 4096 Jun  8 10:15 ./
drwxr-xr-x 12 root root 4096 Jun  8 10:15 ../
-rw-r--r--  1 root root  170 Jun  7 12:32 debug-non-oss.repo
-rw-r--r--  1 root root  173 Jun  7 12:32 debug-update-non-oss.repo
-rw-r--r--  1 root root  157 Jun  7 12:32 debug-update.repo
-rw-r--r--  1 root root  154 Jun  7 12:32 debug.repo
-rw-r--r--  1 root root  139 Jun  7 12:32 libdvdcss.repo
-rw-r--r--  1 root root  174 Jun  7 12:32 main-non-oss.repo
-rw-r--r--  1 root root  158 Jun  7 12:32 main.repo
-rw-r--r--  1 root root  164 Jun  7 12:32 packman.repo
-rw-r--r--  1 root root  173 Jun  7 12:32 source-non-oss.repo
-rw-r--r--  1 root root  157 Jun  7 12:32 source.repo
-rw-r--r--  1 root root  184 Jun  7 12:32 teams.repo
-rw-r--r--  1 root root  167 Jun  7 12:32 update-non-oss.repo
-rw-r--r--  1 root root  150 Jun  7 12:32 update.repo
boven:/etc/zypp/repos.d # 

And the contents of some:

oven:/etc/zypp/repos.d # cat main.repo 
[main]
name=Main (OSS)
enabled=1
autorefresh=1
baseurl=http://download.opensuse.org/distribution/leap/$releasever/repo/oss/
path=/
type=rpm-md
keeppackages=0
boven:/etc/zypp/repos.d # cat packman.repo 
[packman]
name=Packman
enabled=1
autorefresh=1
baseurl=https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_$releasever/
path=/
type=rpm-md
keeppackages=0
boven:/etc/zypp/repos.d #

@Sauerland and @hcvv: THANK YOU for helping!

Cleaned everything up, looks fine now. Seems to be relicts from ancient upgrades, started with 42.1 on my VPS and 13.1 on my PC @home :slight_smile:

Yes, the $releasever feature was introduced in a version (I am not sure which one, 15.0 or so) and of course only with a new installation from that version on, it was installed in the (then new) repo definitions. All older versions, while upgraded to a newer version, would still have no $releasever in their already existing definitions (as distributor I guess you would not take any risk in changing existing definitions that might, very painfully, be created by a system manager).

I added the $releseaver in my definitions after I read about the new feature (and took the opportunity to tidy things up on the go).