diff --git a/Changelog b/Changelog index 6bb0fde1..3b6e1d43 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,10 @@ +* Thu Feb 08 2007 Jesse Keating +- Add support for globbing in manifest + * Tue Feb 06 2007 Jesse Keating - yum bestPackagesFromList takes an arch argument. Fixes ppc64 bug - Don't use 'returnSimple' anymore, deprecated in yum api +- Speed up depsolving a bit by tracking solved deps * Sat Feb 03 2007 Jesse Keating - Be able to opt-out of a bugurl since buildinstall supports this diff --git a/pypungi/gather.py b/pypungi/gather.py index bd5ef279..2d1c0dce 100755 --- a/pypungi/gather.py +++ b/pypungi/gather.py @@ -112,18 +112,23 @@ class Gather(yum.YumBase): unprocessed_pkgs = {} # list of packages yet to depsolve ## Use dicts for speed final_pkgobjs = {} # The final list of package objects - for pkg in self.pkglist: # cycle through our package list and get repo matches - matches = self.pkgSack.searchNevra(name=pkg) - mysack = yum.packageSack.ListPackageSack(matches) - - for match in mysack.returnNewestByNameArch(): - unprocessed_pkgs[match] = None - self.tsInfo.addInstall(match) + # Search repos for things in our manifest, supports globs + (exactmatched, matched, unmatched) = yum.packages.parsePackages(self.pkgSack.returnPackages(), self.pkglist, casematch=1) + matches = exactmatched + matched + + # Get the newest results from the search + mysack = yum.packageSack.ListPackageSack(matches) + for match in mysack.returnNewestByNameArch(): + 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 len(unprocessed_pkgs) == 0: raise yum.Errors.MiscError, 'No packages found to download.'