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

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