Adds a '--traditional' option which turns on traditional, non-strict
error-handling. Usually, 'warning()' will fail but with this option, a
non-fatal warning will be given out only.

2003-12-03  Enrico Scholz  <enrico.scholz@informatik.tu-chemnitz.de>

	* created/documented initially
--- mach/scripts/mach.in~warning	2003-12-05 04:10:08.000000000 +0100
+++ mach/scripts/mach.in	2003-12-05 04:13:42.000000000 +0100
@@ -30,6 +30,7 @@
   -s, --sign			sign packages after build
   -c, --collect			collect packages and relevant files to .
   -q, --quiet			no spinners, minimal output
+  --traditional                 use tradional, non-strict behavior
   --release=(tag)		add given tag to release tag
   --canonify			just output the canonical root name and exit
 
@@ -1528,9 +1529,21 @@
         root = Root (config)
         root.status (None)
 
+class WarningException(Root.Error): pass
+
+def warningError(msg):
+    sys.stderr.write("ERROR: %s\n" % msg)
+    raise WarningException, msg
+
+def warningWarn(msg):
+    sys.stderr.write("WARNING: %s\n" % msg)
+
+warning = warningError
+
 # main function
 def main (config, args):
     global DEBUG # we might change it
+    global warning
 
     canonify   = 0
     cli_config = {}
@@ -1539,7 +1552,7 @@
         opts, args = getopt.getopt (args, 'r:hdfkscq',
                                     ['root=', 'help', 'debug', 'force', 'keep',
                                      'sign', 'collect', 'quiet', 'release=',
-                                     'canonify'])
+                                     'canonify', 'traditional'])
     except getopt.error, exc:
         sys.stderr.write ('error: %s\n' % str (exc))
         sys.exit (1)
@@ -1574,6 +1587,8 @@
             cli_config['release'] = arg
         elif opt == '--canonify':
             canonify = 1
+        elif opt == '--traditional':
+            warning = warningWarn
 
     # resolve root aliases to real root names
     for name in aliases.keys ():
