Yum api changed with regard to adding conditionals. Need to pass in just a name

rather than a package object.  Also call searchName since that's all we care about.
This commit is contained in:
Jesse Keating 2008-08-11 22:47:39 -04:00
parent 6fc3d4ff79
commit bc18a1d4f3

View File

@ -298,13 +298,13 @@ class Pungi(pypungi.PungiBase):
# of the package objects it would bring in. To be used later if
# we match the conditional.
for condreq, cond in groupobj.conditional_packages.iteritems():
pkgs = self.ayum.pkgSack.searchNevra(name=condreq)
pkgs = self.ayum.pkgSack.searchNames(name=condreq)
if pkgs:
pkgs = self.ayum.bestPackagesFromList(pkgs, arch=self.ayum.compatarch)
if self.ayum.tsInfo.conditionals.has_key(cond):
self.ayum.tsInfo.conditionals[cond].extend(pkgs)
self.ayum.tsInfo.conditionals[cond].extend([pkg.name for pkg in pkgs])
else:
self.ayum.tsInfo.conditionals[cond] = pkgs
self.ayum.tsInfo.conditionals[cond] = [pkg.name for pkg in pkgs]
return packages