Correct typo and use os.path.join() in instroot.py.
It's packages_files, not packages_file.
This commit is contained in:
parent
1ad8929ba8
commit
725305dd9c
@ -58,17 +58,17 @@ def createInstRoot(yumconf=None, arch=None, treedir=None, updates=None):
|
|||||||
libdir = 'lib'
|
libdir = 'lib'
|
||||||
|
|
||||||
# the directory where the instroot will be created
|
# the directory where the instroot will be created
|
||||||
destdir = treedir + '/install'
|
destdir = os.path.join(treedir, 'install')
|
||||||
os.makedirs(destdir)
|
os.makedirs(destdir)
|
||||||
|
|
||||||
# build a list of packages to install
|
# build a list of packages to install
|
||||||
packages = set()
|
packages = set()
|
||||||
|
|
||||||
packages_files = []
|
packages_files = []
|
||||||
packages_files.append(pylorax.conf['confdir'] + '/packages')
|
packages_files.append(os.path.join(pylorax.conf['confdir'], 'packages'))
|
||||||
packages_files.append(pylorax.conf['confdir'] + '/' + arch + '/packages')
|
packages_files.append(os.path.join(pylorax.conf['confdir'], arch, 'packages'))
|
||||||
|
|
||||||
for pfile in packages_file:
|
for pfile in packages_files:
|
||||||
if os.path.isfile(pfile):
|
if os.path.isfile(pfile):
|
||||||
f = open(pfile, 'r')
|
f = open(pfile, 'r')
|
||||||
for line in f.readlines():
|
for line in f.readlines():
|
||||||
|
Loading…
Reference in New Issue
Block a user