allow file_check to proceed if key is not in use
authorEric Edgar <rocket@gentoo.org>
Thu, 6 Oct 2005 15:45:28 +0000 (15:45 +0000)
committerEric Edgar <rocket@gentoo.org>
Thu, 6 Oct 2005 15:45:28 +0000 (15:45 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@845 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
catalyst
modules/catalyst_support.py

index 82544cff6aa7daa93b20dd4da5e9ee98a12553dc..5cb9a3467446bdca4c0b4176ac3bae58dfa55465 100644 (file)
--- 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 <rocket@gentoo.org> catalyst,
+  modules/catalyst_support.py:
+  allow file_check to proceed if key is not in use
 
   06 Oct 2005; Eric Edgar <rocket@gentoo.org> modules/catalyst_lock.py:
   Recursively make the missing directories
index 489646a5af0504c1c95d1e92ac6aa5014475cb25..ee61c7986287053919ff502f6e90b510e7240264 100755 (executable)
--- 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 <rocket@gentoo.org>
@@ -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)
index 58c46cbcef7516ba934806ce069c263dd1acd641..5a47b336c6790e8571657c1fe1b92040b5715ba3 100644 (file)
@@ -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: