[Commits] (heikki) Failing to find named files during manifest processing should be a fatal error.

commits at osafoundation.org commits at osafoundation.org
Fri Aug 27 11:37:41 PDT 2004


Commit by: heikki
Modified files:
hardhat/hardhatlib.py 1.81 1.82
hardhat/buildscripts/fullchandler.py 1.4 1.5
hardhat/buildscripts/newchandler.py 1.33 1.34

Log message:
Failing to find named files during manifest processing should be a fatal error.

ViewCVS links:
http://cvs.osafoundation.org/index.cgi/hardhat/hardhatlib.py.diff?r1=text&tr1=1.81&r2=text&tr2=1.82
http://cvs.osafoundation.org/index.cgi/hardhat/buildscripts/fullchandler.py.diff?r1=text&tr1=1.4&r2=text&tr2=1.5
http://cvs.osafoundation.org/index.cgi/hardhat/buildscripts/newchandler.py.diff?r1=text&tr1=1.33&r2=text&tr2=1.34

Index: hardhat/hardhatlib.py
diff -u hardhat/hardhatlib.py:1.81 hardhat/hardhatlib.py:1.82
--- hardhat/hardhatlib.py:1.81	Tue Aug 24 20:06:07 2004
+++ hardhat/hardhatlib.py	Fri Aug 27 11:37:39 2004
@@ -1,5 +1,5 @@
-__version__     = "$Revision: 1.81 $"
-__date__        = "$Date: 2004/08/25 03:06:07 $"
+__version__     = "$Revision: 1.82 $"
+__date__        = "$Date: 2004/08/27 18:37:39 $"
 __copyright__   = "Copyright (c) 2003 Open Source Applications Foundation"
 __license__     = "GPL -- see LICENSE.txt"
 
@@ -1195,8 +1195,8 @@
 # A manifest file describes which files to copy and where they should go in
 # order to create a binary distribution.  Comments are denoted by #; empty
 # lines are skipped.  There are five "variables" that you set in order to
-# control what's going on:  src, dest, recursive, exclude and glob.  The file is
-# processed sequentially; variables maintain their values until reassigned.
+# control what's going on:  src, dest, recursive, exclude and glob.  The file
+# is processed sequentially; variables maintain their values until reassigned.
 # The "src" variable should be set to a path relative to buildenv['root'],
 # and "dest" should be set to a path relative to buildenv['distdir']; either
 # can be set to an empty string (e.g. "dest=").  When a non-assignment line
@@ -1209,7 +1209,7 @@
 # current pattern). If any file or directory matches any pattern in the 
 # "excludes" parameter/list, it is skipped.
 
-def handleManifest(buildenv, filename):
+def handleManifest(buildenv, filename, fatalErrors=True):
 
     params = {}
     params["src"] = None
@@ -1220,6 +1220,11 @@
     srcdir = buildenv['root']
     destdir = buildenv['distdir']
 
+    if fatalErrors:
+        hhMsg = HARDHAT_ERROR
+    else:
+        hhMsg = HARDHAT_WARNING
+        
     for line in fileinput.input(filename):
         line = line.strip()
         if len(line) == 0:
@@ -1269,9 +1274,12 @@
                     else:
                         shutil.copy(abspath, copyto)
                 else:
-                    log(buildenv, HARDHAT_WARNING, "HardHat", "File missing: " 
+                    log(buildenv, hhMsg, "HardHat", "File missing: " 
                      + abspath)
-                    continue
+                    if fatalErrors:
+                        raise HardHatError, 'File missing: ' + abspath
+                    else:
+                        continue
 
 #expand $(VAR) with value of VAR environment variable
 #expand ${program} with full path of directory containing program from PATH

Index: hardhat/buildscripts/fullchandler.py
diff -u hardhat/buildscripts/fullchandler.py:1.4 hardhat/buildscripts/fullchandler.py:1.5
--- hardhat/buildscripts/fullchandler.py:1.4	Thu Aug 26 16:43:41 2004
+++ hardhat/buildscripts/fullchandler.py	Fri Aug 27 11:37:39 2004
@@ -178,6 +178,7 @@
         hardhatutil.dumpOutputList(outputList, log)
     except Exception, e:
         doCopyLog("***Error during distribution building process*** ", workingDir, logPath, log)
+        forceBuildNextCycle(log, workingDir)
         raise e
 
 

Index: hardhat/buildscripts/newchandler.py
diff -u hardhat/buildscripts/newchandler.py:1.33 hardhat/buildscripts/newchandler.py:1.34
--- hardhat/buildscripts/newchandler.py:1.33	Thu Aug 26 16:42:02 2004
+++ hardhat/buildscripts/newchandler.py	Fri Aug 27 11:37:39 2004
@@ -181,6 +181,7 @@
         hardhatutil.dumpOutputList(outputList, log)
     except Exception, e:
         doCopyLog("***Error during distribution building process*** ", workingDir, logPath, log)
+        forceBuildNextCycle(log, workingDir)
         raise e
 
 



More information about the Commits mailing list