Only init yum if we haven't already
And fix where the import goes
This commit is contained in:
parent
e3a59fe484
commit
0c8b9d268e
@ -24,6 +24,7 @@ import urlgrabber.progress
|
|||||||
import subprocess
|
import subprocess
|
||||||
import createrepo
|
import createrepo
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
|
import pylorax
|
||||||
|
|
||||||
class MyConfigParser(ConfigParser.ConfigParser):
|
class MyConfigParser(ConfigParser.ConfigParser):
|
||||||
"""A subclass of ConfigParser which does not lowercase options"""
|
"""A subclass of ConfigParser which does not lowercase options"""
|
||||||
@ -816,8 +817,8 @@ class Pungi(pypungi.PungiBase):
|
|||||||
def doBuildinstall(self):
|
def doBuildinstall(self):
|
||||||
"""Run lorax on the tree."""
|
"""Run lorax on the tree."""
|
||||||
|
|
||||||
self._inityum()
|
if not self.ayum:
|
||||||
yb = self.ayum
|
self._inityum()
|
||||||
|
|
||||||
# Add the repo in the destdir to our yum object
|
# Add the repo in the destdir to our yum object
|
||||||
self._add_yum_repo('ourtree',
|
self._add_yum_repo('ourtree',
|
||||||
@ -835,12 +836,11 @@ class Pungi(pypungi.PungiBase):
|
|||||||
outputdir = self.topdir
|
outputdir = self.topdir
|
||||||
|
|
||||||
# run the command
|
# run the command
|
||||||
import pylorax
|
|
||||||
lorax = pylorax.Lorax()
|
lorax = pylorax.Lorax()
|
||||||
lorax.configure()
|
lorax.configure()
|
||||||
|
|
||||||
# FIXME get the actual is_beta value
|
# FIXME get the actual is_beta value
|
||||||
lorax.run(yb, product=product, version=version, release=release,
|
lorax.run(self.ayum, product=product, version=version, release=release,
|
||||||
variant=variant, bugurl=bugurl, is_beta=True,
|
variant=variant, bugurl=bugurl, is_beta=True,
|
||||||
workdir=workdir, outputdir=outputdir)
|
workdir=workdir, outputdir=outputdir)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user