richardphibel / rpms / dnf

Forked from rpms/dnf 2 years ago
Clone

Blame SOURCES/0003-Enhance-repo-variables-documentation-RhBug-1848161-1848615.patch

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