[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

mock mock.py,1.17,1.18



Author: skvidal

Update of /cvs/fedora/mock
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7734

Modified Files:
	mock.py 
Log Message:

merge in dcbw's patch for --uniqueext




Index: mock.py
===================================================================
RCS file: /cvs/fedora/mock/mock.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- mock.py	24 Jun 2005 01:35:28 -0000	1.17
+++ mock.py	25 Jun 2005 17:23:09 -0000	1.18
@@ -46,7 +46,10 @@
         self._state = 'unstarted'
         self.tmplog = []
         self.config = config
-        self.basedir = '%s/%s' % (config['basedir'], config['root'])
+        basedir = config['basedir']
+        if config.has_key('unique-ext'):
+            basedir = "%s-%s" % (config['basedir'], config['unique-ext'])
+        self.basedir = os.path.join(basedir, config['root'])
         self.target_arch = config['target_arch']
         self.rootdir = os.path.join(self.basedir, 'root')
         self.homedir = self.config['chroothome']
@@ -585,6 +588,8 @@
              default=None, help="path for resulting files to be put")
     parser.add_option("--statedir", action="store", type="string", default=None,
             help="path for state dirresulting files to be put")
+    parser.add_option("--uniqueext", action="store", type="string", default=None,
+            help="Arbitrary, unique extension to append to buildroot directory name")
 
     return parser.parse_args()
     
@@ -677,6 +682,8 @@
     if options.statedir:
         config_opts['statedir'] = options.statedir
 
+    if options.uniqueext:
+        config_opts['unique-ext'] = options.uniqueext
 
     # do whatever we're here to do
     if args[0] == 'clean':


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]