From 91f70cbb43e1a9c63a5b237b35a078f658646267 Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Tue, 13 Nov 2012 07:25:57 -0500 Subject: [PATCH] Handle a special case, when system-release virtual provide is specified in the greedy mode. --- src/pypungi/__init__.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pypungi/__init__.py b/src/pypungi/__init__.py index 260884b9..55b1635b 100644 --- a/src/pypungi/__init__.py +++ b/src/pypungi/__init__.py @@ -579,8 +579,14 @@ class Pungi(pypungi.PungiBase): name = name[:-2] multilib = True - exactmatched, matched, unmatched = yum.packages.parsePackages(self.pkgs, [name], casematch=1, pkgdict=self.pkg_refs.copy()) - matches = filter(self._filtersrcdebug, exactmatched + matched) + if self.greedy and name == "system-release": + # HACK: handles a special case, when system-release virtual provide is specified in the greedy mode + matches = self.ayum.whatProvides(name, None, None).returnPackages() + else: + exactmatched, matched, unmatched = yum.packages.parsePackages(self.pkgs, [name], casematch=1, pkgdict=self.pkg_refs.copy()) + matches = exactmatched + matched + + matches = filter(self._filtersrcdebug, matches) if multilib and not self.greedy: matches = [ po for po in matches if po.arch in self.valid_multilib_arches ]