Syntax fixes.
This commit is contained in:
parent
57c51abe99
commit
7c6562f972
4
lorax
4
lorax
@ -113,13 +113,13 @@ if __name__ == "__main__":
|
||||
|
||||
# write .treeinfo file
|
||||
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
|
||||
|
||||
# write .discinfo file
|
||||
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
|
||||
trash = [yumconf, treedir, buildinstdir]
|
||||
|
@ -85,7 +85,7 @@ def initializeDirs(output):
|
||||
tmpdir = tempfile.gettempdir()
|
||||
buildinstdir = tempfile.mkdtemp('XXXXXX', 'buildinstall.tree.', tmpdir)
|
||||
treedir = tempfile.mkdtemp('XXXXXX', 'treedir.', tmpdir)
|
||||
cachedir = tempfile.mkdtemp('XXXXXX', 'yumcache.' tmpdir)
|
||||
cachedir = tempfile.mkdtemp('XXXXXX', 'yumcache.', tmpdir)
|
||||
|
||||
return buildinstdir, treedir, cachedir
|
||||
|
||||
@ -123,8 +123,8 @@ def writeYumConf(cachedir=None, repo=None, extrarepos=[], mirrorlist=[]):
|
||||
if extrarepos != []:
|
||||
n = 1
|
||||
for extra in extrarepos:
|
||||
f.write("[anaconda-extrarepo-%d]\n" % (n,)
|
||||
f.write("name=anaconda extra repo %d\n" % (n,)
|
||||
f.write("[anaconda-extrarepo-%d]\n" % (n,))
|
||||
f.write("name=anaconda extra repo %d\n" % (n,))
|
||||
f.write("baseurl=%s\n" % (extra,))
|
||||
f.write("enabled=1\n")
|
||||
n += 1
|
||||
@ -132,8 +132,8 @@ def writeYumConf(cachedir=None, repo=None, extrarepos=[], mirrorlist=[]):
|
||||
if mirrorlist != []:
|
||||
n = 1
|
||||
for mirror in mirrorlist:
|
||||
f.write("[anaconda-mirrorlistrepo-%d]\n" % (n,)
|
||||
f.write("name=anaconda mirrorlist repo %d\n" % (n,)
|
||||
f.write("[anaconda-mirrorlistrepo-%d]\n" % (n,))
|
||||
f.write("name=anaconda mirrorlist repo %d\n" % (n,))
|
||||
f.write("mirrorlist=%s\n" % (extra,))
|
||||
f.write("enabled=1\n")
|
||||
n += 1
|
||||
@ -141,7 +141,7 @@ def writeYumConf(cachedir=None, repo=None, extrarepos=[], mirrorlist=[]):
|
||||
f.close()
|
||||
return yumconf
|
||||
|
||||
def cleanup(trash=[])
|
||||
def cleanup(trash=[]):
|
||||
"""cleanup(trash)
|
||||
|
||||
Given a list of things to remove, cleanup() will remove them if it can.
|
||||
|
Loading…
Reference in New Issue
Block a user