The online update has a patch structure. Each patch has a patch description file and n RPM packages.
YOU uses the information about the name, version and base architecture of the installed products to determine the paths for downloading patch descriptions and RPMs from the server and for caching these files on the local system.
If a product has not the name "SuSE-Linux" it is considered as a business product and slightly different paths and server URLs apply.
The paths to the patch data consist of a base URL or a local base path, a product dependend path and a path depending on the type of data (i.e. descriptions, RPMs and script).
The download base URLs are determined by reading a list of URLs from the URL http://www.suse.de/cgi-bin/suseservers.cgi by default. This URL can be overridden by a product-specific URL by the creator of the product (see media specification). In a running system the URL used for getting the list of YOU servers is saved in the file /var/adm/YaST/ProdDB/prod_00000001 or in the file with the highest number, if there is more than one.
The list is stored locally at /var/lib/YaST2/you/youservers since SL 8.2 (8.1 used the location /etc/suseservers). If the variable YAST2_LOADFTPSERVER in the file /etc/sysconfig/onlineupdate is set to no, the server isn't contacted and the download base URLs are read from the local file /etc/youservers (8.1 used the location /etc/suseservers).
The default download base URLs are ftp://ftp.suse.com/pub/suse/ for the box product and http://sdb.suse.de/download/ for the business products.
Downloaded files are stored locally under the directory /var/lib/YaST2/you/. The description files for installed patches are stored at /var/lib/YaST2/you-installed. There is no product specific path added to the path of the installed patches.
The path to the description files and the other patch data depends on the installed products. The base path is <basearch>/update/<version> for the box product, and <basearch>/update/<productname>/<version> for the business products. <version> is the version of the installed product. <productname> is the name of the installed product.
The different components of the path like description, RPMs and scripts use different subdirectories of this path.
The description files are located in the directory patches.
Example: Patch description files for the 8.1. box product for i386 are loaded from ftp://ftp.suse.com/pub/suse/i386/update/8.1/patches/.
The RPMs are located in a architecture specific subdirectory of the directory rpm. The filename of the RPM is contructed from the Filename: tag of the package description, an automatically determined architecture and the version and the release from the Version: tag of the package description. For the architecture of the RPM to be installed the architecture of the corresponding installed RPM is taken. If there is no installed RPM, the base architecture is used. As a last fallback noarch is used.
Example: i586 RPMs for the i386 version of the 8.1. box product are stored to /var/lib/YaST2/you/i386/update/8.1/rpm/i586/.
The file name for the RPM which is looked for on the server is constructed from entries of the Packages section of the patch description file as <name>-<version>.<arch>.rpm. <name> is the value of Filename: stripped by the .rpm suffix. <version> is the value of Version:.
<arch> is determined by the installed system. If there already is a version of the RPM installed on the system, its architecture is used. If not, a list of compatible architectures is gone through.
If there is a patch RPM present with the name <name>-<version>.<arch>.patch.rpm and a previous version of the package is already installed, the patch RPM is used for the update.
The first RPM matching the criteria which is found on the server is downloaded and installed.
If the InstPath: tag has a non-empty value this value is used as URL to an external RPM. The RPM file specified by the URL is downloaded and installed. No automatic processing of download path or file name takes place.
Scripts are located in the directory scripts.
Example Scripts belonging to patches for the i386 version of the 8.1. box product are stored to /var/lib/YaST2/you/i386/update/8.1/scripts/.
YOU provides the option to download extra files which aren't RPMs or scripts. The files are specified by a Files tag in the patch file. Each file specification consists of an URL where the file is downloaded from and the size of the file in bytes.
The files are downloaded into a directory files under the local path (usually /var/lib/YaST2/you/files). The directory hierachy of the file on the server is recreated under the files directory. For example a file with the URL http://ftp.suse.com/pub/suse/myfile.txt is downloaded to /var/lib/YaST2/you/files/pub/suse/myfile.txt.
Patch informations are downloaded from the server by reading a file with the name directory.3 from the URL constructed from the base URL by adding the product specific path and the patches directory. The directory.3 file contains a list of filenames which have to be present in the same directory. Patches are downloaded and installed in the order of the names in this file.
All files downloaded from the server are checked for valid signatures.
If more than one product is installed patches for each product are downloaded and installed. Products are handled in the order of their installation which goes from the less specific to the more specific one.
Normally there need to be update directories available for all installed products. If there are no patches for a given product the patch list in the directory.3 file has to be empty. If the patch list for a product is missing YOU reports that as an error and aborts. There are two exceptions to that rule:
Patch description files can have an arbitrary name.
Kind: [security|recommended|optional|document|YaST2] Patchname: <name> Patchversion: <version< Shortdescription.<language> : <short description; one line> Longdescription.<language>: <long description of the patch; could have more lines> <language>.noitpircsedgnol: Preinformation.<language>: <Information in a popup which will be displayed before the > <packages of this patch will be installed. The user > <can abort the installation of THIS patch. > <language>.noitamrofnierp: Postinformation.<language>: <Information in a popup which will be displayed after the > <packages of this patch have been installed. > <language>.noitamrofnitsop: Size: <Size of this patch in KByte> # buildtime Tue Nov 14 12:46:42 UTC 2000 Buildtime: < time in seconds> MinYaST2Version:<minimal YaST2 version which is needed for installation> UpdateOnlyInstalled: <true/false; Only packages ( described in this patch ) will be updated which are installed. > patch will be installed. > Reggirtllatsni: --> Prescript: <name of script executed before installing the patch> UpdateScript: <name of script executed instead of installing the rpms.> (patch for SLES9) Postscript: <name of script executed after installing the patch> Packages: <one or more package descriptions> . .. ... like: ## ## -----> bash <----- ## Filename: bash.rpm Series: i586 Label: The GNU Bourne-Again Shell Size: 2116014 838521 PatchRpmSize: 2116014 423212 PatchRpmBasedOn: 2.03-17 2.04-1 2.04 35 Buildtime: 973570238 BuiltFrom: zq1/bash-version-release.[no]src.rpm RpmGroup: System Environment/Shells Copyright: 1989 Free Software Foundation, Inc. AuthorName: Chet Ramey <chet@po.cwru.edu> AuthorEmail: AuthorAddress: Version: 2.04-81 Requires: /bin/sh ld-linux.so.2 libc.so.6 libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1) libdl.so.2 libdl.so.2(GLIBC_2.0) libdl.so.2(GLIBC_2.1) libhistory.so.4 libncurses.so.5 libreadline.so.4 Provides: sh bash rbash libhistory.so.4 libreadline.so.4 Conflicts .. Oboletes: .. ... .. . Segakcap:
Tag | Possible values | Description |
---|---|---|
Kind | one of the strings "security", "recommended", "patchlevel" (since 9.1), "optional", "document" or "YaST2" | Type of patch. See the section about selection of patches for details. |
Patchname | string | Name of the patch. All patches having the same name are handled as different versions of the same patch. |
Patchversion | string of the form <version>-<release> | Version of the patch. |
Shortdescription | string | One-line summary of the patch |
Longdescription | string | Multi-line description of the patch |
Preinformation | string | Multi-line message, which is shown before installing the patch |
Postinformation | string | Multi-line message, which is shown after installing the patch |
Size | Integer | Size of patch in KByte |
UpdateOnlyInstalled | "true" or "false" | If set to "true", only packages are installed which already are installed in a previous version and don't have the ForceInstall flag set to "true". The default value for UpdateOnlyInstalled is "false". |
UpdateOnlyNew | "true" or "false" | If set to "true", only packages are installed which are contained in the
patch in a newer version than on the installed system. Packages in the same
version aren't installed again. Packages which are contained in the patch in
an older version than on the installed system aren't installed and don't
prevent pre-selection of the patch. Packages which aren't already installed on
the system also aren't installed by the patch.
Default value for UpdateOnlyNew is "false". Since 9.1 |
Prescript | file name | Name of script to be executed before installing the RPMs of the patch. |
UpdateScript | file name | Name of script to be executed instead of installing the RPMs of the patch. It is called with a list of rpm filenames as arguments. If it is a ycp file, the list of rpm filenames is not in the arguments but written into a special file, /var/adm/YaST/you_update_arguments. Beside the ycp file a second script should be provided which is run in case the command line tool is used. Patch for SLES9. |
Postscript | file name | Name of script to be executed after installing the RPMs of the patch. |
Packages | list of tagged values | Set of package informations, see package tag description for details. |
Files | list of files | This is a multi-line tag which takes a list of extra files to be
downloaded.
Each line specifies a file by an URL where the file is to be downloaded from
and the size of the file in bytes. The URL and the size are separated by a
space. See the extra files section for details
about the handling of files.
Since 9.0 |
Tag | Possible values | Description |
---|---|---|
Filename | String of the form <RPM name>.rpm | Name of the RPM. The .rpm suffix has to be present, but isn't used anywhere. Since 8.2 the suffix isn't required anymore. |
Version | string of the form <version>-<release> | Version of the RPM |
Series | string | Architecture of the RPM Since 9.1 |
Requires | string | List of "Requires" from RPM separated by spaces |
Provides | string | List of "Provides" from RPM separated by spaces |
Obsoletes | string | List of "Obsoletes"from RPM separated by spaces |
Label | string | One line description of the RPM |
Size | two integers separated by a space | The first number is the size of the installed package in bytes, the second number is the size of the RPM archive file. |
PatchRpmSize | two integers separated by a space | The first number is the size of the installed package in bytes, the second
number is the size of the patch RPM archive file. Since 8.2 |
PatchRpmBasedOn | list of version numbers separated by spaces | List of version numbers which can be updated by using the patch RPM. |
Buildtime | integer | Build time as extracted from RPM |
RpmGroup | string | RPM group as extracted from RPM |
ForceInstall | "true" or "false" | If set to true the package is installed even if the patch has the
UpdateOnlyInstalled flag set to "true" and no previous version of the package is
present on the system. The default value for ForceInstall is "false".
Since 9.1 |
If the Patchname: tag is present its value will be used as name for the patch. If it is empty or missig the file name of the patch description file is used as name. If the Patchversion: tag is present, its value will be used as version of the patch. If it is empty or missing the version will be set to "0".
If there is more than one patch with the same name, only the patch with the highest version will be offered for installation.
There are some criterions for preselecting patches which will be installed by YOU:
If the flag "UpdateOnlyInstalled" is not defined or is false, ALL packages of the patch will be installed. If this flag is "true", only packages will be updated which are already installed unless they have the flag "ForceInstall" set to "true". The "ForceInstall" flag is supported since 9.1.
Since 9.1 there is the patch attribute "UpdateOnlyNew". If this is set to true only packages are installed which are newer than the package on the installed system. This means that packages which are in the same version in the patch as on the system aren't downloaded and installed again and that packages whose version in the patch is older than on the installed system aren't downgraded. It also means that the patch is automatically selected if it contains at least one package which is newer than on the installed system.
Since 9.1 a patch file can contain multiple variants of the same package in different architectures. The variant will be chosen which fits best to the installed system.
The algorithm to select the best variant works as follows: All package instances of the same name are treated as variants of the same package. Version and release number are ignored and may be different. If the package is already installed the variant having the same architecture as the installed package will be chosen. If no such variant exists, no variant of the package will be chosen at all. If the package isn't installed, the variant with the best architecture according to the list of compatible architectures specified by the product and the actual architecture of the system will be chosen. If the architecture of the package isn't listed as compatible architecture the package won't be installed.
There is the possibility to run scripts while installing packages. The script from the Prescript: tag is executed before the packages are installed. The script from the UpdateScript: tag is executed instead of installing the packages. The script from the Postscript: tag is executed after the packages have been installed. The scripts are downloaded from the scripts subdirectory and stored localy before execution. (Since 10.0)
The online update can be started from the YaST2 control center by selecting the corresponding icon.
The GUI version of the online update can also be started by command line: yast2 online_update [.url <url>] [.nosigcheck]. With the .url argument the given URL is selected as source for the patches. If the argument .nosigcheck is present the signatures of the downloaded files aren't checked.
There is a command line version of YOU which can be used to non-interactively download an install patches. The command is online_update. A short description of the available options is available by online_update --help. Calling the command without any options will download and install all available patches relevant to the installed system.
There is also the possibilty to provide the patches on a CD ROM. Insert the CD ROM with the patches and start the "Patch CD update" in YaST2 Control Center. This is euivalent to start the online update with the URL cd:///. You can start the Patch CD Update from the command line with yast2 online_update .cd_default.
The patch structure and the directories where the patches are located are exactly the same as on the ftp server. The path on CD ROM starts with the {ARCHITECTURE} directory, e.g. the path on ftp server is: /pub/suse/{ARCHITECTURE}/update/{SuSE-Version}/patches/*, the directory structure on the CD ROM is: {ARCHITECTURE}/update/{SuSE-Version}/patches/*.
Since 9.1 YOU supports patch CD updates from more than one CD. This requires some additional files to identify the CDs and to specify the distribution of patches on the CDs.
CDs are identified in the same way as installation CDs (see UL Media description) by a file "/media.x/media" where the x is the actual number of the CD. The media file contains at least two lines of text which are used as identification of the media set.
Distribution of patches on the CDs is specified by a file "mediamap" in the "patches" directory. It contains a list of patches together with the number of the CD which contains the patch. The patch is listed by its file name the media number follows on the same line separated by a space. Patches which aren't listed in this file are assumed to be on the same CD as the last patch listed with a number. The order of patches is taken from the "directory.3" file.
Example of mediamap file:
patch-1 1 patch-5 2
All parts of a patch (patch file, packages, scripts and additional files) have to be on the same CD. All patch CDs have to contain the patch files for all patches on all CDs. The "directory.3" file is only needed on the first patch CD. Leaving it out from the other CDs prevents that the patch CD update is started from another than the first CD which doesn't work.
YOU writes a summary log to /var/lib/YaST2/you/youlog since SL 9.1/SLES 9, detailed logs are written to the standard YaST log file (/var/log/YaST2/y2log).
If the environment variable Y2DEBUG is set, debug information is included in the YaST log. For YOU versions between 8.1/SLES8 and 9.0 setting the environment variable Y2SLOG_DEBUG adds additional debug information from the packagemanager backend. In particular for the 8.1/SLES8 version it's recommended to set the Y2SLOG_DEBUG variable to get meaningful log information.