Move the yum object initialization to it's own function.
This is necessary so that we can get a pypungi object without having to init the repositories.
This commit is contained in:
parent
bdaf3a662a
commit
e9e0a1880c
@ -82,6 +82,8 @@ def main():
|
||||
mypungi = pypungi.Pungi(config, ksparser)
|
||||
|
||||
if not opts.sourceisos:
|
||||
if opts.do_all or opts.do_gather or opts.do_buildinstall:
|
||||
mypungi._inityum() # initialize the yum object for things that need it
|
||||
if opts.do_all or opts.do_gather:
|
||||
mypungi.getPackageObjects()
|
||||
mypungi.downloadPackages()
|
||||
|
@ -129,10 +129,13 @@ class Pungi(pypungi.PungiBase):
|
||||
self.srpmlist = []
|
||||
self.debuginfolist = []
|
||||
self.resolved_deps = {} # list the deps we've already resolved, short circuit.
|
||||
self.repos = []
|
||||
self.mirrorlists = []
|
||||
|
||||
def _inityum(self):
|
||||
"""Initialize the yum object. Only needed for certain actions."""
|
||||
|
||||
# Create a yum object to use
|
||||
self.repos = []
|
||||
self.mirrorlists = []
|
||||
self.ayum = PungiYum(config)
|
||||
self.ayum.doLoggingSetup(6, 6)
|
||||
yumconf = yum.config.YumConf()
|
||||
|
Loading…
Reference in New Issue
Block a user