Repo priorities?

hi,

I tried to search but couldn’t find answer. :frowning:

I have a problem in understanding how repo priorities work. Lower number means higher priority. Recently I added a few repos:

# zypper lr -P -d
# | Alias        | Name                  | Enabled | Refresh | Priority | Type   | URI                                                                      | Service
--+--------------+-----------------------+---------+---------+----------+--------+--------------------------------------------------------------------------+--------
2 | mozilla      | mozilla               | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/mozilla/openSUSE_11.2/         |        
1 | libdvdcss    | libdvdcss             | Yes     | Yes     |   99     | rpm-md | http://www.opensuse-guide.org/repo/11.2                                  |        
3 | packman      | packman               | No      | Yes     |   99     | rpm-md | http://ftp.gwdg.de/pub/linux/misc/packman/suse/11.2/                     |        
4 | printing     | printing              | No      | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/Printing/openSUSE_11.2/        |        
5 | repo-non-oss | openSUSE-11.2 Non-OSS | Yes     | Yes     |   99     | yast2  | http://download.opensuse.org/distribution/11.2/repo/non-oss/             |        
6 | repo-oss     | openSUSE-11.2 OSS     | Yes     | Yes     |   99     | yast2  | http://download.opensuse.org/distribution/11.2/repo/oss/                 |        
7 | repo-update  | openSUSE-11.2 Updates | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/update/11.2/                                |        
8 | wine         | wine                  | Yes     | Yes     |   99     | rpm-md | http://download.opensuse.org/repositories/Emulators:/Wine/openSUSE_11.2/ |     

Now, for example in repo mozilla there is available a new version of firefox:

# zypper -v se -s MozillaFirefox
S | Name                               | Type       | Version     | Arch   | Repository           
--+------------------------------------+------------+-------------+--------+----------------------
v | MozillaFirefox                     | package    | 3.6.0-1.2   | x86_64 | mozilla              
i | MozillaFirefox                     | package    | 3.5.8-0.1.1 | x86_64 | openSUSE-11.2 Updates
v | MozillaFirefox                     | package    | 3.5.7-1.1.1 | x86_64 | openSUSE-11.2 Updates
v | MozillaFirefox                     | package    | 3.5.6-1.1.1 | x86_64 | openSUSE-11.2 Updates
v | MozillaFirefox                     | package    | 3.5.5-1.1.2 | x86_64 | openSUSE-11.2 Updates
v | MozillaFirefox                     | package    | 3.5.4-1.1.2 | x86_64 | openSUSE-11.2 OSS    
v | MozillaFirefox                     | package    | 3.6.0-1.2   | i586   | mozilla              
v | MozillaFirefox                     | package    | 3.5.8-0.1.1 | i586   | openSUSE-11.2 Updates
v | MozillaFirefox                     | package    | 3.5.7-1.1.1 | i586   | openSUSE-11.2 Updates
v | MozillaFirefox                     | package    | 3.5.6-1.1.1 | i586   | openSUSE-11.2 Updates
v | MozillaFirefox                     | package    | 3.5.5-1.1.2 | i586   | openSUSE-11.2 Updates
v | MozillaFirefox                     | package    | 3.5.4-1.1.2 | i586   | openSUSE-11.2 OSS    
  | MozillaFirefox                     | srcpackage | 3.6.0-1.2   | noarch | mozilla              
  | MozillaFirefox                     | srcpackage | 3.5.8-0.1.1 | noarch | openSUSE-11.2 Updates
i | MozillaFirefox                     | patch      | 2017        | noarch | openSUSE-11.2 Updates
i | MozillaFirefox                     | patch      | 1774        | noarch | openSUSE-11.2 Updates
i | MozillaFirefox                     | patch      | 1708        | noarch | openSUSE-11.2 Updates
i | MozillaFirefox                     | patch      | 1597        | noarch | openSUSE-11.2 Updates

(Above I show just a beginning of a long listing.)

As we can see, new version is 3.6.0-1.2, installed is 3.5.8-0.1.1. So let’s update:

# zypper up MozillaFirefox
Loading repository data...
Reading installed packages...
No update candidate for 'MozillaFirefox'.
Resolving package dependencies...

Nothing to do.

# zypper in MozillaFirefox
Loading repository data...
Reading installed packages...
'MozillaFirefox' is already installed.
Resolving package dependencies...

Nothing to do.

bah…

OK, let’s change prio:

#  zypper mr -p 1 mozilla
Repository 'mozilla' priority has been set to 1.

Try again:

# zypper up MozillaFirefox
Loading repository data...
Reading installed packages...
No update candidate for 'MozillaFirefox'.
Resolving package dependencies...

Nothing to do.
# zypper in MozillaFirefox
Loading repository data...
Reading installed packages...
'MozillaFirefox' is already installed.
Resolving package dependencies...

Nothing to do.

So how can I make use of a new repo?

thanks in advance!

A zypper up never changes vendor, as does a zypper install without exact version.

Read

man zypper

Independant of the repository priority, take a look here: openSUSE Forums - View Single Post - installing from different repositories In particular, look at the example images on that URL.

Does that help ?

Reference repositories, I typically give Pacman a much higher priority than the rest. For example I give packman 80 or 90. I would give Mozilla possibly 98 (instead of 99) but note that those rpms on Mozilla are cutting edge and have not seen the testing the older OSS/Update Mozilla rpms have seen, and you are risking breakage. I see you have Packman NOT enabled. I recommend you ENABLE it.

I think your “printing” repository is a VERY BAD idea. I recommend you remove it. Printing is too important to risk any breakage, and it can be too difficult to fix when things do break, and when it does break , it always happens at the worst possible time. Don’t mess with printing is my moto :slight_smile: However you do have it NOT enabled, so you should be safe.

I would give wine repos a 97 or 98 priority. Maybe same priority as Mozilla.

After installing the program libdvdcss, I recommend you REMOVE the libdvdcss repository.

@Akoellh,
thanks for this hint.

@oldcpu,
it’s easy to update all packages from a given repo in Yast. I just click Filter -> Repos, then in repo All in this list -> Update if newer version exists.
Question is if it is possible to do the same with zypper?

There’s a lot of helpful information included in Zypper by running the help option. For instance:

sudo zypper help

will list the commands along with some additional information. You can also look on the wiki here for usage.

It’s easy to do as long as you know the repository’s alias. You can find them out by running the following command:

sudo zypper lr

Then, for instance:

sudo zypper up --repo mozilla

Hope this helps.

This is exactly what one would do by intuition but we have already learned that “zypper up never changes vendor”. :wink:

Actually the system switcher is ideal

zypper equiv. would be

zypper dup -r mozilla

I’m curious as to the solution, as I would like to apply this to the alsa-update wiki which in essence is non-functional (as implemented in the wiki) for zypper commands for openSUSE-11.2.

I’m struggling with something similar here wrt zypper to update various alsa applications from a multimedia repository: Alsa-update - openSUSE and I wondering if this may work:

zypper ar http://download.opensuse.org/repositories/multimedia:/libs/openSUSE_11.2/ multimedia
zypper install alsa alsa-docs libasound2 --repos multimedia
zypper rr multimedia

I ask that, because I note the “zypper install” in the following does NOT work:

         zypper ar http://download.opensuse.org/repositories/multimedia:/libs/openSUSE_11.2/ multimedia
zypper install alsa alsa-docs libasound2
zypper rr multimedia

With the above, one is simply told the applications are already installed.

IMHO the “man zypper” could use a few more examples.

If I get the chance, I may try this out on my sandbox PC.

slaps forehead Right…sorry, my mistake. :X

This is it! And not obvious, at least for me.
Thanks.
ps. Close thread?

Close thread for you. But my attempts all failed.

I’ll have to start a new thread for me, as I failed.

Neither:

zypper in multimedia:alsa-docs

nor

zypper up -r multimedia alsa-docs

work to install “alsa-docs” off of repository multimedia when there is older !! version of alsa-docs in the “OSS” repos. The newer version in the “multimedia” repos is ignored. That is true no matter what priority “multimedia” repos has wrt “OSS” repository. Zypper insists that it has the latest rpm installed when it in fact does not.

I wasted 30 minutes on this and I am going to stop. IMHO this is simply not functional or the command is far from obvious. IMHO this is a glaring deficiency in the “man zypper”.

Happy to be of some small assistance :wink:

As mentioned, it should be

zypper **d**up ...]

…as ‘up’ never changes the vendor of a package.

Hmmm … my intention is update/upgrade ONLY specific packages. From what I have read “zypper dup” is NOT for updating specific packages. Hence I do not believe it will do what I am trying to achieve, which is an update of specific alsa applications and not others.

So thank you for the suggestion, but I do NOT believe “zypper dup” will do this.

True, it can not be used package-specific, but only like ‘zypper dup -r multimedia’ to switch everything to the most recent versions of that repository.

On the other hand: usually it doesn’t make much sense to install, for example, the doc-files of a certain package from a different repository than the actual package, as this will most likely result in inconsistencies. I don’t think this would be a needed or even usable feature.

In general, perhaps. In this case it does make sence.

Some time back I exchanged emails with the packager of that repos to get a better idea as to what packages should be installed.

Installing all (with dup) from that repos would be a MAJOR blunder and likely break most users sound. But installing select alsa packages from that repos has helped many dozen users get their sound to function, where otherwise it simply would not work.

Its unfortunate I can not compose a zypper command to do the update of SELECTED packages from that repos.

Okay, but you can not expect a package manager such zypper to perform such a task; one of its major aims is to resolve dependencies without the user having to interact. I suppose you could try rpm itself with some ‘force’ option instead - which would not look so neat, of course, but would show what it actually does: break dependencies.

Wouldn’t it be the case that if you set the repo providing the alsa packages to highest priority and did as @oldcpu suggests

zypper up <package>

That should have the desired effect

It would also fetch and install the dependencies of that package (from the same repository), I guess.

It wouldn’t be my favoured way of doing things.
Never yet have I had to fiddle with alsa. Sound always just works. And why is it that for some the alsa version released with openSUSE is just behind what is required?