X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Farchive.py;h=e3bf91267e14f0d9ff64b2067abf9d41ae4c2a4f;hb=283a1be8a19c9f89987dd96ec6247217973ac5a7;hp=9f38d4437ea9048a4e89f443ae6cdbdad6a0ebcb;hpb=2919be54694c13575d1ba9b6dc3d1c1ffc50aae7;p=dak.git diff --git a/daklib/archive.py b/daklib/archive.py index 9f38d443..e3bf9126 100644 --- a/daklib/archive.py +++ b/daklib/archive.py @@ -318,7 +318,7 @@ class ArchiveTransaction(object): ### Now add remaining files and copy them to the archive. for hashed_file in source.files.itervalues(): - hashed_file_path = os.path.join(directory, hashed_file.filename) + hashed_file_path = os.path.join(directory, hashed_file.input_filename) if os.path.exists(hashed_file_path): db_file = self._install_file(directory, hashed_file, archive, component, source_name) session.add(db_file) @@ -1025,14 +1025,33 @@ class ArchiveUpload(object): source = self.changes.source if source is not None: component = source_component_func(source) - db_source = self.transaction.install_source(self.directory, source, suite, component, changed_by, fingerprint=self.fingerprint) + db_source = self.transaction.install_source( + self.directory, + source, + suite, + component, + changed_by, + fingerprint=self.fingerprint + ) else: db_source = None db_binaries = [] for binary in self.changes.binaries: + copy_to_suite = suite + if utils.is_in_debug_section(binary.control) and suite.debug_suite is not None: + copy_to_suite = suite.debug_suite + component = binary_component_func(binary) - db_binary = self.transaction.install_binary(self.directory, binary, suite, component, fingerprint=self.fingerprint, source_suites=source_suites, extra_source_archives=extra_source_archives) + db_binary = self.transaction.install_binary( + self.directory, + binary, + copy_to_suite, + component, + fingerprint=self.fingerprint, + source_suites=source_suites, + extra_source_archives=extra_source_archives + ) db_binaries.append(db_binary) if suite.copychanges: