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
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.
“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:
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.