|
|
8c93e6 |
From f89ac56ef0ee7a349e0389913a510ba194022e95 Mon Sep 17 00:00:00 2001
|
|
|
8c93e6 |
From: Pavla Kratochvilova <pkratoch@redhat.com>
|
|
|
8c93e6 |
Date: Thu, 23 May 2019 14:32:32 +0200
|
|
|
8c93e6 |
Subject: [PATCH 1/2] Print the whole alias definition in case of infinite
|
|
|
8c93e6 |
recursion (RhBug:1680488)
|
|
|
8c93e6 |
|
|
|
8c93e6 |
https://bugzilla.redhat.com/show_bug.cgi?id=1680488
|
|
|
8c93e6 |
---
|
|
|
8c93e6 |
dnf/cli/commands/alias.py | 3 ++-
|
|
|
8c93e6 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
8c93e6 |
|
|
|
8c93e6 |
diff --git a/dnf/cli/commands/alias.py b/dnf/cli/commands/alias.py
|
|
|
8c93e6 |
index 10f58867ca..d3e6e4326e 100644
|
|
|
8c93e6 |
--- a/dnf/cli/commands/alias.py
|
|
|
8c93e6 |
+++ b/dnf/cli/commands/alias.py
|
|
|
8c93e6 |
@@ -151,7 +151,8 @@ def list_alias(self, cmd):
|
|
|
8c93e6 |
try:
|
|
|
8c93e6 |
args = self.aliases_base._resolve(args)
|
|
|
8c93e6 |
except dnf.exceptions.Error as e:
|
|
|
8c93e6 |
- logger.error(_('%s, alias %s'), e, cmd)
|
|
|
8c93e6 |
+ logger.error(
|
|
|
8c93e6 |
+ _('%s, alias %s="%s"'), e, cmd, (' ').join(self.aliases_base.aliases[cmd]))
|
|
|
8c93e6 |
else:
|
|
|
8c93e6 |
print(_("Alias %s='%s'") % (cmd, " ".join(args)))
|
|
|
8c93e6 |
|
|
|
8c93e6 |
|
|
|
8c93e6 |
From ccd4213da366d49f6f84847fa2ccdb890d257930 Mon Sep 17 00:00:00 2001
|
|
|
8c93e6 |
From: Pavla Kratochvilova <pkratoch@redhat.com>
|
|
|
8c93e6 |
Date: Thu, 23 May 2019 14:39:19 +0200
|
|
|
8c93e6 |
Subject: [PATCH 2/2] [doc] Document aliases behavior in case of infinite
|
|
|
8c93e6 |
recursion (RhBug:1680488)
|
|
|
8c93e6 |
|
|
|
8c93e6 |
https://bugzilla.redhat.com/show_bug.cgi?id=1680488
|
|
|
8c93e6 |
---
|
|
|
8c93e6 |
doc/command_ref.rst | 2 ++
|
|
|
8c93e6 |
1 file changed, 2 insertions(+)
|
|
|
8c93e6 |
|
|
|
8c93e6 |
diff --git a/doc/command_ref.rst b/doc/command_ref.rst
|
|
|
8c93e6 |
index ba22453055..ab72b66f8f 100644
|
|
|
8c93e6 |
--- a/doc/command_ref.rst
|
|
|
8c93e6 |
+++ b/doc/command_ref.rst
|
|
|
8c93e6 |
@@ -423,6 +423,8 @@ To use an alias (name=value), the name must be placed as the first "command" (e.
|
|
|
8c93e6 |
that is not an option). It is then replaced by its value and the resulting sequence is again searched
|
|
|
8c93e6 |
for aliases. The alias processing stops when the first found command is not a name of any alias.
|
|
|
8c93e6 |
|
|
|
8c93e6 |
+In case the processing would result in an infinite recursion, the original arguments are used instead.
|
|
|
8c93e6 |
+
|
|
|
8c93e6 |
Also, like in shell aliases, if the result starts with a ``\``, the alias processing will stop.
|
|
|
8c93e6 |
|
|
|
8c93e6 |
All aliases are defined in configuration files in the ``/etc/dnf/aliases.d/`` directory in the [aliases] section,
|