Failure to upgrade from 15.1 to 15.2

I have 15.1 on an older laptop. I did:


# zypper --releasever=15.2 ref 
# zypper dup

With the dup: it shows that it was upgrading to 15.2 including the kernel5.3xxx. A few gigs to download…

I said yes (pressing the enter key) and the downloads failed with:


'http://download.opensuse.org/distribution/leap/15.1/repo/oss' does not contain the desired medium

I stopped after the 3rd fail in a row, all with the same message.

Somehow it still tries to download from releasever 15.1, even though it showed the upgrade to 15.2.

  1. Am I missing something?
  2. Do I need to wipe the laptop and install 15.2?

Thanks

In the repo definition you probably have 15.1 hard coded. 15.1 should have $releasever in its place for that update method to work. check in yast - software repositories

I did check:

yast says:15.1

but


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

/etc/zypp/repos.d/openSUSE-Leap-15.1-1.repo:baseurl=hd:/?device=/dev/disk/by-id/usb-Kingston_DT_101_G2_0019E06B4A0BECB0D72E0010-0:0-part2
/etc/zypp/repos.d/repo-debug-non-oss.repo:baseurl=http://download.opensuse.org/debug/distribution/leap/$releasever/repo/non-oss/
/etc/zypp/repos.d/repo-debug.repo:baseurl=http://download.opensuse.org/debug/distribution/leap/$releasever/repo/oss/
/etc/zypp/repos.d/repo-debug-update-non-oss.repo:baseurl=http://download.opensuse.org/debug/update/leap/$releasever/non-oss/
/etc/zypp/repos.d/repo-debug-update.repo:baseurl=http://download.opensuse.org/debug/update/leap/$releasever/oss/
/etc/zypp/repos.d/repo-non-oss.repo:baseurl=http://download.opensuse.org/distribution/leap/$releasever/repo/non-oss/
/etc/zypp/repos.d/repo-oss.repo:baseurl=http://download.opensuse.org/distribution/leap/$releasever/repo/oss/
/etc/zypp/repos.d/repo-source-non-oss.repo:baseurl=http://download.opensuse.org/source/distribution/leap/$releasever/repo/non-oss/
/etc/zypp/repos.d/repo-source.repo:baseurl=http://download.opensuse.org/source/distribution/leap/$releasever/repo/oss/
/etc/zypp/repos.d/repo-update-non-oss.repo:baseurl=http://download.opensuse.org/update/leap/$releasever/non-oss/
/etc/zypp/repos.d/repo-update.repo:baseurl=http://download.opensuse.org/update/leap/$releasever/oss

I did


zypper --releasever=15.2 ref 

Warning: Enforced setting: $releasever=15.2
Repository 'Non-OSS Repository' is up to date.                                                                                        
Repository 'Main Repository' is up to date.                                                                                           
Retrieving repository 'Main Update Repository' metadata ........................................................................[done]
Building repository 'Main Update Repository' cache .............................................................................[done]
Repository 'Update Repository (Non-Oss)' is up to date.                                                                               
All repositories have been refreshed.

and yast still shows 15.1.

Where can I set $releasever to 15.2

Thank you

“zypper --releasever” only changes it for this command invocation. It does not make any permanent changes. This is even documented.

This value can be temporarily overwritten in the current zypper command by using the --releasever global option. ... you’ll need to use --releasever 13.2 with every zypper command until the distribution upgrade was actually performed.

Where can I set $releasever to 15.2

You do not want to do it as this means hardcoding it and this defeats the purpose of using variable. Version is determined automatically from installed product and will be correct after “zypper --releasever 15.2 dup”.

I have too many Leaps to easily keep count of, 15.1s, 15.2s, older, and one 15.3 so far. I don’t like variables in repo files (yet another reason I’m primarily an openSUSE user rather than a Fedora). So, after disabling any optional repos that should not be enabled during a dup, I’m still doing a variation on the old fashioned way. Oversimplified, it’s:

sudo zypper clean
sudo sed -i "s/15.1/15.2/g" /etc/zypp/repos.d/*.repo
sudo zypper ref
sudo zypper -v dup

You forgot the --releasever 15.2 clause in your second zypper command.
The default of releasver is only changed during the update (the zypper dup), thus until your zypper dup is finished, 15.1 is still used when no --releasever is given.

That worked. 50 minutes later…

Thank you