Use a dict to return unique requires, not a list with possible dupes
This commit is contained in:
parent
dba79b9c0f
commit
88c82fcb4d
@ -40,16 +40,19 @@ class Gather(yum.YumBase):
|
|||||||
self.logger.info('Checking deps of %s.%s' % (po.name, po.arch))
|
self.logger.info('Checking deps of %s.%s' % (po.name, po.arch))
|
||||||
|
|
||||||
reqs = po.requires;
|
reqs = po.requires;
|
||||||
pkgresults = []
|
pkgresults = {}
|
||||||
|
|
||||||
for req in reqs:
|
for req in reqs:
|
||||||
(r,f,v) = req
|
(r,f,v) = req
|
||||||
if r.startswith('rpmlib('):
|
if r.startswith('rpmlib('):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
pkgresults.extend(self.whatProvides(r, f, v))
|
provides = self.whatProvides(r, f, v)
|
||||||
|
for provide in provides:
|
||||||
|
if not pkgresults.has_key(provide):
|
||||||
|
pkgresults[provide] = None
|
||||||
|
|
||||||
return pkgresults
|
return pkgresults.keys()
|
||||||
|
|
||||||
def getPackageObjects(self):
|
def getPackageObjects(self):
|
||||||
"""Cycle through the list of packages, get package object
|
"""Cycle through the list of packages, get package object
|
||||||
|
Loading…
Reference in New Issue
Block a user