Replace "import *" with named imports, remove unused imports.
Fix broken CatalystError usage.
-import os
from catalyst import builder
-from catalyst.support import *
+
class generic_alpha(builder.generic):
"abstract base class for all alpha builders"
-import os
from catalyst import builder
-from catalyst.support import *
class generic_arm(builder.generic):
"Abstract base class for all arm (little endian) builders"
-import os
-
from catalyst import builder
-from catalyst.support import *
class generic_hppa(builder.generic):
"Abstract base class for all hppa builders"
-import os
-
from catalyst import builder
-from catalyst.support import *
class arch_ia64(builder.generic):
"builder class for ia64"
-import os
-
from catalyst import builder
-from catalyst.support import *
class generic_mips(builder.generic):
"Abstract base class for all mips builders [Big-endian]"
import os
from catalyst import builder
-from catalyst.support import *
+from catalyst.support import CatalystError
class generic_ppc(builder.generic):
"abstract base class for all 32-bit powerpc builders"
self.settings["CHOST"]="powerpc-unknown-linux-gnu"
if self.settings["buildarch"]=="ppc64":
if not os.path.exists("/bin/linux32") and not os.path.exists("/usr/bin/linux32"):
- raise CatalystError,"required executable linux32 not found (\"emerge setarch\" to fix.)"
+ raise CatalystError("required executable linux32 not found "
+ "(\"emerge setarch\" to fix.)", print_traceback=True)
self.settings["CHROOT"]="linux32 chroot"
self.settings["crosscompile"] = False;
else:
-import os
-
from catalyst import builder
-from catalyst.support import *
class generic_s390(builder.generic):
"abstract base class for all s390 builders"
-import os
-
from catalyst import builder
-from catalyst.support import *
class generic_sh(builder.generic):
"Abstract base class for all sh builders [Little-endian]"
import os
from catalyst import builder
-from catalyst.support import *
+from catalyst.support import CatalystError
class generic_sparc(builder.generic):
"abstract base class for all sparc builders"
builder.generic.__init__(self,myspec)
if self.settings["buildarch"]=="sparc64":
if not os.path.exists("/bin/linux32") and not os.path.exists("/usr/bin/linux32"):
- raise CatalystError,"required executable linux32 not found (\"emerge setarch\" to fix.)"
+ raise CatalystError("required executable linux32 not found "
+ "(\"emerge setarch\" to fix.)", print_traceback=True)
self.settings["CHROOT"]="linux32 chroot"
self.settings["crosscompile"] = False;
else:
import os
from catalyst import builder
-from catalyst.support import *
+from catalyst.support import CatalystError
class generic_x86(builder.generic):
"abstract base class for all x86 builders"
builder.generic.__init__(self,myspec)
if self.settings["buildarch"]=="amd64":
if not os.path.exists("/bin/linux32") and not os.path.exists("/usr/bin/linux32"):
- raise CatalystError,"required executable linux32 not found (\"emerge setarch\" to fix.)"
+ raise CatalystError("required executable linux32 not found "
+ "(\"emerge setarch\" to fix.)", print_traceback=True)
self.settings["CHROOT"]="linux32 chroot"
self.settings["crosscompile"] = False;
else:
import re
-from catalyst.support import *
+from catalyst.support import CatalystError
class ParserBase:
try:
myf = open(filename, "r")
except:
- raise CatalystError, "Could not open file " + filename
+ raise CatalystError("Could not open file " + filename,
+ print_traceback=True)
self.lines = myf.readlines()
myf.close()
self.filename = filename
cur_array = []
trailing_comment=re.compile('\s*#.*$')
- white_space=re.compile('\s+')
+ #white_space=re.compile('\s+')
for x, myline in enumerate(self.lines):
myline = myline.strip()
# cur_array += mobjs
cur_array += myline.split()
else:
- raise CatalystError, "Syntax error: " + x
+ raise CatalystError("Syntax error: " + x, print_traceback=True)
# XXX: Do we really still need this "single value is a string" behavior?
if len(cur_array) == 2:
func = getattr(self, '_%s_' % self.contents_map[getter].func)
return func(file_, self.contents_map[getter].cmd, verbose)
except:
- raise CatalystError,\
- "Error generating contents, is appropriate utility " +\
- "(%s) installed on your system?" \
- % (self.contents_map[getter].cmd)
+ raise CatalystError(
+ "Error generating contents, is appropriate utility " +
+ "(%s) installed on your system?"
+ % (self.contents_map[getter].cmd), print_traceback=True)
@staticmethod
# these should never be touched
-required_build_targets = ["generic_target", "generic_stage_target"]
+required_build_targets = ["generic_stage_target"]
# new build types should be added here
valid_build_targets = ["stage1_target", "stage2_target", "stage3_target",
verbose
)
except:
- raise CatalystError,"Error generating hash, is appropriate " + \
- "utility installed on your system?"
+ raise CatalystError("Error generating hash, is appropriate " + \
+ "utility installed on your system?", traceback=True)
def calc_hash(self, file_, hash_, verbose=False):
mylines=mylines[0].split()
result=mylines[0]
if verbose:
- print _hash_.id + " (%s) = %s" % (file_, result)
+ print _hash.id + " (%s) = %s" % (file_, result)
return result
if self.myfd==None:
if not os.path.exists(os.path.dirname(self.lockdir)):
raise CatalystError("DirectoryNotFound: %s"
- % os.path.dirname(self.lockdir))
+ % os.path.dirname(self.lockdir), print_traceback=True)
if not os.path.exists(self.lockfile):
old_mask=os.umask(000)
self.myfd = os.open(self.lockfile, os.O_CREAT|os.O_RDWR,0660)
self.add_hardlock_file_to_cleanup()
if not os.path.exists(self.myhardlock):
raise CatalystError("FileNotFound: Created lockfile is missing: "
- "%(filename)s" % {"filename":self.myhardlock})
+ "%(filename)s" % {"filename":self.myhardlock},
+ print_traceback=True)
try:
os.link(self.myhardlock, self.lockfile)
except SystemExit:
import os
import sys
import imp
-import string
import getopt
-import pdb
import os.path
__selfpath__ = os.path.abspath(os.path.dirname(__file__))
fh.close()
except IOError:
- raise CatalystError, "Can't find " + x + ".py plugin in " + \
- module_dir
+ raise CatalystError("Can't find " + x + ".py plugin in " +
+ module_dir, print_traceback=True)
for x in valid_build_targets:
try:
fh = open(module_dir + x + ".py")
fh.close()
except IOError:
- raise CatalystError,"Can't find " + x + ".py plugin in " + \
- module_dir
+ raise CatalystError("Can't find " + x + ".py plugin in " +
+ module_dir, print_traceback=True)
except ImportError as e:
print "!!! catalyst: Python modules not found in "+\
def build_target(addlargs, targetmap):
try:
if addlargs["target"] not in targetmap:
- raise CatalystError,"Target \""+addlargs["target"]+"\" not available."
+ raise CatalystError(
+ "Target \"%s\" not available." % addlargs["target"],
+ print_traceback=True)
mytarget=targetmap[addlargs["target"]](conf_values, addlargs)
mytarget.run()
except:
- modules.catalyst.util.print_traceback()
- print "!!! catalyst: Error encountered during run of target " + addlargs["target"]
+ print "Python traceback output follows:"
+ catalyst.util.print_traceback()
+ print
+ print "!!! catalyst: Error encountered during run of target " + \
+ addlargs["target"]
sys.exit(1)
def main():
usage()
sys.exit(2)
- # defaults for commandline opts
- debug=False
- verbose=False
- fetch=False
myconfig=""
myspecfile=""
mycmdline=[]
- myopts=[]
# check preconditions
if len(opts) == 0:
sys.exit(1)
if "target" not in addlargs:
- raise CatalystError, "Required value \"target\" not specified."
+ raise CatalystError("Required value \"target\" not specified.")
# everything is setup, so the build is a go
try:
import sys,string,os,types,re,signal,traceback,time
#import md5,sha
-from catalyst.defaults import verbosity
+from catalyst.defaults import verbosity, valid_config_file_values
selinux_capable = False
#userpriv_capable = (os.getuid() == 0)
myf=open(file,"r")
except:
return -1
- #raise CatalystError, "Could not open file "+file
+ #raise CatalystError("Could not open file "+file)
for line in myf.readlines():
#line = string.replace(line, "\n", "") # drop newline
myline = myline + line
return mypack
class CatalystError(Exception):
- def __init__(self, message):
+ def __init__(self, message, print_traceback=False):
if message:
- (type,value)=sys.exc_info()[:2]
- if value!=None:
- print
- print traceback.print_exc(file=sys.stdout)
+ if print_traceback:
+ (type,value)=sys.exc_info()[:2]
+ if value!=None:
+ print
+ print "Traceback valuse found. listing..."
+ print traceback.print_exc(file=sys.stdout)
print
print "!!! catalyst: "+message
print
sys.stdout.flush()
retval=spawn_bash(mycmd,env)
if retval != 0:
- raise CatalystError,myexc
+ raise CatalystError("cmd() NON-zero return value from: %s" % myexc,
+ print_traceback=True)
except:
raise
pass
else:
if len(settings[myfile])==0:
- raise CatalystError, "File variable \""+myfile+"\" has a length of zero (not specified.)"
+ raise CatalystError("File variable \"" + myfile +
+ "\" has a length of zero (not specified.)", print_traceback=True)
if settings[myfile][0]=="/":
if not os.path.exists(settings[myfile]):
- raise CatalystError, "Cannot locate specified "+myfile+": "+settings[myfile]
+ raise CatalystError("Cannot locate specified " + myfile +
+ ": "+settings[myfile], print_traceback=True)
elif expand and os.path.exists(os.getcwd()+"/"+settings[myfile]):
settings[myfile]=os.getcwd()+"/"+settings[myfile]
else:
- raise CatalystError, "Cannot locate specified "+myfile+": "+settings[myfile]+" (2nd try)"
+ raise CatalystError("Cannot locate specified " + myfile +
+ ": "+settings[myfile]+" (2nd try)" +
"""
Spec file format:
defined are not preserved. In other words, "foo", "bar", "oni" ordering is preserved but "item1"
"item2" "item3" ordering is not, as the item strings are stored in a dictionary (hash).
"""
+, print_traceback=True)
def parse_makeconf(mylines):
mymakeconf={}
myf.close()
return parse_makeconf(mylines)
except:
- raise CatalystError, "Could not parse make.conf file "+mymakeconffile
+ raise CatalystError("Could not parse make.conf file " +
+ mymakeconffile, print_traceback=True)
else:
makeconf={}
return makeconf
messages.append("Required argument \""+x+"\" not specified.")
if messages:
- raise CatalystError, '\n\tAlso: '.join(messages)
+ raise CatalystError('\n\tAlso: '.join(messages))
def touch(myfile):
try:
myf=open(myfile,"w")
myf.close()
except IOError:
- raise CatalystError, "Could not touch "+myfile+"."
+ raise CatalystError("Could not touch "+myfile+".", print_traceback=True)
def countdown(secs=5, doing="Starting"):
if secs:
"""
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
-import os,string,imp,types,shutil
-from catalyst.support import *
-from generic_stage_target import *
-from stat import *
+
+from catalyst.support import normpath
+
+from generic_stage_target import generic_stage_target
class embedded_target(generic_stage_target):
"""
-import os,string,imp,types,shutil
-from catalyst.support import *
-from generic_target import *
-from stat import *
+
+import os
+import string
+import imp
+import types
+import shutil
+import sys
+from stat import ST_UID, ST_GID, ST_MODE
+
+
+from catalyst.support import (CatalystError, msg, file_locate, normpath,
+ touch, cmd, warn, list_bashify, countdown, read_makeconf, read_from_clst,
+ ismount)
+
+from generic_target import generic_target
from catalyst.lock import LockDir
if "chost" in self.settings:
hostmachine = self.settings["chost"].split("-")[0]
if hostmachine not in machinemap:
- raise CatalystError, "Unknown host machine type "+hostmachine
+ raise CatalystError("Unknown host machine type "+hostmachine)
self.settings["hostarch"]=machinemap[hostmachine]
else:
hostmachine = self.settings["subarch"]
else:
buildmachine = os.uname()[4]
if buildmachine not in machinemap:
- raise CatalystError, "Unknown build machine type "+buildmachine
+ raise CatalystError("Unknown build machine type "+buildmachine)
self.settings["buildarch"]=machinemap[buildmachine]
self.settings["crosscompile"]=(self.settings["hostarch"]!=\
self.settings["buildarch"])
else:
ccdir="/root/.ccache"
if not os.path.isdir(ccdir):
- raise CatalystError,\
+ raise CatalystError(
"Compiler cache support can't be enabled (can't find "+\
- ccdir+")"
+ ccdir+")")
self.mounts.append("ccache")
self.mountmap["ccache"] = ccdir
""" for the chroot: """
def set_source_subpath(self):
if type(self.settings["source_subpath"])!=types.StringType:
- raise CatalystError,\
- "source_subpath should have been a string. Perhaps you have something wrong in your spec file?"
+ raise CatalystError(
+ "source_subpath should have been a string. Perhaps you have " +\
+ "something wrong in your spec file?")
def set_pkgcache_path(self):
if "pkgcache_path" in self.settings:
self.settings["iso_volume_id"]=\
self.settings[self.settings["spec_prefix"]+"/volid"]
if len(self.settings["iso_volume_id"])>32:
- raise CatalystError,\
- "ISO volume ID must not exceed 32 characters."
+ raise CatalystError(
+ "ISO volume ID must not exceed 32 characters.")
else:
self.settings["iso_volume_id"]="catalyst "+self.settings["snapshot"]
""" Try to umount stuff ourselves """
self.unbind()
if ismount(mypath + self.mountmap[x]):
- raise CatalystError, "Auto-unbind failed for " + self.mountmap[x]
+ raise CatalystError("Auto-unbind failed for " +
+ self.mountmap[x])
else:
print "Auto-unbind successful..."
except CatalystError:
- raise CatalystError, "Unable to auto-unbind " + self.mountmap[x]
+ raise CatalystError("Unable to auto-unbind " +
+ self.mountmap[x])
def unpack(self):
unpack=True
invalid_snapshot=True
elif os.path.isdir(self.settings["source_path"]):
""" We should never reach this, so something is very wrong """
- raise CatalystError,\
- "source path is a dir but seedcache is not enabled"
+ raise CatalystError(
+ "source path is a dir but seedcache is not enabled")
if unpack:
self.mount_safety_check()
self.settings["chroot_path"] + src)
if retval!=0:
self.unbind()
- raise CatalystError,"Couldn't bind mount " + src
+ raise CatalystError("Couldn't bind mount " + src)
def unbind(self):
ouch=0
this to potentially prevent an upcoming bash stage cleanup script
from wiping our bind mounts.
"""
- raise CatalystError,\
- "Couldn't umount one or more bind-mounts; aborting for safety."
+ raise CatalystError(
+ "Couldn't umount one or more bind-mounts; aborting for safety.")
def chroot_setup(self):
self.makeconf=read_makeconf(self.settings["chroot_path"]+\
""" Copy over the envscript, if applicable """
if "envscript" in self.settings:
if not os.path.exists(self.settings["envscript"]):
- raise CatalystError,\
- "Can't find envscript "+self.settings["envscript"]
+ raise CatalystError(
+ "Can't find envscript " + self.settings["envscript"],
+ print_traceback=True)
print "\nWarning!!!!"
print "\tOverriding certain env variables may cause catastrophic failure."
except:
self.unbind()
- raise CatalystError, "Build failed, could not execute preclean"
+ raise CatalystError("Build failed, could not execute preclean")
def capture(self):
if "autoresume" in self.settings["options"] \
except CatalystError:
self.unbind()
- raise CatalystError,"Stage build aborting due to error."
+ raise CatalystError("Stage build aborting due to error.",
+ print_traceback=True)
def setup_environment(self):
"""
touch(self.settings["autoresume_path"]+"build_packages")
except CatalystError:
self.unbind()
- raise CatalystError,self.settings["spec_prefix"]+\
- "build aborting due to error."
+ raise CatalystError(self.settings["spec_prefix"]+\
+ "build aborting due to error.")
def build_kernel(self):
if "autoresume" in self.settings["options"] \
touch(self.settings["autoresume_path"]+"build_kernel")
except CatalystError:
self.unbind()
- raise CatalystError,\
- "build aborting due to kernel build error."
+ raise CatalystError(
+ "build aborting due to kernel build error.",
+ print_traceback=True)
def _build_kernel(self, kname):
"Build a single configured kernel by name"
touch(self.settings["autoresume_path"]+"bootloader")
except CatalystError:
self.unbind()
- raise CatalystError,"Script aborting due to error."
+ raise CatalystError("Script aborting due to error.")
def livecd_update(self):
if "autoresume" in self.settings["options"] \
except CatalystError:
self.unbind()
- raise CatalystError,"build aborting due to livecd_update error."
+ raise CatalystError("build aborting due to livecd_update error.")
def clear_chroot(self):
myemp=self.settings["chroot_path"]
-from catalyst.support import *
+
+
+from catalyst.support import addl_arg_parse
class generic_target:
"""
"""
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
-import os,types,glob
-from catalyst.support import *
-from generic_stage_target import *
+import os
+import types
+import glob
+
+
+from catalyst.support import (CatalystError, normpath,
+ touch, cmd, list_bashify)
+
+from generic_stage_target import generic_stage_target
+
class grp_target(generic_stage_target):
"""
self.valid_values=self.required_values[:]
self.valid_values.extend(["grp/use"])
if "grp" not in addlargs:
- raise CatalystError,"Required value \"grp\" not specified in spec."
+ raise CatalystError("Required value \"grp\" not specified in spec.")
self.required_values.extend(["grp"])
if type(addlargs["grp"])==types.StringType:
except CatalystError:
self.unbind()
- raise CatalystError,"GRP build aborting due to error."
+ raise CatalystError("GRP build aborting due to error.",
+ print_traceback=True)
def set_use(self):
generic_stage_target.set_use(self)
"""
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
-from catalyst.support import *
-from generic_stage_target import *
+import os
+import types
+import string
+
+
+from catalyst.support import (normpath,
+ touch, cmd)
+
+from generic_stage_target import generic_stage_target
+
class livecd_stage1_target(generic_stage_target):
"""
if not os.path.exists(self.settings["target_path"]):
os.makedirs(self.settings["target_path"])
- def set_target_path(self):
- pass
-
def set_spec_prefix(self):
self.settings["spec_prefix"]="livecd"
"""
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
-import os,string,types,stat,shutil
-from catalyst.support import *
-from generic_stage_target import *
+import os
+
+
+from catalyst.support import (normpath, file_locate, CatalystError, cmd,
+ read_from_clst, touch)
+from generic_stage_target import generic_stage_target
+
class livecd_stage2_target(generic_stage_target):
"""
def set_source_path(self):
self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2")
if os.path.isfile(self.settings["source_path"]):
- self.settings["source_path_hash"]=generate_hash(self.settings["source_path"])
+ self.settings["source_path_hash"] = \
+ self.settings["hash_map"].generate_hash(
+ self.settings["source_path"])
else:
self.settings["source_path"]=normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/")
if not os.path.exists(self.settings["source_path"]):
- raise CatalystError,"Source Path: "+self.settings["source_path"]+" does not exist."
+ raise CatalystError("Source Path: " +
+ self.settings["source_path"] + " does not exist.",
+ print_traceback=True)
def set_spec_prefix(self):
self.settings["spec_prefix"]="livecd"
myf=open(self.settings["chroot_path"]+"/etc/modprobe.d/blacklist.conf","a")
except:
self.unbind()
- raise CatalystError,"Couldn't open "+self.settings["chroot_path"]+"/etc/modprobe.d/blacklist.conf."
+ raise CatalystError("Couldn't open " +
+ self.settings["chroot_path"] +
+ "/etc/modprobe.d/blacklist.conf.",
+ print_traceback=True)
myf.write("\n#Added by Catalyst:")
# workaround until config.py is using configparser
os.makedirs(self.settings["pkgcache_path"],0755)
if not display_msg:
- raise CatalystError,"Could not find appropriate source. Please check the 'source_subpath' setting in the spec file."
+ raise CatalystError("Could not find appropriate source.\n"
+ "Please check the 'source_subpath' "
+ "setting in the spec file.",
+ print_traceback=True)
print display_msg
cmd(unpack_cmd,error_msg,env=self.env)
"""
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
-import os,string,types
-from catalyst.support import *
-from generic_stage_target import *
+import os
+import types
+import shutil
+from stat import ST_UID, ST_GID, ST_MODE
+
+
+from catalyst.support import (CatalystError, normpath,
+ touch, cmd, list_bashify)
+
+from generic_stage_target import generic_stage_target
+
class netboot2_target(generic_stage_target):
"""
for x in loopy:
self.valid_values.append("netboot2/packages/"+x+"/files")
except:
- raise CatalystError,"configuration error in netboot2/packages."
+ raise CatalystError("configuration error in netboot2/packages.")
generic_stage_target.__init__(self,spec,addlargs)
self.set_build_kernel_vars()
" image " + list_bashify(myfiles),env=self.env)
except CatalystError:
self.unbind()
- raise CatalystError,"Failed to copy files to image!"
+ raise CatalystError("Failed to copy files to image!",
+ print_traceback=True)
touch(self.settings["autoresume_path"]+"copy_files_to_image")
print ">>> Netboot Build Finished!"
except CatalystError:
self.unbind()
- raise CatalystError,"Failed to move kernel images!"
+ raise CatalystError("Failed to move kernel images!",
+ print_traceback=True)
def remove(self):
if "autoresume" in self.settings["options"] \
"""
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
-import os,string,types
-from catalyst.support import *
-from generic_stage_target import *
+import os
+import types
+
+
+from catalyst.support import (CatalystError, normpath,
+ cmd, list_bashify, file_locate)
+
+from generic_stage_target import generic_stage_target
+
class netboot_target(generic_stage_target):
"""
# for x in loopy:
# self.required_values.append("netboot/packages/"+x+"/files")
except:
- raise CatalystError,"configuration error in netboot/packages."
+ raise CatalystError("configuration error in netboot/packages.")
generic_stage_target.__init__(self,spec,addlargs)
self.set_build_kernel_vars(addlargs)
# cmd("/bin/bash "+self.settings["controller_file"]+" packages "+mypack,env=self.env)
# except CatalystError:
# self.unbind()
-# raise CatalystError,"netboot build aborting due to error."
+# raise CatalystError("netboot build aborting due to error.",
+# print_traceback=True)
def build_busybox(self):
# build busybox
cmd("/bin/bash "+self.settings["controller_file"]+" busybox "+ mycmd,env=self.env)
except CatalystError:
self.unbind()
- raise CatalystError,"netboot build aborting due to error."
+ raise CatalystError("netboot build aborting due to error.",
+ print_traceback=True)
def copy_files_to_image(self):
# create image
" image " + list_bashify(myfiles),env=self.env)
except CatalystError:
self.unbind()
- raise CatalystError,"netboot build aborting due to error."
+ raise CatalystError("netboot build aborting due to error.",
+ print_traceback=True)
def create_netboot_files(self):
# finish it all up
cmd("/bin/bash "+self.settings["controller_file"]+" finish",env=self.env)
except CatalystError:
self.unbind()
- raise CatalystError,"netboot build aborting due to error."
+ raise CatalystError("netboot build aborting due to error.",
+ print_traceback=True)
# end
print "netboot: build finished !"
"""
import os
-from catalyst.support import *
-from generic_stage_target import *
+import shutil
+from stat import ST_UID, ST_GID, ST_MODE
+
+
+from catalyst.support import normpath, cmd
+from generic_stage_target import generic_stage_target
class snapshot_target(generic_stage_target):
"""
self.required_values=["version_stamp","target"]
self.valid_values=["version_stamp","target"]
- generic_target.__init__(self,myspec,addlargs)
+ generic_stage_target.__init__(self,myspec,addlargs)
self.settings=myspec
self.settings["target_subpath"]="portage"
st=self.settings["storedir"]
"""
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
-from catalyst.support import *
-from generic_stage_target import *
+
+import os
+
+
+from catalyst.support import normpath, list_to_string
+from generic_stage_target import generic_stage_target
+
class stage1_target(generic_stage_target):
"""
"""
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
-from catalyst.support import *
-from generic_stage_target import *
+import os
+
+
+from catalyst.support import normpath, list_to_string
+from generic_stage_target import generic_stage_target
+
class stage2_target(generic_stage_target):
"""
"""
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
-from catalyst.support import *
-from generic_stage_target import *
+
+from generic_stage_target import generic_stage_target
+
class stage3_target(generic_stage_target):
"""
"""
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
-from catalyst.support import *
-from generic_stage_target import *
+
+from generic_stage_target import generic_stage_target
+
class stage4_target(generic_stage_target):
"""
"""
# NOTE: That^^ docstring has influence catalyst-spec(5) man page generation.
-from catalyst.support import *
-from generic_stage_target import *
+
+import os
+
+
+from catalyst.support import cmd, list_bashify, CatalystError
+from generic_stage_target import generic_stage_target
+
class tinderbox_target(generic_stage_target):
"""
except CatalystError:
self.unbind()
- raise CatalystError,"Tinderbox aborting due to error."
+ raise CatalystError("Tinderbox aborting due to error.",
+ print_traceback=True)
def set_cleanables(self):
self.settings['cleanables'] = [
#!/usr/bin/python
-import os,portage,sys
+import os
+import sys
+import portage
# this loads files from the profiles ...
# wrap it here to take care of the different