dnf/SOURCES/0003-Enhance-repo-variables...

42 lines
1.4 KiB
Diff

From 03eac4f0b87bb9393e1662af76c433c996c702ab Mon Sep 17 00:00:00 2001
From: Marek Blaha <mblaha@redhat.com>
Date: Tue, 14 Jul 2020 08:37:28 +0200
Subject: [PATCH] [doc] Enhance repo variables documentation
(RhBug:1848161,1848615)
- clarify DNF_VAR_XXX variables usage
- mention numeric variables
https://bugzilla.redhat.com/show_bug.cgi?id=1848615
https://bugzilla.redhat.com/show_bug.cgi?id=1848161
---
doc/conf_ref.rst | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/doc/conf_ref.rst b/doc/conf_ref.rst
index fdb44a657d..a0362d0779 100644
--- a/doc/conf_ref.rst
+++ b/doc/conf_ref.rst
@@ -629,6 +629,21 @@ In addition to these hard coded variables, user-defined ones can also be used. T
$ DNF_VAR_MY_VARIABLE=value
+To use such variable in your repository configuration remove the prefix. E.g.::
+
+ [myrepo]
+ baseurl=https://example.site/pub/fedora/$MY_VARIABLE/releases/$releasever
+
+Note that it is not possible to override the ``arch`` and ``basearch`` variables using either variable files or environmental variables.
+
+Although users are encouraged to use named variables, the numbered environmental variables ``DNF0`` - ``DNF9`` are still supported::
+
+ $ DNF1=value
+
+ [myrepo]
+ baseurl=https://example.site/pub/fedora/$DNF1/releases/$releasever
+
+
.. _conf_main_and_repo_options-label:
==================================