Syntax fixes.

This commit is contained in:
David Cantrell 2008-09-12 16:15:10 -10:00
parent 57c51abe99
commit 7c6562f972
2 changed files with 9 additions and 9 deletions

4
lorax
View File

@ -113,13 +113,13 @@ if __name__ == "__main__":
# write .treeinfo file # write .treeinfo file
if not pylorax.treeinfo.write(family=product, variant=variant, version=version, arch=buildarch, outdir=output): if not pylorax.treeinfo.write(family=product, variant=variant, version=version, arch=buildarch, outdir=output):
sys.stderr.write("Error writing %s/.treeinfo file.\n" % (output,) sys.stderr.write("Error writing %s/.treeinfo file.\n" % (output,))
# mk-images # mk-images
# write .discinfo file # write .discinfo file
if not pylorax.discinfo.write(release=release, arch=buildarch, outdir=output): if not pylorax.discinfo.write(release=release, arch=buildarch, outdir=output):
sys.stderr.write("Error writing %s/.discinfo file.\n" % (output,) sys.stderr.write("Error writing %s/.discinfo file.\n" % (output,))
# clean up # clean up
trash = [yumconf, treedir, buildinstdir] trash = [yumconf, treedir, buildinstdir]

View File

@ -85,7 +85,7 @@ def initializeDirs(output):
tmpdir = tempfile.gettempdir() tmpdir = tempfile.gettempdir()
buildinstdir = tempfile.mkdtemp('XXXXXX', 'buildinstall.tree.', tmpdir) buildinstdir = tempfile.mkdtemp('XXXXXX', 'buildinstall.tree.', tmpdir)
treedir = tempfile.mkdtemp('XXXXXX', 'treedir.', tmpdir) treedir = tempfile.mkdtemp('XXXXXX', 'treedir.', tmpdir)
cachedir = tempfile.mkdtemp('XXXXXX', 'yumcache.' tmpdir) cachedir = tempfile.mkdtemp('XXXXXX', 'yumcache.', tmpdir)
return buildinstdir, treedir, cachedir return buildinstdir, treedir, cachedir
@ -123,8 +123,8 @@ def writeYumConf(cachedir=None, repo=None, extrarepos=[], mirrorlist=[]):
if extrarepos != []: if extrarepos != []:
n = 1 n = 1
for extra in extrarepos: for extra in extrarepos:
f.write("[anaconda-extrarepo-%d]\n" % (n,) f.write("[anaconda-extrarepo-%d]\n" % (n,))
f.write("name=anaconda extra repo %d\n" % (n,) f.write("name=anaconda extra repo %d\n" % (n,))
f.write("baseurl=%s\n" % (extra,)) f.write("baseurl=%s\n" % (extra,))
f.write("enabled=1\n") f.write("enabled=1\n")
n += 1 n += 1
@ -132,8 +132,8 @@ def writeYumConf(cachedir=None, repo=None, extrarepos=[], mirrorlist=[]):
if mirrorlist != []: if mirrorlist != []:
n = 1 n = 1
for mirror in mirrorlist: for mirror in mirrorlist:
f.write("[anaconda-mirrorlistrepo-%d]\n" % (n,) f.write("[anaconda-mirrorlistrepo-%d]\n" % (n,))
f.write("name=anaconda mirrorlist repo %d\n" % (n,) f.write("name=anaconda mirrorlist repo %d\n" % (n,))
f.write("mirrorlist=%s\n" % (extra,)) f.write("mirrorlist=%s\n" % (extra,))
f.write("enabled=1\n") f.write("enabled=1\n")
n += 1 n += 1
@ -141,7 +141,7 @@ def writeYumConf(cachedir=None, repo=None, extrarepos=[], mirrorlist=[]):
f.close() f.close()
return yumconf return yumconf
def cleanup(trash=[]) def cleanup(trash=[]):
"""cleanup(trash) """cleanup(trash)
Given a list of things to remove, cleanup() will remove them if it can. Given a list of things to remove, cleanup() will remove them if it can.