summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Robbins <drobbins@gentoo.org>2004-02-12 19:51:37 +0000
committerDaniel Robbins <drobbins@gentoo.org>2004-02-12 19:51:37 +0000
commitf092c3dc3c1b4a400e3d69fd7656274e8d6a1cb8 (patch)
treeaf14ebf73b601708d6857ee658df60bebbdd7910
parentadd qmail to the fray (diff)
downloadgentoo-f092c3dc3c1b4a400e3d69fd7656274e8d6a1cb8.tar.gz
gentoo-f092c3dc3c1b4a400e3d69fd7656274e8d6a1cb8.tar.bz2
gentoo-f092c3dc3c1b4a400e3d69fd7656274e8d6a1cb8.zip
missing "/" and new clst_conf support
-rw-r--r--src/catalyst/catalyst15
-rw-r--r--src/catalyst/modules/catalyst_support.py4
-rw-r--r--src/catalyst/modules/targets.py4
3 files changed, 16 insertions, 7 deletions
diff --git a/src/catalyst/catalyst b/src/catalyst/catalyst
index 6482b3c952..dc18ef041f 100644
--- a/src/catalyst/catalyst
+++ b/src/catalyst/catalyst
@@ -1,7 +1,7 @@
#!/usr/bin/python
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/Attic/catalyst,v 1.28 2004/02/11 03:31:55 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/Attic/catalyst,v 1.29 2004/02/12 19:51:37 drobbins Exp $
import os,sys,imp,string
@@ -32,11 +32,18 @@ if os.getuid()!=0:
myspec={}
myconf={}
-if os.path.exists("/etc/catalyst.conf"):
+myconffile="/etc/catalyst.conf"
+if os.environ.has_key("clst_conf"):
+ if not os.path.exists(os.environ["clst_conf"]):
+ print "catalyst: Unable to find config file specified in env var 'clst_conf'"
+ sys.exit(1)
+ myconffile=os.environ["clst_conf"]
+
+if os.path.exists(myconffile):
try:
- execfile("/etc/catalyst.conf",myconf,myconf)
+ execfile(myconffile,myconf,myconf)
except:
- print "catalyst: Unable to parse /etc/catalyst.conf config file (syntax error)"
+ print "catalyst: Unable to parse "+myconffile+" config file (syntax error)"
sys.exit(1)
confdefaults={ "storedir":"/var/tmp/catalyst","sharedir":"/usr/share/catalyst","distdir":"/usr/portage/distfiles",
diff --git a/src/catalyst/modules/catalyst_support.py b/src/catalyst/modules/catalyst_support.py
index d4bdf2a4ca..e8eb4908a3 100644
--- a/src/catalyst/modules/catalyst_support.py
+++ b/src/catalyst/modules/catalyst_support.py
@@ -1,6 +1,6 @@
# Distributed under the GNU General Public License version 2
# Copyright 2003-2004 Gentoo Technologies, Inc.
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/Attic/catalyst_support.py,v 1.15 2004/02/11 03:31:55 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/Attic/catalyst_support.py,v 1.16 2004/02/12 19:51:37 drobbins Exp $
import sys,string,os,types
@@ -165,11 +165,13 @@ def ismount(path):
def arg_parse(mydict,remaining,argv):
"grab settings from argv, storing 'target' in mydict, and everything in remaining for later parsing"
global required_config_file_values
+ print "ARGV",argv
for x in argv:
foo=string.split(x,"=")
if len(foo)!=2:
raise CatalystError, "Invalid arg syntax: "+x
remaining[foo[0]]=foo[1]
+ print "X",x
if not remaining.has_key("target"):
raise CatalystError, "Required value \"target\" not specified."
mydict["target"]=remaining["target"]
diff --git a/src/catalyst/modules/targets.py b/src/catalyst/modules/targets.py
index ddd918e5b3..9ec3104f9f 100644
--- a/src/catalyst/modules/targets.py
+++ b/src/catalyst/modules/targets.py
@@ -1,6 +1,6 @@
# Distributed under the GNU General Public License version 2
# Copyright 2003-2004 Gentoo Technologies, Inc.
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/Attic/targets.py,v 1.85 2004/02/12 06:20:45 beejay Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/Attic/targets.py,v 1.86 2004/02/12 19:51:37 drobbins Exp $
import os,string,imp,types,shutil
from catalyst_support import *
@@ -545,7 +545,7 @@ class livecd_stage2_target(generic_stage_target):
if type(myex)==types.ListType:
myex=string.join(myex)
try:
- myf=open(self.settings["chroot_path"]+"/var/tmp"+kname+"."+extra,"w")
+ myf=open(self.settings["chroot_path"]+"/var/tmp/"+kname+"."+extra,"w")
except:
self.unbind()
raise CatalystError,"Couldn't create file /var/tmp/"+kname+"."+extra+" in chroot."