libzypp  11.13.5
Solver - Vendor protection
Author:
Michael Andres ma@su.nosp@m.se.d.nosp@m.e

Vendor protection rule

Tracing a packages origin libzypp uses the packages vendor string. The vendor string is part of the rpm header and thus defined at the time the package was built. It stays the same, no matter which repository was used to ship the package. Using rpm is one way to retrieve a packages vendor string:

$ rpm -q --qf '%{name} \tvendor: %{vendor}\n' libzypp nautilus libdvdread3
libzypp vendor: openSUSE
nautilus vendor: obs://build.opensuse.org/GNOME
libdvdread3 vendor: http://packman.links2linux.de

Also several zypper commands will display a packages vendor:

$ zypper info libzypp
Information for package libzypp:
Repository: openSUSE-11.4-Update
Name: libzypp
Version: 8.12.6-0.2.1
Arch: x86_64
Vendor: openSUSE <===
Installed: Yes
Status: up-to-date
Installed Size: 7.0 MiB
Summary: Package, Patch, Pattern, and Product Management
Description:
Package, Patch, Pattern, and Product Management

The vendor protection rule is quite simple:

Note:
When looking for an installed packages update candidate, we are looking for a package originated by the same vendor (not repository!) as the installed one.

Vendor protection tuning

The brute force method is to turn off all vendor protection in /etc/zypp/zypp.conf:

##
## 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

Groups of equivalent vendor strings

A built in example for this are the vendor strings for SuSE and openSUSE. All vendor strings starting (case insensitive) with either "suse" or "opensuse", are considered to be the same vendor and their packages may replace each other without asking.

You may define your own classes of equivalent vendor strings by creating an entry in the /etc/zypp/vendors.d directory. The directory does not exist per default, so you may have to create it first. For each group of vendor strings create a file, name it as you like, with the following content:

[main]
## A comma separated list of vendor string (prefixes!)
## Example: suse,opensuse
vendors = <PUT YOUR LIST HERE>
Note:
The built in rule unifying "suse" and "opensuse" gets disabled as soon as you mention either of those string in a custom rule.

Related classes