Blame SOURCES/0001-groups-manager-More-benevolent-resolving-of-packages-RhBug2013633.patch

74214d
From 24668777a7624a8ee3c6f53aff8f4d6675019d23 Mon Sep 17 00:00:00 2001
74214d
From: Marek Blaha <mblaha@redhat.com>
74214d
Date: Mon, 8 Nov 2021 16:51:56 +0100
74214d
Subject: [PATCH] groups-manager: More benevolent resolving of packages (RhBug:2013633)
74214d
74214d
= changelog =
74214d
msg: groups-manager uses for matching packages full NEVRA and not only name.
74214d
type: enhancement
74214d
resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2013633
74214d
---
74214d
 plugins/groups_manager.py | 4 +++-
74214d
 1 file changed, 3 insertions(+), 1 deletion(-)
74214d
74214d
diff --git a/plugins/groups_manager.py b/plugins/groups_manager.py
74214d
index 382df37..12da183 100644
74214d
--- a/plugins/groups_manager.py
74214d
+++ b/plugins/groups_manager.py
74214d
@@ -254,7 +254,9 @@ class GroupsManagerCommand(dnf.cli.Command):
74214d
             # find packages according to specifications from command line
74214d
             packages = set()
74214d
             for pkg_spec in self.opts.packages:
74214d
-                q = self.base.sack.query().filterm(name__glob=pkg_spec).latest()
74214d
+                subj = dnf.subject.Subject(pkg_spec)
74214d
+                q = subj.get_best_query(self.base.sack, with_nevra=True,
74214d
+                                        with_provides=False, with_filenames=False).latest()
74214d
                 if not q:
74214d
                     logger.warning(_("No match for argument: {}").format(pkg_spec))
74214d
                     continue
74214d
--
74214d
libgit2 1.1.0
74214d