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:
parent
6fc3d4ff79
commit
bc18a1d4f3
@ -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.searchNevra(name=condreq)
|
pkgs = self.ayum.pkgSack.searchNames(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(pkgs)
|
self.ayum.tsInfo.conditionals[cond].extend([pkg.name for pkg in pkgs])
|
||||||
else:
|
else:
|
||||||
self.ayum.tsInfo.conditionals[cond] = pkgs
|
self.ayum.tsInfo.conditionals[cond] = [pkg.name for pkg in pkgs]
|
||||||
|
|
||||||
return packages
|
return packages
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user