dcavalca / rpms / dnf

Forked from rpms/dnf 2 years ago
Clone

Blame SOURCES/0021-Fix-remove-when-no-repos-are-enabled-RhBz-2064341.patch

52b19a
From 55f6691d5663c59b675064b04e19288365e92d24 Mon Sep 17 00:00:00 2001
52b19a
From: Nicola Sella <nsella@redhat.com>
52b19a
Date: Tue, 15 Mar 2022 16:26:10 +0100
52b19a
Subject: [PATCH] Fix remove when no repos are enabled (RhBz:2064341)
52b19a
52b19a
msg: When no repositories are enabled, dnf group exits and does not
52b19a
remove an installed group.
52b19a
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2064341
52b19a
type: bugfix
52b19a
---
52b19a
 dnf/cli/commands/group.py | 3 ++-
52b19a
 1 file changed, 2 insertions(+), 1 deletion(-)
52b19a
52b19a
diff --git a/dnf/cli/commands/group.py b/dnf/cli/commands/group.py
52b19a
index fd723c48..c5c23230 100644
52b19a
--- a/dnf/cli/commands/group.py
52b19a
+++ b/dnf/cli/commands/group.py
52b19a
@@ -358,7 +358,8 @@ class GroupCommand(commands.Command):
52b19a
         else:
52b19a
             demands.available_repos = True
52b19a
 
52b19a
-        commands._checkEnabledRepo(self.base)
52b19a
+        if cmd not in ('remove'):
52b19a
+            commands._checkEnabledRepo(self.base)
52b19a
 
52b19a
         if cmd in ('install', 'upgrade'):
52b19a
             commands._checkGPGKey(self.base, self.cli)
52b19a
-- 
52b19a
2.35.1
52b19a