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

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