### 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)
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 binary.is_debug() 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: