From 395665f9519f4faffd735b215b2dbfbe761a04fb Mon Sep 17 00:00:00 2001 From: Dushyant Acharya Date: Thu, 12 Nov 2026 20:56:11 +0530 Subject: [PATCH] Crossreference PACKAGES and negation syntax in build config Add xml:ids to the negation and PACKAGES syntax paragraphs in xml/obs_build_config.xml, clarify which keywords support ! and !* based on obs-build, and link package-taking keywords and BuildFlags to them. Fixes #377 --- xml/obs_build_config.xml | 46 +++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/xml/obs_build_config.xml b/xml/obs_build_config.xml index 027328a8..cabb04a4 100644 --- a/xml/obs_build_config.xml +++ b/xml/obs_build_config.xml @@ -107,13 +107,23 @@ condition. - Many keywords, like `Required` or `BuildFlags`, do not replace existing - data, but add to it. This means you can have multiple `BuildFlags` + Many keywords, like Required or BuildFlags, do not replace existing + data, but add to it. This means you can have multiple BuildFlags lines instead of having one line with all the flags you need. - - - An exclamation mark `!` can be prepended to the argument to remove - an existing entry from the data. + An exclamation mark ! can be prepended to an argument to remove + an existing matching entry from the data (or !* to clear all entries). + This applies to list-based keywords (Preinstall, + VMInstall, Required, + Support, Keep, + Prefer, Ignore, + Conflict, Runscripts, + Order, ExpandFlags, + BuildFlags, PublishFlags, + RepoURL, RegistryURL, + AssetsURL, OnlyNative, + AlsoNative, and IgnoreRebuild), + as well as Substitute and FileProvides + (by key). In the following list, the placeholder PACKAGES @@ -122,6 +132,7 @@ For example, as a package name you need the base name like gcc but not the full name as in gcc-1.2.3.i386.rpm. + All package list keywords also support removing entries with !. @@ -170,7 +181,8 @@ Support: pax debbuild BuildFlags: FLAG:VALUE The BuildFlags keyword defines flags for the - build process. The following values for FLAG are usable: + build process (for additive and removal syntax with !, see ). + The following values for FLAG are usable: allowrootforbuild @@ -347,7 +359,7 @@ Support: pax debbuild Conflict: PACKAGE - Specify that a package must not be installed in the build environment. + Specify that a package must not be installed in the build environment (see for package syntax and negation with !). @@ -483,7 +495,7 @@ Support: pax debbuild default. This is mostly done to reduce the amount of memory needed, as the package file lists take up a considerable amount of repository meta data. As a workaround, FileProvides can be used to tell the systems which - packages contain a file. The File needs to have the full path. + packages contain a file (see for package syntax). The File needs to have the full path. @@ -512,7 +524,7 @@ Support: pax debbuild Ignore: PACKAGE_OR_DEPENDENCY - Ignore can be used to break dependencies. This can be useful to + Ignore can be used to break dependencies (see for package syntax). This can be useful to reduce the number of needed packages or to break cyclic dependencies. If a package is specified, all capabilities provided by the package are ignored. @@ -534,7 +546,7 @@ Support: pax debbuild To eliminate build cycles the to-be-built package are not installed by default, even when it is required. Keep can be used to overwrite this - behavior. It is usually needed for packages like make + behavior (see for package syntax and removal with !). It is usually needed for packages like make that are used to build itself. Preinstalled packages are automatically kept, as the package installation program needs to work all the time. @@ -584,7 +596,7 @@ Support: pax debbuild tools, which just pick one of the package. Because one of OBS' goal is to provide reproducible builds, it reports an error in this case instead of choosing a random package. The Prefer: tag lists packages to be preferred - in case a choice exists. When the package name is prefixed with a dash, + in case a choice exists (see ). When the package name is prefixed with a dash, this is treated as a de-prefer. @@ -603,7 +615,7 @@ Support: pax debbuild This is used to specify packages needed to run the package installation - program. These packages are unpacked so that the native installation + program (see for package syntax and cancellation with !). These packages are unpacked so that the native installation program can be used to install the build environment. Included scripts are not executed during this phase. However, these packages will be re-installed later on including script execution. @@ -908,7 +920,7 @@ Support: pax debbuild Required: PACKAGE - Specify a package that always is installed for package builds. + Specify a package that always is installed for package builds (see for package syntax and cancellation with !). A change in one of these packages triggers a new build. @@ -919,7 +931,7 @@ Support: pax debbuild Defines the scripts of preinstalled packages which needs to be executed directly after the preinstall phase, but before installing the - remaining packages. + remaining packages (see ). @@ -937,7 +949,7 @@ Support: pax debbuild Support: PACKAGE - Specify a package that always is installed for package builds. + Specify a package that always is installed for package builds (see for package syntax and cancellation with !). Unlike Required:, a change in one of these packages does not trigger an automatic rebuild. @@ -981,7 +993,7 @@ Support: pax debbuild VMInstall: PACKAGE - Like Preinstall, but these packages get only + Like Preinstall (see ), but these packages get only installed when a virtual machine like Xen or KVM is used for building. Usually packages like mount are listed here.