make using /tmp for the debian folder configurable (but it remains the default)
authorRalf Jung <post@ralfj.de>
Mon, 2 Sep 2013 16:03:20 +0000 (18:03 +0200)
committerRalf Jung <post@ralfj.de>
Mon, 2 Sep 2013 16:03:20 +0000 (18:03 +0200)
auto_debuild.py

index 94c7c14cce1e67da623dfa60c530dedc8da207d3..24720b9d683336185e9d832a7ed40a2e53c9b0b3 100755 (executable)
@@ -229,11 +229,14 @@ def createDebianFiles(config):
        files = []
        # create folders
        if os.path.exists('debian') or os.path.islink('debian'): raise Exception('debian folder already exists?')
        files = []
        # create folders
        if os.path.exists('debian') or os.path.islink('debian'): raise Exception('debian folder already exists?')
-       tempdir = tempfile.mkdtemp(prefix='auto-debuild-')
-       os.mkdir(tempdir+'/source')
-       os.symlink(tempdir, 'debian')
+       if config.getbool('useTmp', True):
+               tempdir = tempfile.mkdtemp(prefix='auto-debuild-')
+               os.symlink(tempdir, 'debian')
+       else:
+               os.mkdir('debian')
        if not os.path.exists(debDir): os.makedirs(debDir)
        # source format file
        if not os.path.exists(debDir): os.makedirs(debDir)
        # source format file
+       os.mkdir('debian/source')
        with open('debian/source/format', 'w') as f:
                print >>f, "3.0 (native)"
        # compat file
        with open('debian/source/format', 'w') as f:
                print >>f, "3.0 (native)"
        # compat file