Move conf hash inside Lorax and import InstRoot.
This commit is contained in:
parent
206fee2e70
commit
3bd5fd4d93
@ -22,8 +22,6 @@
|
|||||||
|
|
||||||
version = (0, 1)
|
version = (0, 1)
|
||||||
|
|
||||||
__all__ = ['discinfo', 'treeinfo', 'instroot']
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
@ -33,15 +31,16 @@ import rpmUtils
|
|||||||
|
|
||||||
import discinfo
|
import discinfo
|
||||||
import treeinfo
|
import treeinfo
|
||||||
import instroot
|
|
||||||
|
|
||||||
conf = {}
|
from instroot import InstRoot
|
||||||
conf['confdir'] = '/etc/lorax'
|
|
||||||
conf['tmpdir'] = tempfile.gettempdir()
|
|
||||||
conf['datadir'] = '/usr/share/lorax'
|
|
||||||
|
|
||||||
class Lorax:
|
class Lorax:
|
||||||
def __init__(self, repos=[], output=None, mirrorlist=[], updates=None):
|
def __init__(self, repos=[], output=None, mirrorlist=[], updates=None):
|
||||||
|
self.conf = {}
|
||||||
|
self.conf['confdir'] = '/etc/lorax'
|
||||||
|
self.conf['tmpdir'] = tempfile.gettempdir()
|
||||||
|
self.conf['datadir'] = '/usr/share/lorax'
|
||||||
|
|
||||||
print("\n+=======================================================+")
|
print("\n+=======================================================+")
|
||||||
print("| Setting up work directories and configuration data... |")
|
print("| Setting up work directories and configuration data... |")
|
||||||
print("+=======================================================+\n")
|
print("+=======================================================+\n")
|
||||||
@ -70,7 +69,7 @@ class Lorax:
|
|||||||
print("| Creating instroot tree to build images from... |")
|
print("| Creating instroot tree to build images from... |")
|
||||||
print("+================================================+\n")
|
print("+================================================+\n")
|
||||||
|
|
||||||
self.instroot = pylorax.instroot.InstRoot(yumconf=self.yumconf, arch=self.buildarch, treedir=self.treedir, updates=self.updates)
|
self.instroot = InstRoot(conf=self.conf, yumconf=self.yumconf, arch=self.buildarch, treedir=self.treedir, updates=self.updates)
|
||||||
|
|
||||||
def showVersion(self, driver=None):
|
def showVersion(self, driver=None):
|
||||||
"""showVersion(driver)
|
"""showVersion(driver)
|
||||||
@ -117,6 +116,7 @@ class Lorax:
|
|||||||
uname_arch = os.uname()[4]
|
uname_arch = os.uname()[4]
|
||||||
|
|
||||||
if self.yumconf == '' or self.yumconf is None or not os.path.isfile(self.yumconf):
|
if self.yumconf == '' or self.yumconf is None or not os.path.isfile(self.yumconf):
|
||||||
|
print "RETURN HERE"
|
||||||
return uname_arch
|
return uname_arch
|
||||||
|
|
||||||
repoq = yum.YumBase()
|
repoq = yum.YumBase()
|
||||||
|
Loading…
Reference in New Issue
Block a user