From 8045771627933b20323457cf30108ea417834cdc Mon Sep 17 00:00:00 2001 From: Evan Goode Date: Mon, 16 Oct 2023 18:27:02 +0000 Subject: [PATCH 03/11] Document $releasever_major and $releasever_minor =changelog= msg: Automatically derive $releasever_major and $releasever_minor from $releasever type: enhancement resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1789346 --- doc/conf_ref.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/conf_ref.rst b/doc/conf_ref.rst index 7ff286fee..9397f0008 100644 --- a/doc/conf_ref.rst +++ b/doc/conf_ref.rst @@ -488,6 +488,9 @@ configuration file by your distribution to override the DNF defaults. :ref:`string ` Used for substitution of ``$releasever`` in the repository configuration. + + The ``$releasever_major`` and ``$releasever_minor`` variables will be automatically derived from ``$releasever`` by splitting it on the first ``.``. For example, if ``$releasever`` is set to ``1.23``, then ``$releasever_major`` will be ``1`` and ``$releasever_minor`` will be ``23``. + See also :ref:`repo variables `. .. _reposdir-label: @@ -794,6 +797,18 @@ Right side of every repo option can be enriched by the following variables: Refers to the release version of operating system which DNF derives from information available in RPMDB. +.. _variable-releasever_major-label: + +``$releasever_major`` + + Major version of ``$releasever``, i.e. the component of ``$releasever`` occurring before the first ``.``. + +.. _variable-releasever_minor-label: + +``$releasever_minor`` + + Minor version of ``$releasever``, i.e. the component of ``$releasever`` occurring after the first ``.``. + .. _variable-user-defined-label: In addition to these hard coded variables, user-defined ones can also be used. They can be defined either via :ref:`variable files `, or by using special environmental variables. The names of these variables must be prefixed with DNF_VAR\_ and they can only consist of alphanumeric characters and underscores:: -- 2.49.0