Bugzilla – Bug 648892
zypper ar obs://something should default to current distro
Last modified: 2011-07-15 14:13:17 UTC
LANG=C zypper ar -f obs://home:cboltz test Adding repository 'test' [done] Repository 'test' successfully added Enabled: Yes Autorefresh: Yes URI: http://download.opensuse.org/repositories/home:/cboltz/openSUSE_Factory # cat /etc/SuSE-release openSUSE 11.3 (x86_64) VERSION = 11.3 zypper should choose download.o.o/$repo/openSUSE_11.3 instead of openSUSE_Factory on my 11.3 system. Logs on request, however this looks easily reproducable to me.
You can specify it, or configure the default to use on your system. [man zypper]: ... These URIs have the form of obs://<project>/[platform], where project is the name of the OBS project and platform is the target platform (OS) for which the repository is intended. For example: obs://server:http/openSUSE_11.3. If platform is omitted, zypper.conf's obs.platform value is used. See also other options in the [obs] section of zypper.conf.
Good to know there's a config option for it, but this doesn't solve the problem. Zypper should use a _sane default value_, which is the _currently installed distribution_ (as found in /etc/SuSE-release). Defaulting to Factory (or is it $random?) is just crazy and a good way to break users' systems out there. Please change the default to the current distribution. BTW: My zypper.conf has the default of [obs] ... # platform = openSUSE_11.3 The easiest solution would be to ship zypper.conf without this comment sign in front of "platform". That would possibly break on upgrades (reading /etc/SuSE-release is safer), but it's still better than Factory as default value.
I agree Christian, but i won't have time to do it -> WONTFIX Patches are welcome, though. See also http://en.opensuse.org/openSUSE:Zypper_bugs_for_adoption
*** Bug 687440 has been marked as a duplicate of this bug. ***