X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fcontents.py;h=e5abcac61a916d13d15b9ed7c339ffc539d3a504;hb=52eb03dccab0a9898bca4d36a0a96ebe377fb977;hp=07734075ed4e4d779d221b08eb9799bc5d91d85b;hpb=74c42205ba675d0ab3481a5570ece6a051086e32;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)