]> git.decadent.org.uk Git - dak.git/commitdiff
dak make-pkg-file-mapping: do not include sources from other archives
authorAnsgar Burchardt <ansgar@debian.org>
Thu, 11 Sep 2014 18:30:18 +0000 (20:30 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Thu, 11 Sep 2014 18:34:54 +0000 (20:34 +0200)
Include only information about a source package's files if its .dsc is
in the requested archive.

Previously when xy_1.0-1 was in the requested archive and xy_1.0-2
using the same upstream tarball in a different archive, dak would
still include information about xy_1.0-2's upstream tarball resulting
in confusing entries on snapshot.d.o.

Reported-by: Salvatore Bonaccorso <carnil@debian.org>
dak/make_pkg_file_mapping.py

index e92f5674ea99d3d8e172c0f0805d005f45cb00c9..f52836f8b2c32881cc0f894a79411115d717ee01 100755 (executable)
@@ -52,6 +52,7 @@ def build_mapping(archive, session):
       JOIN files ON files.id=dsc_files.file
       JOIN files_archive_map ON files.id = files_archive_map.file_id
       JOIN component ON files_archive_map.component_id = component.id
+      JOIN files_archive_map fam_dsc ON fam_dsc.file_id=source.file AND fam_dsc.component_id=component.id AND fam_dsc.archive_id=files_archive_map.archive_id
     WHERE files_archive_map.archive_id = :archive_id
     ORDER BY source, version, component.id, files.filename
     """