15.1 XFCE Desktop install - How to upgrade to 15.2?


I have here an install with:

zypper repos --uri
Repository priorities are without effect. All enabled repositories share the same priority.

#  | Alias                     | Name                                    | Enabled | GPG Check | Refresh | URI
 1 | openSUSE-Leap-15.0-1      | openSUSE-Leap-15.1-1                    | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/distribution/leap/15.1/repo/oss/
 2 | openSUSE_Leap_15.0        | Mozilla                                 | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/repositories/mozilla/openSUSE_Leap_15.1/
 3 | repo-debug                | openSUSE-Leap-15.1-Debug                | No      | ----      | ----    | http://download.opensuse.org/debug/distribution/leap/15.1/repo/oss/
 4 | repo-debug-non-oss        | openSUSE-Leap-15.1-Debug-Non-Oss        | No      | ----      | ----    | http://download.opensuse.org/debug/distribution/leap/15.1/repo/non-oss/
 5 | repo-debug-update         | openSUSE-Leap-15.1-Update-Debug         | No      | ----      | ----    | http://download.opensuse.org/debug/update/leap/15.1/oss/
 6 | repo-debug-update-non-oss | openSUSE-Leap-15.1-Update-Debug-Non-Oss | No      | ----      | ----    | http://download.opensuse.org/debug/update/leap/15.1/non-oss/
 7 | repo-non-oss              | openSUSE-Leap-15.1-Non-Oss              | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/distribution/leap/15.1/repo/non-oss/
 8 | repo-source               | openSUSE-Leap-15.1-Source               | No      | ----      | ----    | http://download.opensuse.org/source/distribution/leap/15.1/repo/oss/
 9 | repo-source-non-oss       | openSUSE-Leap-15.1-Source-Non-Oss       | No      | ----      | ----    | http://download.opensuse.org/source/distribution/leap/15.1/repo/non-oss/
10 | repo-update               | openSUSE-Leap-15.1-Update               | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.1/oss/
11 | repo-update-non-oss       | openSUSE-Leap-15.1-Update-Non-Oss       | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.1/non-oss/

If I do

zypper --releasever=15.2 ref
Warning: Enforced setting: $releasever=15.2
Repository 'openSUSE-Leap-15.1-1' is up to date.                                                            
Repository 'Mozilla' is up to date.                                                                         
Repository 'openSUSE-Leap-15.1-Non-Oss' is up to date.                                                      
Repository 'openSUSE-Leap-15.1-Update' is up to date.                                                       
Repository 'openSUSE-Leap-15.1-Update-Non-Oss' is up to date.                                               
All repositories have been refreshed.

nothing really happens.

And no success with

zypper --releasever=15.2 dup --download-in-advance
Warning: Enforced setting: $releasever=15.2
Loading repository data...
Reading installed packages...
Warning: You are about to do a distribution upgrade with all enabled repositories. Make sure these repositories are compatible before you continue. See 'man zypper' for more information about this command.
Computing distribution upgrade...

The following item is locked and will not be changed by any action:

Nothing to do.

A .repo looks like


What is the way forward to upgrade to 15.2?

Replace “15.1” with “15.2”.

Hi and thanks!

In all .repo files? That was much easier in the past (only one file to edit). Why is the url “hardcoded” in my .repo files so that the official wiki upgrade method does not work? The install is with EXT4, but that should not make a difference, or?

In the .repo files in /etc/zypp.d/ you must replace 15.1 with $releasever.
Else zypper can not replace $releasever with either the current running release (the default) or the value you force with

Of course read the man page

man zypper

and browse through it by searching vor $releasever.

I am not sure, but my experience is that on later versions (from what version?) at installation, the $releasever is used. This was not the case in older installations and when you have done earlier upgrades by the way of editing the repo files and replacing the version number, the hard version number is still there. Should be edited to $releasever (or stay with doing it as before by replacing 15.1 with 15.2, but that is not as flexible).

I now have

zypper repos --uri
Repository priorities are without effect. All enabled repositories share the same priority.

#  | Alias                     | Name                                    | Enabled | GPG Check | Refresh | URI
 1 | openSUSE-Leap-15.2        | openSUSE-Leap-15.2                      | Yes     | ( p) Yes  | Yes     | http://download.opensuse.org/distribution/leap/15.2/repo/oss/
 2 | openSUSE_Leap_15.2        | Mozilla                                 | Yes     | ( p) Yes  | Yes     | http://download.opensuse.org/repositories/mozilla/openSUSE_Leap_15.2/
 3 | repo-debug                | openSUSE-Leap-15.2-Debug                | No      | ----      | ----    | http://download.opensuse.org/debug/distribution/leap/15.2/repo/oss/
 4 | repo-debug-non-oss        | openSUSE-Leap-15.2-Debug-Non-Oss        | No      | ----      | ----    | http://download.opensuse.org/debug/distribution/leap/15.2/repo/non-oss/
 5 | repo-debug-update         | openSUSE-Leap-15.2-Update-Debug         | No      | ----      | ----    | http://download.opensuse.org/debug/update/leap/15.2/oss/
 6 | repo-debug-update-non-oss | openSUSE-Leap-15.2-Update-Debug-Non-Oss | No      | ----      | ----    | http://download.opensuse.org/debug/update/leap/15.2/non-oss/
 7 | repo-non-oss              | openSUSE-Leap-15.2-Non-Oss              | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/distribution/leap/15.2/repo/non-oss/
 8 | repo-source               | openSUSE-Leap-15.2-Source               | No      | ----      | ----    | http://download.opensuse.org/source/distribution/leap/15.2/repo/oss/
 9 | repo-source-non-oss       | openSUSE-Leap-15.2-Source-Non-Oss       | No      | ----      | ----    | http://download.opensuse.org/source/distribution/leap/15.2/repo/non-oss/
10 | repo-update               | openSUSE-Leap-15.2-Update               | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.2/oss/
11 | repo-update-non-oss       | openSUSE-Leap-15.2-Update-Non-Oss       | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.2/non-oss/

and started a

zypper dup

which is now updating some 1800 packages…

Take care. What you see is what zypper makes of it after replacing all $releasever by the current release. It is not what is in de repo file.

E.g. on one of my systems:

beneden:~ # zypper lr -d | grep 'Main Repo'
 9 | repo-oss                  | Main Repository                    | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.1/repo/oss/            |        
beneden:~ #
beneden:~ # cat /etc/zypp/repos.d/repo-oss.repo
name=Main Repository
beneden:~ # 

But when I force

beneden:~ # zypper --releasever 15.2 lr -d | grep 'Main Repo'
 9 | repo-oss                  | Main Repository                    | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.2/repo/oss/            |        
beneden:~ # 

So, I repeat: to be able to use the global --releasever option, there must ne $releasever strings in the appropriate place in the repo files.

As a little joke and to show that this is only a text replacement:

beneden:~ # zypper --releasever FOO lr -d | grep 'Main Repo'
 9 | repo-oss                  | Main Repository                    | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/FOO/repo/oss/            |        
beneden:~ #

@arvidjaar was faster and I saw your post only after editing .repos and starting zypper dup :-p

Does not matter, doing it by changing the version manualy is fine (after all we used it many times and was in the “official” documentation").
Important is that you know why your way is fine and what the new feature offers you and how to use it when you want to.

It is in fact only a few days ago thant I dug into it to find out what and how. I also found that one of my systems, that was fresh installed with 15.1 has $releasever in the repo specifications, apperently put there at installation. Another system, that was freshly installed with one of the 42 versions (IIRC) and upgraded since with the “change the repos and do zypper dup” method still had 15.1 hard-coded (which is not that strange because I put it there myself at the upgrade).

BTW the current releasever is found by zypper, as @Nrickert posted in another thread):

The value [of $releasever] is obtained from the /product/version XML-node in /etc/products.d/baseproduct.

Hmmm, how about a little remark in the official update documentation that for older installs a different method is neededto upgrade? Might safe some dumb threads (as mine) in the future… :wink:

How about filing documentation bug where it belongs - on bugzilla?

I’m user, not developer… :wink:

Which IMHO means that nobody expects you to change the documentation yoursef (except when it is a Wiki), but as a user you should file bug reports to enable the developers to do something.

Done, see: https://bugzilla.opensuse.org/show_bug.cgi?id=1173399

If you upgraded from an earlier version, then the explicit version number is probably in the repo definition files. If you did a clean install, then it probably uses $releasever for the version number. The simple upgrade method only works in the latter case.

Leap 15.1 used $releasever in the repo definitions. But I’m not sure about Leap 15.0. And Leap 42.3 did not use that.

About 1 week ago, I did a test upgrade of Leap 15.1, using:

zypper --releasever=15.2 dup

and it went very well. Yesterday, I tried the same with Leap 15.0 (again upgrade to 15.2), and it also went very well. Perhaps I’ll try with Leap 42.3 later today.

Note, however, that I manually edited the “.repo” file in “/etc/zypp/repos.d” on the 15.0 system, to replace the “15.0” with “$releasever” everywhere (including for packman repo). I made the same editing change on Leap 42.3, ready for a possible test.

For those wanting to try it, here is the complete sequence of commands that I used. And note that I did this from a virtual console (CTRL-ALT-F1) rather than from within a graphic session.

## test that the repos are setup properly
zypper --releasever=15.2 lr -d
### that should show the 15.2 on all enabled repos.

### clean out any package cache
zypper clean

## refresh the repos
zypper --releasever=15.2 refresh

## upgrade
zypper --releasever=15.2 dup

Once done, it should then know that you are on version 15.2, so the “–releasever” option is no longer needed (until upgrading to 15.3).

And a final note: my tests were all in KVM virtual machines. I first cloned the VM, and then upgraded the clone. That way allows me to test multiple times if I want.

An added note:

This morning, I upgraded a Leap 42.3 system to Leap 15.2. As before, this was done in a KVM virtual machine.

The upgrade went very smoothly.

I used the “–releasever” option to “zypper” as mentioned above. I had previously edited the repo definition files in “/etc/zypp/repos.d” to make sure that the repos used “$releasever” for the version in the repo url.

I assume that this includes that $releasever was not in the files of the 42.3 before you edited them. And I assume also that that confirns my idea that when you upgrade using this way from 42.3 > 15.0 > 15.1, you will still not have it, contrary to a fresh 15.1 installation.

Thus it confirms my idea that mentioning this pitfall in the SDB is useful.

Yes, agreed.

In my opinion, and as a suggestion for the SDB, the first step should be:

zypper --releasever=15.2 lr -d

And one should carefully inspect the output to make sure that all enabled repos now point to 15.2, and not to an earlier distribution. If that check does not turn out correctly, then you cannot upgrade this way unless you first suitable edit the repo definitions.

I’ll note, however, that the internal support (in “zypper”) for the use of “–releasever” was there in 42.3. And that’s part of what I was testing. But the repo configuration, as installed for 42.3, did not support it.

Additionally, perhaps Yast Software Repositories needs to better support editing repos with the “$releasever” variable in place.

I agree that that would be a good test to see if your repo list is ready to use this feature.

BTW, my test as hown in post #7 above will provide the same information in a way that probably more striking lol!