20 Build Preinstall Images

Preinstall images can optionally be used to install a set of packages in one fast step instead via single package installations. Depending on the build host even snapshots with copy-on-write support may be used which avoids any IO.

A preinstall image can be used if it provides a subset of packages which is required for the build job. The largest possible image is taken if multiple are usable.

To use a preinstall image there needs to be a package container inside of the project or in a repository used by the build job. This package needs a _preinstallimage file. The syntax of it is spec file like, but just needs a Name: and at least one BuildRequires: line. In addition also #!BuildIgnore: tags may be used to ignore packages despite of dependencies. Also usage of %if cases is possible.

Preinstall image build jobs get always preferred to allow the best effect of them. It is recommended to define images for often used standard stacks.

Example _preinstallimage file for a basic preinstall image:

Name: base
BuildRequires: bash
#!BuildIgnore: brp-trim-desktopfiles

Print this page