The upgrade method from official wiki doesn't work (Leap 15.1 -> 15.2)

On the official wiki (https://en.opensuse.org/SDB:System_upgrade), the system upgrade from 15.1 to 15.2 requires replacing the string “15.1” to “15.2” in all the /etc/zypp/repo.d files.

However, in my 15.1 system, there is no literal “15.1” in the repo’s URL, for example, the OSS repo:

baseurl=http://download.opensuse.org/distribution/leap/$releasever/repo/oss/

Is the system upgrade guide on the wiki staled. If I don’t want to replace the $releasever variable in the repo file, how could I upgrade the system to Leap 15.2?

Hi
I would switch to a tty (or use screen), switch (su -) or login to the tty as root user and run the following…


zypper --releasever 15.2 dup

Thank you! This solves my problem. Note that other repositories (e.g., Packman and nvidia) still requires manual string replacement.
The upgrade guide on the official wiki still needs a fix though.

It is a Wiki, isn’t it?

I edited “/etc/zypp/repos.d/packman.repo”, and replaced “15.1” by “$releasever”.

And then I used the suggested upgrade with “–releasever=15.2”. It worked very well. I’ll note that I did this in a virtual machine. On my real machine, I did a clean install of 15.2.

When I last checked, the repo for 'libdvdcss" was not yet up for Leap 15.2, so I disabled that repo before the upgrade.

I don’t have nvidia hardware, so I could not check that. But it probably works the same way with “$releasever”.

And a note for those into virtualization. I have a VM with Leap 15.1 (using KVM). So I cloned that, and then upgraded the clone. The nice thing about doing it with a clone, is that I can repeat it. I first tested this early in the 15.2 cycle. And I tested again last week. I’ll keep my Leap 15.1 virtual machine for testing, until end-of-life for 15.1. I have Leap 15.2 in a separate VM, where I have been testing it since the alpha release stage.

Hi
For libdvdcss just rebuild the src rpm locally…
http://download.videolan.org/SuSE/Tumbleweed/src/libdvdcss-1.4.2-1.18.src.rpm

Hi

I edited “/etc/zypp/repos.d/packman.repo”, and replaced “15.1” by “$releasever”.

It’s not in official wiki.
Nothing in the wiki about third party repositories
How to edit “/etc/zypp/repos.d/packman.repo” and replace “15.1” by “$releasever” ?
with YaST ? Or command line ?

Thank you

You could do

sudo sed -i 's/15.1/$releasever/g' /etc/zypp/repos.d/packman.repo

See the result…

cat /etc/zypp/repos.d/packman.repo

BTW, to change all such repos

sudo sed -i 's/15.1/$releasever/g' /etc/zypp/repos.d/*.repo

Thank you :slight_smile:

Maybe someone can change the official wiki?
I don’t write English very well. :shame:
I use translators…

Ok, I’ve added the pertinent info to the wiki page.

@nukilly,
That’s interesting, $releaseserver was introduced as an option to automatically use the existing distro version but modifiable in an upgrade as described here, but has never replaced the conventional method of specifying the version explicitly. I’m wondering how your system is set up using $releaserver because my exsting 15.1 systems, even some installed only a few months ago still use the older method.

If a transition plan has been worked out, I’m all for modifying the SDB:System_Upgrade but if you look at the “discussion” notes to the Wiki, there were problems when the Wiki was first changed (in that case removed references to identifying the distro version explicitly) when openSUSE is still based on the old way. Anyone who changes the Wiki should think through the consequences and avoid the earlier problems.

Also,
Regarding libdvdcss,
For awhile now it appears to be available from a separate Community repository (Hey, just occured to me that YaST has always referred to “Community” repositories the right way despite the Software Search website re-categorizing them as “Experimental” and private home builds as “Community. More inconsisten confusion”)… You can find it in the YaST Repoository Manager. AFAIK though… libdvdcss is necessary only if you’re buring optical disks (DVD/CD/BlueRay).

TSU

Are you very sure about that? I am sure that you have read all the above very carefully, but nevertheless I want to make it very clear that you can not use e.g. zypper lr -d to check that because zypper will replace $releasver with 15.1. before showing it to you. Same with YaST, With YaST > Repository Management, you will see the replaced string and thus it will not be different from hard-coded. It is only when you then use Edit of a repository that you will see the real text of the URI. Thus either use that, or of course look at the files themselves.

The same for you as for all others here, do not only post your conclusion, but show the facts from the system:

grep baseurl /etc/zypp/repos.d/*.repo

I have just done some testing of this.

I did a test install of Leap 15.0. And all of the installed repos had “15.0” as part of the URL in the repo definition (not counting the DVD itself as a repo).

I then did a test install of Leap 15.1. And all of the installed repos had “$releasever” as part of the URL (again, not counting the DVD itself).

I have almost completed another test install of 15.1. This time, I enabled online repos for use during the install. I’m guessing that the online repos used with have “15.1”, but other configured repos (such as the debug repo) will use “$releasever”.

Waiting for the test install to complete.

So my guess was wrong. All repos (except the DVD) used $releasever.

If you installed with the DVD installer, you should have $releasever in the defined repos. I don’t know about the NET installer, which I rarely use.

If you started with a Leap 15.0 system and upgraded, then you would likely have “15.1” as part of the repo urls (instead of “$releasever”). If you edited the repos with Yast Software Repositories, maybe that turns them into “15.1”.

I’ll chime in here, in the hope that my successful 15.1 → 15.2 upgrade steps may be of use to others. I am much less knowledgeable than many contributing to this thread, so if any of you think I erred, I hope you’ll set me straight below. All I know is that it worked.

Please note: these steps are for a bare bones VM, with only openSUSE repositories (listed at the bottom of this thread). If I’d screwed up, I could have copied over a known good VM in a couple of minutes. I wouldn’t have been so bold with a bare metal installation.

  • I made sure that I had the repo-update enabled.
  • In Yast → repositories, I changed all repositories from 15.1 to 15.2
  • I rebooted to terminal, and ran zypper lr -d
    to be sure repository changes had taken effect. - zypper ref
  • zypper dup
    , which, predictably, brought in over 2,000 packages. - shutdown -r now

The system then aborted on reboot, until I spotted the VirtualBox setting that told me my old virtual “graphics controller” was incompatible. I changed it to VMSVGA; it’s happy now. I don’t know why it wanted the change.

15.2 now completed boot, but in a tiny window, without functioning guest additions. I fixed this in Yast by uninstalling and then reinstalling:

virtualbox-guest-tools
virtualbox-guest-x11
virtualbox-kmp-default

Success! The current repositories list, that were all at ‘15.1’ before the changes described above. As you can see, I haven’t yet bothered to change the repository names.

#  | Alias                           | Name                                    | Enabled | GPG Check | Refresh | URI
---+---------------------------------+-----------------------------------------+---------+-----------+---------+-------------------------------------------------------------------------
 1 | download.opensuse.org-non-oss   | Main Repository (NON-OSS)               | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/distribution/leap/15.2/repo/non-oss/
 2 | download.opensuse.org-non-oss_1 | Update Repository (Non-Oss)             | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.2/non-oss/
 3 | download.opensuse.org-oss       | Main Repository (OSS)                   | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/distribution/leap/15.2/repo/oss/
 4 | download.opensuse.org-oss_1     | Main Update Repository                  | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.2/oss
 5 | repo-debug                      | openSUSE-Leap-15.1-Debug                | No      | ----      | ----    | http://download.opensuse.org/debug/distribution/leap/15.2/repo/oss/
 6 | repo-debug-non-oss              | openSUSE-Leap-15.1-Debug-Non-Oss        | No      | ----      | ----    | http://download.opensuse.org/debug/distribution/leap/15.2/repo/non-oss/
 7 | repo-debug-update               | openSUSE-Leap-15.1-Update-Debug         | No      | ----      | ----    | http://download.opensuse.org/debug/update/leap/15.2/oss/
 8 | repo-debug-update-non-oss       | openSUSE-Leap-15.1-Update-Debug-Non-Oss | No      | ----      | ----    | http://download.opensuse.org/debug/update/leap/15.2/non-oss/
 9 | repo-source                     | openSUSE-Leap-15.1-Source               | No      | ----      | ----    | http://download.opensuse.org/source/distribution/leap/15.2/repo/oss/
10 | repo-source-non-oss             | openSUSE-Leap-15.1-Source-Non-Oss       | No      | ----      | ----    | http://download.opensuse.org/source/distribution/leap/15.2/repo/non-oss/

Good move. Yes, software with proprietary kernel modules can be a problem for update. So uninstall before update and reinstall afterwards is the best procedure.

The current repositories list, that were all at ‘15.1’ before the changes described above. As you can see, I haven’t yet bothered to change the repository names.

#  | Alias                           | Name                                    | Enabled | GPG Check | Refresh | URI
---+---------------------------------+-----------------------------------------+---------+-----------+---------+-------------------------------------------------------------------------
 1 | download.opensuse.org-non-oss   | Main Repository (NON-OSS)               | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/distribution/leap/15.2/repo/non-oss/
 2 | download.opensuse.org-non-oss_1 | Update Repository (Non-Oss)             | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.2/non-oss/
 3 | download.opensuse.org-oss       | Main Repository (OSS)                   | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/distribution/leap/15.2/repo/oss/
 4 | download.opensuse.org-oss_1     | Main Update Repository                  | Yes     | (r ) Yes  | Yes     | http://download.opensuse.org/update/leap/15.2/oss
 5 | repo-debug                      | openSUSE-Leap-15.1-Debug                | No      | ----      | ----    | http://download.opensuse.org/debug/distribution/leap/15.2/repo/oss/
 6 | repo-debug-non-oss              | openSUSE-Leap-15.1-Debug-Non-Oss        | No      | ----      | ----    | http://download.opensuse.org/debug/distribution/leap/15.2/repo/non-oss/
 7 | repo-debug-update               | openSUSE-Leap-15.1-Update-Debug         | No      | ----      | ----    | http://download.opensuse.org/debug/update/leap/15.2/oss/
 8 | repo-debug-update-non-oss       | openSUSE-Leap-15.1-Update-Debug-Non-Oss | No      | ----      | ----    | http://download.opensuse.org/debug/update/leap/15.2/non-oss/
 9 | repo-source                     | openSUSE-Leap-15.1-Source               | No      | ----      | ----    | http://download.opensuse.org/source/distribution/leap/15.2/repo/oss/
10 | repo-source-non-oss             | openSUSE-Leap-15.1-Source-Non-Oss       | No      | ----      | ----    | http://download.opensuse.org/source/distribution/leap/15.2/repo/non-oss/

You got to Leap 15.1 by upgrading an earlier system. I can tell from your repo names. They are using the older style of naming. Here’s my 15.2 repo list:


% zypper lr -d
#  | Alias                     | Name                               | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                       | Service
---+---------------------------+------------------------------------+---------+-----------+---------+----------+--------+---------------------------------------------------------------------------+--------
 1 | kernel                    | kernel                             | No      | ----      | ----    |  100     | rpm-md | http://download.opensuse.org/repositories/Kernel:/stable/standard/        | 
 2 | kotd                      | kotd                               | No      | ----      | ----    |  100     | rpm-md | http://download.opensuse.org/repositories/Kernel:/openSUSE-15.2/standard/ | 
 3 | libdvdcss                 | libdvdcss                          | No      | ----      | ----    |   99     | NONE   | http://opensuse-guide.org/repo/openSUSE_Leap_15.2/                        | 
 4 | mozilla                   | mozilla                            | No      | ----      | ----    |  100     | rpm-md | http://download.opensuse.org/repositories/mozilla/openSUSE_Leap_15.2/     | 
 5 | packman                   | packman                            | Yes     | (r ) Yes  | Yes     |   97     | rpm-md | http://ftp.gwdg.de/pub/linux/packman/suse/openSUSE_Leap_15.2/             | 
 6 | repo-debug                | Debug Repository                   | No      | ----      | ----    |   99     | rpm-md | http://download.opensuse.org/debug/distribution/leap/15.2/repo/oss/       | 
 7 | repo-debug-non-oss        | Debug Repository (Non-OSS)         | No      | ----      | ----    |   99     | rpm-md | http://download.opensuse.org/debug/distribution/leap/15.2/repo/non-oss/   | 
 8 | repo-debug-update         | Update Repository (Debug)          | No      | ----      | ----    |   99     | rpm-md | http://download.opensuse.org/debug/update/leap/15.2/oss/                  | 
 9 | repo-debug-update-non-oss | Update Repository (Debug, Non-OSS) | No      | ----      | ----    |   99     | rpm-md | http://download.opensuse.org/debug/update/leap/15.2/non-oss/              | 
10 | repo-non-oss              | Non-OSS Repository                 | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.2/repo/non-oss/         | 
11 | repo-oss                  | Main Repository                    | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.2/repo/oss/             | 
12 | repo-source               | Source Repository                  | No      | ----      | ----    |   99     | rpm-md | http://download.opensuse.org/source/distribution/leap/15.2/repo/oss/      | 
13 | repo-source-non-oss       | Source Repository (Non-OSS)        | No      | ----      | ----    |   99     | rpm-md | http://download.opensuse.org/source/distribution/leap/15.2/repo/non-oss/  | 
14 | repo-update               | Main Update Repository             | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.2/oss/                        | 
15 | repo-update-non-oss       | Update Repository (Non-Oss)        | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.2/non-oss/                    | 
16 | repo-update-test          | Untested Updates                   | No      | ----      | ----    |  100     | rpm-md | http://download.opensuse.org/update/leap/15.2-test/                       | 

As you can see, the repo names are now more generic, and don’t mention the version in the repo name. That changes was already there for Leap 15.1 if installed from the DVD. It makes for simpler upgrading

That is basicaly the prodedure as described since a rather long time as “change the repos to point to the new ones and do zypper dup”. Of course amended by some extra precautions, etc.

This thread is about an improvement made. Instead of changing the string 15.1 to 15.2 in the repo definitions, one could (should?) change 15.1 to $releasever. And then do the zypper dup as

zypper --releasver 15.2 dup

This has the advantage that it will also work in the future on 15.3, etc. without doing all the edits.

We also found out that from a fresh installation of 15.1 onwards, this $releasever string is already put into the repo list, and this will work as now is advertised in the documentation.
However, when the fresh install was done with 15.0 or earlier and upgraded with the “edit the repos” way, the $releasever will not be in your 15.1 repo list and the advertised way of using --releasever will thus not work. Changes to the documentation were made a few days ago, but I have no idea if that was done in all places were the upgrade description is documented.

===========================================

I will repeat (from this and another thread), that you can not find if $releasever is used in your rep list by doing e.g.

zyper lr -d

because zypper will replace all $releasever with the current version. Thus on a 15.1 system the URIs will show 15.1 regardless if there is 15.1 or $releasever in the list.
One way to see what is in the repo lists is

grep baseurl /etc/zypp/repos.d/*.repo

Another, more funny, way of looking at it is

zypper --releasever FOO lr -d

It will show 15.1 when there is no $releasever and FOO if there is. So if at least all standard repos URIs are shown with FOO, you are ready for the future.

The net installer has:

openSUSE-Leap-15.2-1.repo:baseurl=http://download.opensuse.org/distribution/leap/**15.2**/repo/oss/
repo-debug-non-oss.repo:baseurl=http://download.opensuse.org/debug/distribution/leap/$releasever/repo/non-oss/
repo-debug-update-non-oss.repo:baseurl=http://download.opensuse.org/debug/update/leap/$releasever/non-oss/
repo-debug-update.repo:baseurl=http://download.opensuse.org/debug/update/leap/$releasever/oss/
repo-debug.repo:baseurl=http://download.opensuse.org/debug/distribution/leap/$releasever/repo/oss/
repo-non-oss.repo:baseurl=http://download.opensuse.org/distribution/leap/$releasever/repo/non-oss/
repo-oss.repo:baseurl=http://download.opensuse.org/distribution/leap/$releasever/repo/oss/
repo-source-non-oss.repo:baseurl=http://download.opensuse.org/source/distribution/leap/$releasever/repo/non-oss/
repo-source.repo:baseurl=http://download.opensuse.org/source/distribution/leap/$releasever/repo/oss/
repo-update-non-oss.repo:baseurl=http://download.opensuse.org/update/leap/$releasever/non-oss/
repo-update.repo:baseurl=http://download.opensuse.org/update/leap/$releasever/oss

Interesting. Basicaly a good move which reflects the introduction of $releasever.
But I wonder a bit about the Aliases used. I had the idea that Aliases were there to poivide a short, but still understandable, way to identify repos when using zypper xommands (and better then the numbers, because the tend to change). Shorter then the full name and having no blanks that require quoting when used in the shell.
But they are still rather long and preceding them all with the prefix repo- seems rather superfluous to me.

Yeah, I yesterday found a 15.1 install from last fall (I only do net installs) with the same nonsense. I manually changed all to 15.2…

I assume that one 15.2, on the main URL, needs further investigation and maybe a bug report.