Imported Upstream version 14.45.0
[platform/upstream/libzypp.git] / doc / autoinclude / PatternPackages.doc
1 /**
2
3 \page zypp-pattern-packages Code 12 Pattern Packages
4
5 \author Michael Andres <ma@suse.de>
6
7 <HR><!-- ====================================================================== -->
8
9 \section zypp-pattern-packages_intro Intro
10
11 Since Code12 (SLES-12) we utilize a new method of defining patterns, as opposed to the older XML-based patterns files. A pattern and it's dependencies are now represented by a rpm package and the few pattern specific properties are provided by the package. No extra XML-file is needed.
12
13 By convention a patterns-package for a <tt>pattern:FOO</tt> is named <tt>patterns-[*-]FOO</tt> and is must provide <tt>pattern() = FOO</tt>. Usually the patterns-package name has a distribution or product identifier embedded, like in <tt>patterns-sles-Minimal</tt> or <tt>patterns-openSUSE-xfce</tt>.
14
15 The pattens content is expressed by the patterns-packages dependencies to other packages and patterns-packages.
16
17 The list of patterns-package provides used for the new pattern autogeneration:
18
19 <table width="100%" border="1">
20   <tr>
21     <td colspan="2"><b>Basic provides relevant for package management (libzypp/zypper):</b></td>
22   </tr>
23   <tr>
24     <td width="30%"><tt>Provides:  pattern() = FOO</tt></td>
25     <td>The patterns name: <tt>FOO</tt>. Additional attributes like version, release, architecture, summary and description are taken from the pattenrs-package.</td>
26   </tr>
27   <tr>
28     <td><tt>Provides:  pattern-visible()</tt></td>
29     <td>A UI hint telling whether the pattern should be shown to the user. If the provides is missing, the UI will usually hide the pattern in lists and output. This is mainly used for helper patterns defining a basic content which is then required/recommended by different (visible) patterns.</td>
30   </tr>
31   <tr>
32     <td colspan="2"><b>Additional pattern properties not used by libzypp, but provided by the API mainly for the YAST UI:</b></td>
33   </tr>
34   <tr>
35     <td><tt>Provides:  pattern-icon() = STRING</tt></td>
36     <td>Name of an icon the UI should use for this pattern.</td>
37   </tr>
38   <tr>
39     <td><tt>Provides:  pattern-order() = STRING</tt></td>
40     <td>A string used by the UI for sorting patterns rather than 'by name'. Usually some 4-digit string like "1750"</td>
41   </tr>
42   <tr>
43     <td><tt>Provides:  pattern-category() = STRING</tt></td>
44     <td>The category name used in the UI in English (en).</td>
45   </tr>
46   <tr>
47     <td><tt>Provides:  pattern-category(de) = STRING</tt></td>
48     <td>The category name translated. E.g. into German (de).</td>
49   </tr>
50   <tr>
51     <td><tt>Provides:  pattern-includes() = STRING</tt></td>
52     <td>Hint for the UI to include an other patterns content (i.e. its required and recommended packages) in this patterns content list. Usually used to embed the content of an invisible pattern in a visible one.</td>
53   </tr>
54   <tr>
55     <td><tt>Provides:  pattern-extends() = STRING</tt></td>
56     <td>Reverse-includes. Hint for the UI to include this patterns content (i.e. its required and recommended packages) in an other patterns content list. Usually used to embed the content of an invisible pattern in a visible one.</td>
57   </tr>
58   <tr>
59     <td colspan="2">STRING must be url-hexencoded so that it does not contain any characters that rpm-provides can't have.</br>
60     E.g.: ' ' => %20 / ',' => %2C / '-' => %2D</td>
61   </tr>
62 </table>
63
64 \code
65 patterns-sles-Minimal-12-37.1.x86_64.rpm
66  PROVIDES {
67   pattern() == Minimal
68   pattern-icon() == pattern-basis
69   pattern-order() == 1099
70   pattern-visible()
71   pattern-category() == Base%20Technologies
72   pattern-category(ar) == %D8%A7%D9%84%D8%AA%D9%83%D9%86%D9%88%D9%84%D9%88%D8%AC%D9%8A%D8%A7%D8%AA%20%D8%A7%D9%84%D8%A3%D8%B3%D8%A7%D8%B3%D9%8A%D8%A9
73   pattern-category(ca) == Tecnologies%20de%20base
74   pattern-category(cs) == Z%C3%A1kladn%C3%AD%20technologie
75   pattern-category(da) == Basisteknologier
76   pattern-category(de) == Basistechnologien
77   ...
78 }
79  REQUIRES {
80   systemd
81   coreutils
82   insserv
83   aaa_base
84   ...
85 }
86  RECOMMENDS (22){
87   grub2
88   rpcbind
89   nfs-client
90   rsyslog
91   ...
92 }
93 \endcode
94
95 */