Libzypp/Metadata/YaST/selection

From openSUSE

Contents

Selection (.sel) files

Selections are deprecated, please use Patterns if possible.


YaST/Zypp selection description

Motivation

Selections define package sets by grouping list of package names under a common name.
This abstracts away from the single package selection to a 'task' (or 'usage') oriente d software setup.
A similar approach is to use (empty) 'task' packages which require a set of other packages in order to accomplish a task. However, this approach does not take language specific packages into account, nor does it allow for automatic deselection of packages.
Grouping sets of packages together also allows to compute dependencie s on a much smaller memory footprint and makes it easier for the unexperienced user to choose the right set of software.

By making selections similar to packages (by assigning name, version, architecture, dependencies, etc.) similar user interfaces and internal dependency handling can be used.
Ideally, a complete distribution can be put

together by using selections as building blocks abstracting away from the huge amount of packages.

This document describes the format of a selection file.

Requirements

Selection requirements

  1. Name
    A selection has a name.
  2. Version
    A selection has a version which should denote the product version this selection belongs to.
  3. Release
    A selection has a release, which should be increased for every change of the selection.
  4. Architecture
    A selection might have an architecture which restricts it to systems supporting this architecture but no better architecture.
    The order of ar

chitectures is defined in the [media-descr.html content] file.

  1. Summary
    A short label describing the selection (in multiple languages!)
  2. Category
    A selection can be a base or an add-on selection.
    Base selections should not have any requirements, just recommendations or suggestions. Base
selections are mutually exclusive to other base selections.
Add-on selections stack onto base selections and can be grouped by the category name.
  1. Sort oder
    When presenting selections to the user, a sort order independant of the summary translations is needed.
  2. Requires
    Other selections required
  3. Provides
    A selection implicitly provides its name. An additional provides is useful on updates if a selection was renamed.
  4. Obsoletes
    Selections obsoleted by this selection. Useful for update.
  5. Conflicts
    Selections conflicting with this selection.
  6. Recommends
    Selections recommended by this selection. (Weak dependency)
    Recommended selections are automatically pre-selected but the user can choose to de-des

elect them.

  1. Suggests
    Selections suggested by this selection. (Weak dependency)
    Suggested selections are offered to the user but are not automatically pre-selected.
  2. Size
    Sum of all package sizes, Sum of installed packages
  3. Package to install (generally)
    List of packages installed by this selection
  4. Package to install (language specific)
    List of packages installed by this selection if the respective language is active
  5. Packages to remove (generally)
    List of packages removed by this selection
  6. Packages to remove (language specific)
    List of packages removed by this selection if the respective language is active


Implementation

Syntax

The syntactic representation of a selection is similar to that of a package as describes in the [package-descr.html package description] document.
File encoding is UTF-8.< br /> File is line based.
Lines starting with '#' are ignored.

Selection keywords

Keyword Value Comment
=Ver: Syntax version of this file Minimal parser version needed to parse this file.
Should be set to 4.0 for SUSE Linux 9.2
=Sel: name version release architecture These name, version, and release identify a selection unambiguously and are used as a key.
The version should match the product version, i.e. 9.2

for SUSE Linux 9.2
The release should be incremented every time the selection file is changed, just like it's done for packages.
The architectur e is used like in the packages file, the best matching architecture for a selection (according to the architecture ordering given in the content file) is choosen.

=Sum: summary one line label in default language
=Sum.lang: summary one line language specific label
+Des:
-Des:
description multi line description in default language
+Des.lang:
-Des.lang:
description multi line language specific description
=Cat: category

category (aka 'type of') selection
can be 'base' (only one base selection can be choosen) or any other string, denoting an 'add-on' selection (multiple ad don selection can be choosen)
Selections with category 'laptop' will be pre-selected if a laptop system is detected.
(On the long run this key will de note a grouping for add-on selections and the 'base' key will be dropped. In an ideal world, only one base selection should exist.
The current package dependencies aren't r eady for a true building block approach.)

=Vis: visibility visibility of selection (for user interface)
Selection can be hidden from the user. This is useful e.g. for architecture dependant selections which are handled internally
by the system.
=Ord: ordering order of selection (for user interface)
This three-digit-integer-value defines the order of the selection when listing multiple selections in the user interface
+Req:
-Req:
selections selections required for installation
+Prv:
-Prv:
selections selections provided
+Con:
-Con:
selections selections conflicting
+Obs:
-Obs:
selections selections obsoleted
+Rec:
-Rec:
selections recommended selections
+Sug:
-Sug:
selections suggested selections
=Siz: pkgsize instsize size in bytes
+Ins:
-Ins:
packages list list of packages to install
(see below)
+Ins.lang:
-Ins.lang:
packages list list of packages to install if given language is active
+Del:
-Del:
packages list list of packages to delete
(see below)
+Del.lang:
-Del.lang:
packages list list of packages to delete if given language is active

The list of install and delete packages normally just lists packages by name, one per line.
An expection is the syntax name (alternative [,alternative ...]) which gives a list of alternative packages if the first isn't available.
The first available package of the alternative list will be choosen.

Naming of the selection file

Starting from parser version 4.0 on (used with SUSE Linux 9.2 or later), the selection files should follow the same naming rules as packages. The filename should include the name

of the selection, the version, the release, and the architecture. All these values are listed as =Sel: in the file itself.
The generic format is

name-version-release.architecture.sel

Example

(shortened at ...)
Filename is Kde-Desktop-8.1-42.i386.sel

 # SuSE-Linux-Package-Selection 9.2-1.i386 -- (c) 2002 SuSE Linux AG
 # Needs parser version 4.0 or greater
 # generated on Sat Aug 10 17:55:42 UTC 2002

 =Ver: 4.0

 =Sel: Kde-Desktop 9.2 1 i386

 =Siz: 123456 1234567

 =Sum.cs: Prostředí KDE
 =Sum.de: KDE Desktop-Umgebung
 =Sum.en: KDE Desktop Environment
 =Sum.es: Entorno Gráfico KDE
 =Sum.fr: Environnement de bureau KDE
 =Sum.gl: KDE Desktop Environment
 =Sum.hu: KDE grafikus munkakörnyezet
 =Sum.it: Ambiente Desktop KDE
 =Sum.ja: KDE デスクトップ環境
 =Sum.lt: KDE Desktop Environment
 =Sum.nl: KDE Desktop omgeving
 =Sum.pt: KDE Desktop Environment
 =Sum.sv: KDE Desktop Environment
 =Sum.tr: KDE Desktop Environment

 +Req:
 X11
 Basis-Sound
 -Req:

 +Con:
 Minimal
 -Con:

 +Rec:
 KDE-Multimedia
 -Rec:

 +Sug:
 KDE-Games
 -Sug:

 =Cat: addon

 =Vis: true

 +Ins:
 SDL
 aalib
 alsa
 

...


smpppd
unixODBC
wvdial
-Ins:
+Ins.cs:
kde3-i18n-cs
-Ins.cs:
+Ins.da:
kde3-i18n-da
-Ins.da:
+Ins.de:
kde3-i18n-de
-Ins.de:

...


back ...