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

[dak/master] Create temp directory at the preferred location.



Signed-off-by: Torsten Werner <twerner@debian.org>
---
 dak/make_changelog.py   |    4 ++--
 daklib/contents.py      |    3 ++-
 tests/fixtures/dak.conf |    1 +
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/dak/make_changelog.py b/dak/make_changelog.py
index 398c352..ac5581d 100755
--- a/dak/make_changelog.py
+++ b/dak/make_changelog.py
@@ -160,7 +160,7 @@ def display_changes(uploads, index):
         print upload[index]
         prev_upload = upload[0]
 
-def export_files(session, pool, clpool, temppath):
+def export_files(session, pool, clpool):
     """
     Export interesting files from source packages.
     """
@@ -282,7 +282,7 @@ def main():
     if export:
         if cnf.exportpath:
             exportpath = os.path.join(Cnf['Dir::Export'], cnf.exportpath)
-            export_files(session, Cnf['Dir::Pool'], exportpath, Cnf['Dir::TempPath'])
+            export_files(session, Cnf['Dir::Pool'], exportpath)
         else:
             utils.fubar('No changelog export path defined')
     elif binnmu:
diff --git a/daklib/contents.py b/daklib/contents.py
index a595052..f3077aa 100755
--- a/daklib/contents.py
+++ b/daklib/contents.py
@@ -441,7 +441,8 @@ class UnpackedSource(object):
         '''
         The dscfilename is a name of a DSC file that will be extracted.
         '''
-        self.root_directory = os.path.join(mkdtemp(), 'root')
+        temp_directory = mkdtemp(dir = Config()['Dir::TempPath'])
+        self.root_directory = os.path.join(temp_directory, 'root')
         command = ('dpkg-source', '--no-copy', '--no-check', '-q', '-x',
             dscfilename, self.root_directory)
         check_call(command, preexec_fn = subprocess_setup)
diff --git a/tests/fixtures/dak.conf b/tests/fixtures/dak.conf
index 6f68238..3a728f7 100644
--- a/tests/fixtures/dak.conf
+++ b/tests/fixtures/dak.conf
@@ -22,6 +22,7 @@ Dir
 {
   Root "tests/fixtures/ftp/";
   Pool "/srv/ftp-master.debian.org/ftp/pool/";
+  TempPath "/tmp";
 };
 
 DB
-- 
1.7.2.5


Reply to: