libzypp: Code 12 Pattern Packages

libzypp 17.25.10

Code 12 Pattern Packages

Author
  Michael Andres ma@su.nosp@m.se.d.nosp@m.e

# Intro

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.

By convention a patterns-package for a `pattern:FOO` is named `patterns-[*-]FOO` and is must provide `pattern() = FOO`. Usually the patterns-package name has a distribution or product identifier embedded, like in `patterns-sles-Minimal` or `patterns-openSUSE-xfce`.

The pattens content is expressed by the patterns-packages dependencies to other packages and patterns-packages.

The list of patterns-package provides used for the new pattern autogeneration:

Basic provides relevant for package management (libzypp/zypper):
`Provides: pattern() = FOO` | The patterns name: `FOO`. Additional attributes like version, release, architecture, summary and description are taken from the pattenrs-package.
`Provides: pattern-visible()` | 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.
Additional pattern properties not used by libzypp, but provided by the API mainly for the YAST UI:
`Provides: pattern-icon() = STRING` | Name of an icon the UI should use for this pattern.
`Provides: pattern-order() = STRING` | A string used by the UI for sorting patterns rather than 'by name'. Usually some 4-digit string like "1750"
`Provides: pattern-category() = STRING` | The category name used in the UI in English (en).
`Provides: pattern-category(de) = STRING` | The category name translated. E.g. into German (de).
`Provides: pattern-includes() = STRING` | 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.
`Provides: pattern-extends() = STRING` | 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.
STRING must be url-hexencoded so that it does not contain any characters that rpm-provides can't have. E.g.: ' ' => %20 / ',' => %2C / '-' => %2D

patterns-sles-Minimal-12-37.1.x86_64.rpm
PROVIDES {
pattern() == Minimal
pattern-icon() == pattern-basis
pattern-order() == 1099
pattern-visible()
pattern-category() == Base%20Technologies
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
pattern-category(ca) == Tecnologies%20de%20base
pattern-category(cs) == Z%C3%A1kladn%C3%AD%20technologie
pattern-category(da) == Basisteknologier
pattern-category(de) == Basistechnologien
...
}
REQUIRES {
systemd
coreutils
insserv
aaa_base
...
}
RECOMMENDS (22){
grub2
rpcbind
nfs-client
rsyslog
...
}