From 11335c7d3fa22b5f82ece4cdea387539c5b52b7f Mon Sep 17 00:00:00 2001 From: Eric Edgar Date: Thu, 17 Nov 2005 20:27:57 +0000 Subject: [PATCH] Turn on more tracebacks at this point to better debug .. will need to turn them down as we find errors and build appropriate error handlers git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@891 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 7 ++++++- catalyst | 33 +++++++++++++++++++-------------- modules/generic_stage_target.py | 16 +++++++++++++--- 3 files changed, 38 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75a05bcd..346543aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.379 2005/11/15 22:20:42 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.380 2005/11/17 20:27:57 rocket Exp $ + + 17 Nov 2005; Eric Edgar catalyst, + modules/generic_stage_target.py: + Turn on more tracebacks at this point to better debug .. will need to turn + them down as we find errors and build appropriate error handlers 15 Nov 2005; Chris Gianelloni catalyst: Changed version marker to 2.0_pre20051115 for new ebuild. diff --git a/catalyst b/catalyst index bdac9425..9b9c5458 100755 --- a/catalyst +++ b/catalyst @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.96 2005/11/15 22:20:42 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.97 2005/11/17 20:27:57 rocket Exp $ # Maintained in full by: # Eric Edgar @@ -352,7 +352,7 @@ if __name__ == "__main__": # everything is setup, so the build is a go try: build_target(addlargs, targetmap) - + except CatalystError: print print "Catalyst aborting...." @@ -361,18 +361,6 @@ if __name__ == "__main__": print "\nCatalyst build aborted due to user interrupt ( Ctrl-C )" print print "Catalyst aborting...." - except KeyError: - print "\nproblem with command line or spec file ( Key Error )" - print "Key: "+str(sys.exc_value)+" was not found" - print "Catalyst aborting...." - sys.exit(2) - except UnboundLocalError: - print - print "UnboundLocalError: "+str(sys.exc_value)+" was not found" - raise - print - print "Catalyst aborting...." - sys.exit(2) except LockInUse: print "Catalyst aborting...." sys.exit(2) @@ -380,3 +368,20 @@ if __name__ == "__main__": print "Catalyst aborting...." raise sys.exit(2) + + #except CatalystError: + # print + # print "Catalyst aborting...." + # sys.exit(2) + #except KeyError: + # print "\nproblem with command line or spec file ( Key Error )" + # print "Key: "+str(sys.exc_value)+" was not found" + # print "Catalyst aborting...." + # sys.exit(2) + #except UnboundLocalError: + # print + # print "UnboundLocalError: "+str(sys.exc_value)+" was not found" + # raise + # print + # print "Catalyst aborting...." + # sys.exit(2) diff --git a/modules/generic_stage_target.py b/modules/generic_stage_target.py index f9fc2a8b..9770d4bc 100644 --- a/modules/generic_stage_target.py +++ b/modules/generic_stage_target.py @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.74 2005/11/07 20:26:37 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.75 2005/11/17 20:27:57 rocket Exp $ """ This class does all of the chroot setup, copying of files, etc. It is @@ -90,8 +90,18 @@ class generic_stage_target(generic_target): msg("Can't find "+x+".py plugin in "+self.settings["sharedir"]+"/arch/") # call arch constructor, pass our settings - self.arch=self.subarchmap[self.settings["subarch"]](self.settings) - + try: + self.arch=self.subarchmap[self.settings["subarch"]](self.settings) + except: + print "Invalid subarch: "+self.settings["subarch"] + print "Choose one of the following:", + for x in self.subarchmap: + print x, + print + print + print "Catalyst aborting...." + sys.exit(2) + print "Using target:",self.settings["target"] # self.settings["mainarch"] should now be set by our arch constructor, so we print # a nice informational message: -- 2.26.2