Why opensuse use explicit distro name in a REPO path

Subject. Why just not use something like <repo_base_path><$version>
There $version can be taken from /etc/issue or other special place. it remove redundance, make distro upgrade easier. Now opensuse dist upgrade so primitive… just remove all old repos.

And what’s the difference to <repo_base_path>/openSUSE_<$version> as it is now?
And the standard repos already have a path as you propose:
[noparse]http://download.opensuse.org/distribution/13.1/[/noparse] f.e.

Btw, there’s also openSUSE-current which always points to the latest version, i.e. 13.1 ATM.
This won’t help you with OBS repos though.

But as mentioned in SDB:System upgrade - openSUSE, just run “sed -i ‘s/12.3/13.1/g’ /etc/zypp/repos.d/*” and all your repos will be changed to the new openSUSE version (you have to adapt the version numbers accordingly of course).
Just changing the repo path wouldn’t make that automatic either, and it’s not necessary to implement the thing I think you have in mind (automatic distro upgrade).

On 2013-12-05 09:36, slimy wrote:
>
> Subject. Why just not use something like <repo_base_path><$version>
> There $version can be taken from /etc/issue or other special place. it
> remove redundance, make distro upgrade easier. Now opensuse dist upgrade
> so primitive… just remove all old repos.

Precisely to impede automatic distro upgrade.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Еexactly what I’m taking about. You have to use regexp for upgrage, which have no any warranty. Easy find that regexp mach something but much harder that not much something in wrong place.
Preventing to autoupgrade? I see no problem with that. If distro name contain in /etc/issue while you not change what no changing for distros.

And what’s the difference to <repo_base_path>/openSUSE_<$version> as it is now?

Yes path quite the same. But I mean use only repo_base_path other parts could inserts in the path by zypper. This is just SW development usual practice DRY. Use name constant with common value instead place value in each place.

And what if you don’t want to upgrade immediately when a new version is released? I.e. because the current one is still supported for 10 months, or maybe you are using Evergreen, which is still supported even longer?

But your suggestion doesn’t work anyway, since /etc/issue contains the current version, not the next.
And /etc/issue is for displaying the greeting text in text mode, if you want to propose something like that, suggest “lsb-release -rs”… :wink:
But even then you still have the problem, that you don’t know when the next version is available and which version number it will have. So your proposal wouldn’t really change anything.
And as I said, there’s already openSUSE-current, which goes into the direction you want to go, just use that and you’ll always have the repos of the latest openSUSE version.

Where is the problem with upgrade?If your constant with distro version still the same. I do not suggest use “current”. And doesn’t matter really /etc/issue or lsb-release I mean these as example. Better change one string then do the same action for each, even with regexp no warranty from errors.
My point is if zypper by itself knows ‘it distro version’ why we still MUST use the same constants explicit in the path?

And why change it then?

A repo can have an arbitrary URL, there’s no guarantee that it ends in $version. So how should this work for non-official repos? Or local directories on your harddisk added as repo? Or the installation medium?

And how should an online distribution upgrade work then? Or a Factory installation?

Anyway, that discussion is moot here. Open a feature request at http://features.opensuse.org/ if you really want to have this implemented.

On 2013-12-05 13:46, slimy wrote:
> My point is if zypper by itself knows ‘it distro version’ why we still
> MUST use the same constants explicit in the path?

No, it does not.

We use them to avoid unintentionally upgrading a package to one of a
different version. Currently there are repos active for 11.4, 12.2,
12.3, and 13.1, all supported. How do you know which is which if all
have the same path?


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Took that information from a file. You are seems misunderstood me, I agree about path on repo server, but I talk about something like that on distro side not a server

$VERSION = 'opensuse13.1' // took from /etc/issue or from lsb-release or maybe other special file

http::/<repo1_root_path/$VERSION
http::/<repo2_root_path/$VERSION
  ....
http::/<repoN_root_path/$VERSION

On 2013-12-06 15:06, slimy wrote:

> Took that information from a file. You are seems misunderstood me, I
> agree about path on repo server, but I talk about something like that on
> distro side not a server
>
> PHP code:
> --------------------
> $VERSION = ‘opensuse13.1’ // took from /etc/issue or from lsb-release or maybe other special file
>
> http::/<repo1_root_path/$VERSION
> http::/<repo2_root_path/$VERSION
> …
> http::/<repoN_root_path/$VERSION
> --------------------

IMO, that’s complicating things.

Side note: Please use code tags, not PHP tags. The ‘#’ button on the editor.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

My exactly question is why? For me it seems easy thing. there is the trap?

On 2013-12-07 20:06, slimy wrote:
>
> My exactly question is why? For me it seems easy thing. there is the
> trap?

Look, the configuration is written as text files in
“/etc/zypp/repos.d/”. Such as:


[repo-oss]
name=openSUSE-12.3-Oss
enabled=1
autorefresh=1
baseurl=http://download.opensuse.org/distribution/12.3/repo/oss/
path=/
type=yast2
keeppackages=1

You want to replace the 12.3 above with an indirection to a string
obtained from parsing some other file. That complicates matters for the
programs that have to read those files. And then that change will need
to be debugged, other things unforeseen will arise on other seemingly
unrelated places.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Well it’s mean poor design for other programs. Only package manager should use this file for direct access. Other have to use zypper for repos control. I’m wrong?>:(

On 2013-12-09 11:06, slimy wrote:

> Well it’s mean poor design for other programs. Only package manager
> should use this file for direct access. Other have to use zypper for
> repos control. I’m wrong?>:(

Even if it were only zypper, it would mean complexity to handle the
indirection by zypper code. And how do you handle me specifically adding
a repo for a different version, or one that is not version specific?


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

You are wrong. Actually the variable already exists in the zypper.