X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fcontents.py;h=e5abcac61a916d13d15b9ed7c339ffc539d3a504;hb=b639a0b9e593eef0412d473560c616eb15364c6e;hp=07734075ed4e4d779d221b08eb9799bc5d91d85b;hpb=06e99163b927ed02096fd144e7b909a495337082;p=dak.git diff --git a/daklib/contents.py b/daklib/contents.py index 07734075..e5abcac6 100644 --- a/daklib/contents.py +++ b/daklib/contents.py @@ -394,11 +394,12 @@ class UnpackedSource(object): UnpackedSource extracts a source package into a temporary location and gives you some convinient function for accessing it. ''' - def __init__(self, dscfilename): + def __init__(self, dscfilename, tmpbasedir=None): ''' The dscfilename is a name of a DSC file that will be extracted. ''' - temp_directory = mkdtemp(dir = Config()['Dir::TempPath']) + basedir = tmpbasedir if tmpbasedir else Config()['Dir::TempPath'] + temp_directory = mkdtemp(dir = basedir) self.root_directory = os.path.join(temp_directory, 'root') command = ('dpkg-source', '--no-copy', '--no-check', '-q', '-x', dscfilename, self.root_directory)