Bug 543510

Summary: zypper should use repo names I gave
Product: [openSUSE] openSUSE 11.2 Reporter: Ralph Ulrich <eulenreich>
Component: libzyppAssignee: Jan Kupec <jkupec>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Enhancement    
Priority: P3 - Medium CC: ma
Version: Factory   
Target Milestone: Future 11.3   
Hardware: i686   
OS: SUSE Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Ralph Ulrich 2009-10-01 14:32:51 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.3) Gecko/20090915 Iceweasel/3.5.3 (Debian-3.5.3-1)

Feedback of zypper changed. One aspect of zyppers feedback was a little cleaner in previous versions:

it respected then names of repos I gave in:
/etc/zypp/repos.d/*.repo

Now repo feedback of zypper is a real mess: 
sometimes my names - some outputs use url strings


Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Jan Kupec 2009-10-01 14:37:55 UTC
Did you really set the 'name' attribute? See what 'zypper lr' tells. Set name with 'zypper mr -n "foo". Note that 'alias' is not 'name'. It's just a shorthand.
Comment 2 Ralph Ulrich 2009-10-01 15:56:37 UTC
#  | Alias                | Name                 | Aktiviert | Aktualisieren
---+----------------------+----------------------+-----------+--------------
1  | base_system          | base_system          | Nein      | Nein
2  | contrib              | contrib              | Ja        | Nein
3  | gnome_community      | gnome_community      | Nein      | Nein
4  | gnome_contrib        | gnome_contrib        | Nein      | Nein
5  | gnome_factory        | gnome_factory        | Nein      | Nein
6  | home_hfiguiere       | home_hfiguiere       | Nein      | Nein
7  | home_prusnak         | home_prusnak         | Nein      | Nein
8  | kde_backports        | kde_backports        | Nein      | Nein
9  | kde_community        | kde_community        | Ja        | Nein
10 | kde_desktop          | kde_desktop          | Nein      | Nein
11 | kde_playground       | kde_playground       | Ja        | Nein
12 | kde_qt               | kde_qt               | Nein      | Nein
13 | kde_qt45             | kde_qt45             | Nein      | Nein
14 | kde_qt46             | kde_qt46             | Nein      | Nein
15 | mozilla              | mozilla              | Nein      | Nein
16 | multimedia_education | multimedia_education | Nein      | Nein
17 | multimedia_games     | multimedia_games     | Nein      | Nein
18 | multimedia_packman   | multimedia_packman   | Ja        | Nein
19 | multimedia_videolan  | multimedia_videolan  | Ja        | Nein
20 | openSUSE11.2         | openSUSE11.2         | Ja        | Nein
21 | openSUSE11.2nonoss   | openSUSE11.2nonoss   | Ja        | Nein
22 | passwordmanage       | passwordmanage       | Ja        | Nein
23 | virtualbox           | virtualbox           | Nein      | Nein
Comment 3 Ralph Ulrich 2009-10-01 16:07:42 UTC
sample output of non names you can see:
https://bugzilla.novell.com/show_bug.cgi?id=543498
Comment 4 Michael Andres 2009-10-01 16:36:00 UTC
Repo name/alias handling works for me.

May it be the non names are e.g.:

   obs://build.opensuse.org/KDE -> openSUSE    
   packman.links2linux.de -> http://packman.links2linux.de
   ...

Those are the packages vendor strings, not the repo names. Looks confusing, as some repos use their urls as package vendor string.

                                                 +-repository name
  dvdauthor                                      v                            
    0.6.14-0.pm.1 -> 0.6.14-0.pm.3.1     i586    multimedia_packman  
    packman.links2linux.de -> http://packman.links2linux.de
    ^                            ^
    +-installed packages vendor  +-new packages vendor
Comment 5 Ralph Ulrich 2009-10-01 18:49:04 UTC
Michael Andres, that i meant!

We have: 
1.names
2.aliases
3.package vendors

For me as normal user this looks over-engineered.
Comment 6 Michael Andres 2009-10-02 08:27:47 UTC
Well, the alias identifies a repo that contains a collection of packages. The vendor tells you who made the specific package. These are 2 different things.

Packages made by the same vendor may replace/update each other, no matter in which repo you found them. Vice versa one repo may contain packages from different vendors. 


Name and Alias are indeed similar. Alias needs to be unique and identifies the repo, while the name should be a human readable string that can be displayed in a UI. An auto-generated unique alias may look like 4f89a8bdc4b3e8fde5fc077040.
But on a system like yours, where the aliases are in a good shape, the name column seems to be superfluous.

Maybe we can enhance the 'zypper lr' output. E.g.

   'zypper lr'       Alias and Name (or a default from zypper.conf)
   'zypper lr -a'    show Alias
   'zypper lr -n'    show Name

Nice would be default options in zypper.conf:

   lr_default = -a -n

So one can change it to e.g.:

   lr_default = -a -p
Comment 7 Michael Schröder 2009-10-02 08:42:23 UTC
Btw, here is how Fedora uses name/alias:

If you install a Fedora system, you'll have one repository with alias "fedora". The name will be "Fedora 10 - i386". If you update your system to Fedora 11, the repository alias will stay the same, but the name/url will change.

I don't think we should stop displaying both as that would make it impossible to support a scheme like this.
Comment 8 Michael Andres 2009-10-02 14:36:06 UTC
That's why I didn't say 'stop', but 'configurable'. If I sit in front of my laptop, I usually know what system I have. So I'd be happy with 'fedora', I don't need to see the long name all the time.

But is this Fedora specific? No repo on my system has a version in it's alias.
Comment 9 Ralph Ulrich 2009-10-02 17:06:40 UTC
I'm happy to have filed this bug for your good points - and I learned something.
---

"Packages made by the same vendor may replace/update each other, no matter in
which repo you found them."

Unbelievable "no matter in which repo", what about:
1. repo priorities, which must get lost by such a feature
2. zypper up -r REPO, which is broken by such a feature

Then I don't wonder about my other bug...
Comment 10 Ralph Ulrich 2009-10-03 13:59:32 UTC
I just found in the new /etc/zypp/zypp.conf
the appropriate config (I think despite warnings it is save for me):
-----
## EXPERTS ONLY: Per default the solver will not replace packages of
## different vendors, unless you explicitly ask to do so. Setting this
## option to TRUE will disable this vendor check (unless the application
## explicitly re-enables it). Packages will then be considered based on
## repository priority and version only. This may easily damage your system.
##
## CHANGING THE DEFAULT IS NOT RECOMMENDED.
##
## Valid values:  boolean
## Default value: false
##
solver.allowVendorChange = true
-----
? This a bit of a too strong warning: "This may easily damage your system."
Perhaps better something like:
"This may easily damage your system, if you have a self contradicting repo setup"
Comment 11 Michael Andres 2009-10-05 15:00:51 UTC
(In reply to comment #9)
> Unbelievable "no matter in which repo", what about:
> 1. repo priorities, which must get lost by such a feature
> 2. zypper up -r REPO, which is broken by such a feature

NO! Of course do all the other constraints apply. Just wanted to explain that there is a difference between vendor and repo, and we need both values.


(In reply to comment #10)
> ? This a bit of a too strong warning: "This may easily damage your system."

I don't think so. If you come to the conclusion the warning is too strong, then you might be expert enough to change the value. ;)
Comment 12 Ralph Ulrich 2009-10-16 10:14:07 UTC
I cannot controll anything any more with this output:
--------
LC_ALL=C zypper -vv dup
Verbosity: 2
Initializing Target
Loading repository data...
Reading installed packages...
Computing distribution upgrade...
Force resolution: No
Computing upgrade...

The following packages are going to be upgraded:
  libQtWebKit4       4.5.3-66.1 -> 4.5.3-67.1  i586  kde_qt obs://build.opensuse.org/KDE
...

The following packages are not supported by their vendor:
  libQtWebKit4       4.5.3-67.1  i586  kde_qt  obs://build.opensuse.org/KDE
...
--------
I don't know anything about obs protokoll as normal user. How can I get rid of this mess?
Comment 13 Ralph Ulrich 2009-10-16 10:17:42 UTC
I change Importance to normal, because I have totally lost my ability to control zypper upgrade behavior with these obs strings!
Comment 14 Jan Kupec 2009-10-20 08:44:01 UTC
Enter '?' on the 'Continue?' prompt.

The installation summary shows the package name, version, architecture, repository name, and package vendor, in that order. The obs:// thing is the vendor name. What you see is a mess, because you use -vv, which shows all details. It is not easy to show all that info at once. You can as well avoid using -vv and at the Continue? prompt toggle display of the info you want to see.

So is there anything to fix or enhance here?
Comment 15 Michael Andres 2009-10-20 10:12:54 UTC
If, then the suggestion in comment #6, but I'd consider it less than minor.
Comment 16 Jan Kupec 2009-10-20 12:07:38 UTC
Ah, sure, i'd like that!
Comment 17 Jan Kupec 2009-10-20 12:07:55 UTC
Ah, sure, i'd like that!
Comment 18 Jan Kupec 2010-10-18 15:24:40 UTC
Done. Will be in zypper 1.5.1 in openSUSE 11.4

## Columns to show in repository list printed by repos (lr) command by default.
## 
## The # (number) and Enabled column is shown always. The following columns
## can be configured:
##
## a - alias - the shorthand for name and unique identifier
## n - name - full name of the repository
## r - autorefresh?
## u - URL
## p - priority
##
## Valid values: any combination of the above letters; capital letter marks
##               column by which the table will be sorted (if multiple
##               are used the sorting is undefined).
## Default value: Anr
##
# repoListColumns = Anr