Imported Upstream version 17.25.4
[platform/upstream/libzypp.git] / doc / autoinclude / SolverVendorChange.doc
1 /**
2
3 \page pg_zypp-solv-vendorchange Solver - Vendor protection
4
5 \author Michael Andres <ma@suse.de>
6
7 \section zypp-solv-vendorchange Vendor protection rule
8
9 Tracing a packages origin \c libzypp uses the packages \c vendor string. The \c 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 \c rpm  is one way to retrieve a packages \c vendor string:
10
11 \code
12 $ rpm -q --qf '%{name} \tvendor: %{vendor}\n' libzypp nautilus libdvdread3
13 libzypp         vendor: openSUSE
14 nautilus        vendor: obs://build.opensuse.org/GNOME
15 libdvdread3     vendor: http://packman.links2linux.de
16 \endcode
17
18 Also several \c zypper commands will display a packages \c vendor:
19
20 \code
21 $ zypper info libzypp
22
23 Information for package libzypp:
24
25 Repository: openSUSE-11.4-Update
26 Name: libzypp
27 Version: 8.12.6-0.2.1
28 Arch: x86_64
29 Vendor: openSUSE                <===
30 Installed: Yes
31 Status: up-to-date
32 Installed Size: 7.0 MiB
33 Summary: Package, Patch, Pattern, and Product Management
34 Description:
35 Package, Patch, Pattern, and Product Management
36 \endcode
37
38 \subsection zypp-solv-vendorchange-rule The vendor protection rule is quite simple:
39
40 \note When looking for an installed packages \e update \e candidate, we are looking for a package originated by the \e same \e vendor (not repository!) as the \e installed one.
41
42
43 \section zypp-solv-vendorchange-tune Vendor protection tuning
44
45 The \e brute \e force method is to turn off all vendor protection in \c /etc/zypp/zypp.conf:
46
47 \code
48 ##
49 ## EXPERTS ONLY: Per default the solver will not replace packages of
50 ## different vendors, unless you explicitly ask to do so. Setting this
51 ## option to TRUE will disable this vendor check (unless the application
52 ## explicitly re-enables it). Packages will then be considered based on
53 ## repository priority and version only. This may easily damage your system.
54 ##
55 ## CHANGING THE DEFAULT IS NOT RECOMMENDED.
56 ##
57 ## Valid values:  boolean
58 ## Default value: false
59 ##
60 solver.allowVendorChange = true
61 \endcode
62
63 \subsection zypp-solv-vendorchange-equiv Groups of equivalent vendor strings
64
65 A built in example for this is the \c vendor string \c SuSE. All vendor strings starting (case insensitive) with \c "suse", are considered to be the \e same \e vendor and their packages may replace each other without asking.
66
67 You may define your own classes of equivalent \c vendor strings by creating an entry in the \c /etc/zypp/vendors.d directory. For each group of \c vendor strings create a file, name it as you like, with the following content:
68
69 \code
70 [main]
71 ## A comma separated list of equivalent vendor string (prefixes!)
72 ## Example:
73 ## vendors = suse,opensuse
74 vendors = <PUT YOUR LIST HERE>
75 \endcode
76
77 \note A built in rule unifying \c "suse"  and \c "opensuse" was disabled in libzypp-16.7.1. The above example would recreate it.
78
79 \note Within the \c "opensuse*" namespace exact matches (case insensitive) are required. The above example will allow switching between \c "suse*" and \c "opensuse" but not e.g. \c "opensuse build service".
80
81
82 \section zypp-solv-vendorchange-Impl Related classes
83
84 \li \ref zypp::VendorAttr (vendor string equivalence and \c vendors.d parser)
85
86 */