Home Wiki > openSUSE:Standards YaST2 Repository Metadata media
Sign up | Login

openSUSE:Standards YaST2 Repository Metadata media

tagline: From openSUSE

Icon-expand.png This article is a stub!
This article needs to be expanded. You are welcome to help in line with the Style Guidelines.
Template:Navigation Software Repositories


YaST/Zypp media description

Implementation

The media and product description is split into a set of files, separating the media preparation data from the contents (product) and making it possible to combine several products on a single media.
At toplevel of a media, a directory

       /media.1/

should exist.

The numeric extension depends on the media number in case of a media set. The first media has .1, the second .2, and so on.
This allows merging all medias of set into a single directory. YaST always knows which media to expect and can therefore directly access the correct media directory.

Files inside media.N/

Inside the media.N/ directory the files media and products must exist.
Optionally, a file named patches may exist to denote a media with patches (e.g. for YaST online update).

The media file contains the media identifier needed to determine correctness when using removable media.
In case of split media, it must be present on every media of the set.

The products file contains directory specifications for each product.
In case of split media, it must be present of the first media of the set.

The patches file contains a single directory specification for the root of the patches directory tree and an optional list of exclusive products the patches apply to.
In case of split media, it must be present of the first media of the set.

The /media.N/media file

This should contain an identifier to quickly verify the media set the media belongs to. This identifier is not shown to the user but should contain human-readable data for debugging purposes.

Usually a timestamp, e.g. 20061129031301, is used as media set identifier.

File: media
Location /media.N/ directory on media
Content two or more lines of ASCII as follows
<vendor>
<YYYYMMDDHHMMSS>

[<media count>]
[<media flags>]
[<media names>]


The identification data is stored inside the file on purpose. It could also be encoded in the file name (older SuSE media did it). But this requires a directory scan for file access and should be avoided.

By storing the vendor name in the file, the timestamp can be kept vendor specific. (It's the name of the vendor who created the media which might be different from a product vendor! It's just used as an additional key for media identification.)

All media of a set must provide identical vendor and identification information in the media file.

The /media.1/media file

The /media.1/media file may contain additional information.
The remaining media files of a media-set may repeat this information, but it is not evaluated again.

The <media count> is needed if the installation data is split up on multiple (identical) medias.
The media count is a numerical value (all characters are digits), and defaults to 1.

<media flags> may further describe the media.
In order to distinguish the flags from the count line, the flags values start with a letter.

Currently defined flags:

flag meaning
doublesided media is double sided, YaST will ask for 'front side' for odd-numbered media and 'back side' for even-numbered media.
The default is single-sided media.

<media names> may define alternate strings to use when asking to insert a certain media.
They are defined as <key><whitespace><value> pairs, separated by \n.

key value
MEDIA<N> UTF-8 encoded string to use when asking for media <N>.
MEDIA<N>.<lang> UTF-8 encoded translation of MEDIA<N> may be defined by appending the ISO <language>

or <language>_<country> code.

Example

 linux# mount /dev/cdrom /mnt
 linux# ls /mnt/media.1
 media
 products
 linux# cat /mnt/media.1/media
 SuSE Linux AG
 20020921153042
 3
 MEDIA1 SUSE Linux 9.1 DVD 1
 MEDIA2 SUSE Linux 9.1 DVD 2
 MEDIA3 SUSE Linux 9.1 DVD 3
 linux#

The products file

This file contains the directory name for each product contained on the media.

If this file is not present, a single product on the media's root directory is assumed.

It is an ASCII file with one line per product. Each line starts with the directory name (relative to the media's root dir !), followed by whitespace (space or tab) followed by the product name and version. A leading slash in the directory name is only needed to specify the root directory of the media.

File: products
Location /media.1/ directory
Content one or more lines of ASCII as follows
<directory> <whitespace> <product>

<whitespace> <version>

Example

 linux# mount /dev/cdrom /mnt
 linux# cat /mnt/media.1/products
 /      SuSE Linux Personal 8.1-0
 sles-8 SuSE Linux Enterprise Server 8-0
 openlinux      Caldera OpenLinux 4.0-0
 linux# ls -a /mnt
 ...
 media.1/
 ...
 sles-8/
 openlinux/
 ...

In the above example, "SuSE Linux Personal" uses the toplevel directory, whereas the other products have their own sub-directories.