Correct typo and use os.path.join() in instroot.py.

It's packages_files, not packages_file.
This commit is contained in:
David Cantrell 2008-10-04 20:34:37 -10:00
parent 1ad8929ba8
commit 725305dd9c
1 changed files with 4 additions and 4 deletions

View File

@ -58,17 +58,17 @@ def createInstRoot(yumconf=None, arch=None, treedir=None, updates=None):
libdir = 'lib'
# the directory where the instroot will be created
destdir = treedir + '/install'
destdir = os.path.join(treedir, 'install')
os.makedirs(destdir)
# build a list of packages to install
packages = set()
packages_files = []
packages_files.append(pylorax.conf['confdir'] + '/packages')
packages_files.append(pylorax.conf['confdir'] + '/' + arch + '/packages')
packages_files.append(os.path.join(pylorax.conf['confdir'], '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):
f = open(pfile, 'r')
for line in f.readlines():