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

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