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

This reverts commit bc18a1d4f3.

Reverting because yum api reverted back to the way it was.
This commit is contained in:
Jesse Keating 2008-09-11 13:32:01 -07:00
parent a82d29ccaa
commit 08fc496a36

View File

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