X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fexport_suite.py;h=23775583b67030b78da306e0b3e2440cc5c577e8;hb=abcd0f018dc49a218ce70d22e97fc7b654fcf1c8;hp=03d118496bd408ef7cb6c5b5c27dcf82397a175e;hpb=0f0d16e2f6568553416b3f40cfe134b7ca7fbf73;p=dak.git diff --git a/dak/export_suite.py b/dak/export_suite.py index 03d11849..23775583 100644 --- a/dak/export_suite.py +++ b/dak/export_suite.py @@ -76,9 +76,21 @@ def main(argv=None): with FilesystemTransaction() as fs: for f in files: + af = session.query(ArchiveFile) \ + .join(ArchiveFile.component).join(ArchiveFile.file) \ + .filter(ArchiveFile.archive == suite.archive) \ + .filter(ArchiveFile.file == f).first() + # XXX: Remove later. There was a bug that caused only the *.dsc to + # be installed in build queues and we do not want to break them. + # The bug was fixed in 55d2c7e6e2418518704623246021021e05b90e58 + # on 2012-11-04 + if af is None: + af = session.query(ArchiveFile) \ + .join(ArchiveFile.component).join(ArchiveFile.file) \ + .filter(ArchiveFile.file == f).first() dst = os.path.join(directory, f.basename) if not os.path.exists(dst): - fs.copy(f.fullpath, dst, symlink=symlink) + fs.copy(af.path, dst, symlink=symlink) fs.commit() if __name__ == '__main__':