提交 f74884ed 编写于 作者: T Torsten Werner

Create temp directory at the preferred location.

Signed-off-by: NTorsten Werner <twerner@debian.org>
上级 a51367ef
......@@ -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:
......
......@@ -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)
......
......@@ -22,6 +22,7 @@ Dir
{
Root "tests/fixtures/ftp/";
Pool "/srv/ftp-master.debian.org/ftp/pool/";
TempPath "/tmp";
};
DB
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册