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

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