Classification: fedora.us requirement

With this patch '-k' will be assumed by default. It adds a '--clean'
parameter which restores the old behavior.

The default cleanup causes conflicts at fedora.us when cached
filesystems will get updates. Then, 'mach rebuild' would try to
remove these (mandatory) packages since they were not in the
original environment and the build will fail.


2003-12-13  Enrico Scholz  <enrico.scholz@informatik.tu-chemnitz.de>
	* created initially
--- mach/scripts/mach.in~cleanup	2004-01-20 16:54:41.000000000 +0100
+++ mach/scripts/mach.in	2004-02-28 01:23:17.000000000 +0100
@@ -27,7 +27,8 @@
   -r, --root=ROOT		specify a root to work in
   -d, --debug			turn on debugging
   -f, --force			override root lock
-  -k, --keep			do not revert buildroot to initial package list
+  -k, --keep			do not revert buildroot to initial package list (default)
+  --clean			revert buildroot to initial package list
   -s, --sign			sign packages after build
   -c, --collect			collect packages and relevant files to .
   -q, --quiet			no spinners, minimal output
@@ -1624,13 +1625,13 @@
     global warning
 
     canonify   = 0
-    cli_config = {}
+    cli_config = { 'keep' : 1 }
 
     try:
         opts, args = getopt.getopt (args, 'r:hdfkscq',
                                     ['root=', 'help', 'debug', 'force', 'keep',
                                      'sign', 'collect', 'quiet', 'release=', 'old-release=',
-                                     'canonify', 'traditional'])
+                                     'canonify', 'traditional', 'clean'])
     except getopt.error, exc:
         sys.stderr.write ('error: %s\n' % str (exc))
         sys.exit (1)
@@ -1655,6 +1656,8 @@
             cli_config['force'] = 1
         elif opt in ('-k', '--keep'):
             cli_config['keep'] = 1
+        elif opt in ('--clean',):
+            del cli_config['keep']
         elif opt in ('-s', '--sign'):
             cli_config['sign'] = 1
         elif opt in ('-c', '--collect'):
