From 826007d7bef3f6284897f3b00f5a18a68a7d2f0e Mon Sep 17 00:00:00 2001 From: "John P. Davis" Date: Sun, 2 Jan 2005 04:15:51 +0000 Subject: [PATCH] tweaks to error handling in the main catalyst script, and added portage_confdir to the specfile example git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@505 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 9 +++++++-- catalyst | 7 ++++--- examples/generic_stage_template.spec | 9 +++++++++ modules/catalyst_support.py | 3 ++- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5c1ed4fc..8e27eb67 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for gentoo/src/catalyst -# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.132 2004/12/29 15:51:43 wolf31o2 Exp $ +# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.133 2005/01/02 04:15:51 zhen Exp $ + + 01 Jan 2005; John Davis catalyst, + examples/generic_stage_template.spec, modules/catalyst_support.py: + tweaking error handling in the main catalyst script + updated the example to include a blurb about portage_confdir 29 Dec 2004; Chris Gianelloni livecd/runscript-support/livecdfs-update.sh: diff --git a/catalyst b/catalyst index 7f117aec..4e33e507 100755 --- a/catalyst +++ b/catalyst @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.55 2004/12/17 21:18:06 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.56 2005/01/02 04:15:51 zhen Exp $ # Maintained in full by John Davis @@ -286,6 +286,7 @@ if __name__ == "__main__": # everything is setup, so the build is a go try: build_target(addlargs, targetmap) - except: - print "!!! catalyst: could not complete build" + + except CatalystError: + raise CatalystError,"Could not complete build" sys.exit(2) diff --git a/examples/generic_stage_template.spec b/examples/generic_stage_template.spec index fd70f027..3889d170 100644 --- a/examples/generic_stage_template.spec +++ b/examples/generic_stage_template.spec @@ -40,3 +40,12 @@ snapshot: # example: # default/stage3-x86-2004.1 source_subpath: + +# hosts used as distcc slaves (distcc required in options (catalyst.conf) +# example: +# distcc_hosts: 127.0.0.1 192.168.0.1 + +# optional directory containing portage configuration files +# example: +# portage_confdir: /etc/portage +# portage_confdir: diff --git a/modules/catalyst_support.py b/modules/catalyst_support.py index 669bc8da..a5ca529c 100644 --- a/modules/catalyst_support.py +++ b/modules/catalyst_support.py @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.33 2004/12/18 04:47:14 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.34 2005/01/02 04:15:51 zhen Exp $ import sys,string,os,types,re,traceback @@ -45,6 +45,7 @@ class CatalystError(Exception): print traceback.print_exc(file=sys.stdout) print print "!!! catalyst: "+message + print def die(msg=None): warn(msg) -- 2.26.2