From 23e40be9eecd5e5abed249de6f73ca32f9950e4c Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Thu, 15 Mar 2007 14:25:24 -0400 Subject: [PATCH] - Work around false positive 'unmatched' packages (globs are fun) --- Changelog | 1 + pypungi/gather.py | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Changelog b/Changelog index 8bac0f18..1ea05593 100644 --- a/Changelog +++ b/Changelog @@ -4,6 +4,7 @@ - Do excludes before group handling. - Get all potential matches for deps, let install time figure the best one to use. +- Work around false positive 'unmatched' packages (globs are fun) * Tue Mar 14 2007 Jesse Keating - Do things faster/smarter if we've only asked for one disc diff --git a/pypungi/gather.py b/pypungi/gather.py index a8b64287..50c88818 100755 --- a/pypungi/gather.py +++ b/pypungi/gather.py @@ -216,19 +216,19 @@ class Gather(yum.YumBase): (exactmatched, matched, unmatched) = yum.packages.parsePackages(self.pkgSack.returnPackages(), searchlist, casematch=1) matches = exactmatched + matched - # Get the newest results from the search, if not "excluded" (catches things added by globs) + # Get the newest results from the search mysack = yum.packageSack.ListPackageSack(matches) for match in mysack.returnNewestByNameArch(): - if not match.name in excludelist: - unprocessed_pkgs[match] = None - self.tsInfo.addInstall(match) + unprocessed_pkgs[match] = None + self.tsInfo.addInstall(match) if not self.config.has_option('default', 'quiet'): for pkg in unprocessed_pkgs.keys(): self.logger.info('Found %s.%s' % (pkg.name, pkg.arch)) for pkg in unmatched: - self.logger.warn('Could not find a match for %s' % pkg) + if not pkg in matches: + self.logger.warn('Could not find a match for %s' % pkg) if len(unprocessed_pkgs) == 0: raise yum.Errors.MiscError, 'No packages found to download.'