From: Eric Edgar Date: Thu, 6 Oct 2005 15:45:28 +0000 (+0000) Subject: allow file_check to proceed if key is not in use X-Git-Tag: CATALYST_2_0_6_916~649 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c7ac1b6f5ea3f4bed1999e92e5c8d5c4f87085b3;p=catalyst.git allow file_check to proceed if key is not in use git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@845 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index 82544cff..5cb9a346 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.337 2005/10/06 15:21:30 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.338 2005/10/06 15:45:28 rocket Exp $ + + 06 Oct 2005; Eric Edgar catalyst, + modules/catalyst_support.py: + allow file_check to proceed if key is not in use 06 Oct 2005; Eric Edgar modules/catalyst_lock.py: Recursively make the missing directories diff --git a/catalyst b/catalyst index 489646a5..ee61c798 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.90 2005/09/30 20:16:50 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.91 2005/10/06 15:45:28 rocket Exp $ # Maintained in full by: # Eric Edgar @@ -205,7 +205,10 @@ def build_target(addlargs, targetmap): mytarget.run() except CatalystError: - mytarget.mount_safety_check() + try: + mytarget.mount_safety_check() + except: + pass sys.exit(1) if __name__ == "__main__": @@ -351,7 +354,6 @@ if __name__ == "__main__": build_target(addlargs, targetmap) except CatalystError: - raise CatalystError,"Could not complete build" print print "Catalyst aborting...." sys.exit(2) @@ -359,14 +361,15 @@ 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 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/catalyst_support.py b/modules/catalyst_support.py index 58c46cbc..5a47b336 100644 --- a/modules/catalyst_support.py +++ b/modules/catalyst_support.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/catalyst_support.py,v 1.56 2005/08/29 19:38:48 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.57 2005/10/06 15:45:28 rocket Exp $ import sys,string,os,types,re,signal,traceback,md5,time selinux_capable = False @@ -457,15 +457,16 @@ def file_locate(settings,filelist,expand=1): if not settings.has_key(myfile): #filenames such as cdtar are optional, so we don't assume the variable is defined. pass - if len(settings[myfile])==0: - raise CatalystError, "File variable \""+myfile+"\" has a length of zero (not specified.)" - if settings[myfile][0]=="/": - if not os.path.exists(settings[myfile]): - raise CatalystError, "Cannot locate specified "+myfile+": "+settings[myfile] - 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)" + if len(settings[myfile])==0: + raise CatalystError, "File variable \""+myfile+"\" has a length of zero (not specified.)" + if settings[myfile][0]=="/": + if not os.path.exists(settings[myfile]): + raise CatalystError, "Cannot locate specified "+myfile+": "+settings[myfile] + 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)" """ Spec file format: