Bug 648892 - zypper ar obs://something should default to current distro
Summary: zypper ar obs://something should default to current distro
Status: RESOLVED WONTFIX
: 687440 (view as bug list)
Alias: None
Product: openSUSE 11.3
Classification: openSUSE
Component: libzypp (show other bugs)
Version: Final
Hardware: Other openSUSE 11.3
: P4 - Low : Enhancement (vote)
Target Milestone: ---
Assignee: Jan Kupec
QA Contact: E-mail List
URL:
Whiteboard: patches-welcome
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-24 21:56 UTC by Christian Boltz
Modified: 2011-07-15 14:13 UTC (History)
1 user (show)

See Also:
Found By: Beta-Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Boltz 2010-10-24 21:56:14 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.
Comment 1 Michael Andres 2010-10-25 07:31:10 UTC
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.
Comment 2 Christian Boltz 2010-10-25 16:58:41 UTC
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.
Comment 3 Jan Kupec 2010-10-26 13:06:42 UTC
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
Comment 4 Forgotten User -yQj4fdAjs 2011-07-15 14:13:17 UTC
*** Bug 687440 has been marked as a duplicate of this bug. ***