Make sure we only get the newest package objects.
This commit is contained in:
parent
f188205cf9
commit
d52136a4c1
@ -53,7 +53,7 @@ class Gather(yum.YumBase):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
provides = self.whatProvides(r, f, v)
|
provides = self.whatProvides(r, f, v)
|
||||||
for provide in provides:
|
for provide in provides.returnNewestByNameArch():
|
||||||
if not pkgresults.has_key(provide):
|
if not pkgresults.has_key(provide):
|
||||||
pkgresults[provide] = None
|
pkgresults[provide] = None
|
||||||
|
|
||||||
@ -71,7 +71,9 @@ class Gather(yum.YumBase):
|
|||||||
|
|
||||||
for pkg in self.pkglist: # cycle through our package list and get repo matches
|
for pkg in self.pkglist: # cycle through our package list and get repo matches
|
||||||
matches = self.pkgSack.searchNevra(name=pkg)
|
matches = self.pkgSack.searchNevra(name=pkg)
|
||||||
for match in matches:
|
mysack = yum.packageSack.ListPackageSack(matches)
|
||||||
|
|
||||||
|
for match in mysack.returnNewestByNameArch():
|
||||||
unprocessed_pkgs[match] = None
|
unprocessed_pkgs[match] = None
|
||||||
|
|
||||||
if not self.config.has_option('default', 'quiet'):
|
if not self.config.has_option('default', 'quiet'):
|
||||||
|
Loading…
Reference in New Issue
Block a user