Home_greyopenFATE - openSUSE feature tracking > #320385
Dashboard | Search | Sign up | Login

Please login or register to be able to edit or vote this feature.

Let Zypper know the version number of openSUSE

Feature state

openSUSE Distribution


All repo names in openSUSE are structured to have the version number/name in it, such as http://download.opensuse.org/repositories/science/
openSUSE_Leap_42.1 / (for 42.1); I do a lot of repo handling via bash scripts and I find myself over and over again telling someone: "Here, this is a script to install all the software you'll need right now… But
you have to specify your version string in the repo's name before running it" – 50% chance I will get asked "What do you mean? Where shall I put what?!"

I think it was more convenient and less error prone if zypper commands yould use a variable such as
that can be put to replace the string. On openSUSE Leap 42.1

zypper ar -f http://download.opensuse.org/repositories/science/$ osVersion/ "Science"

would than automatically change to

zypper ar -f http://download.opensuse.org/repositories/science/openSUSE_Leap_42.1/ "Science"

and so forth…

User benefit:

This feature would it make easier for admins to write scripts that handle software management/installation on different versions of openSUSE. It would also facilitate writing advice to people on the internet (e.g. the openSUSE wiki) on how to perform certain actions that concern repo management.


icons/user_comment.png J. G. wrote: (2 years ago)

Version info is contained in the file /etc/os-release. You can simply source this file from your bash script and you get variables like $NAME and $VERSION.

icons/user_comment.png F. M. wrote: (10 months ago)

One of the advantages of zypp over yum/dnf is that it is obvious on examination of a repo file whether it is appropriate to the installation. A second is that each controls the repos, that is, each repo file is independent of some other file(s) dictating what version is appropriate. e.g., there may not be a non-standard repo available for the installed pre-release (TDE for 42.3), but an existing repo version may be competent for the task (TDE for 42.2).

Last change: 10 months ago
Loading tags...
Feature Export
Application-xmlXML   Text-x-logPlaintext   PrinterPrint