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:
for binary in upload.changes.binaries}
for name, binary in binaries.items():
- if binary.control['Section'] == debug_deb_section:
+ if binary.section == debug_deb_section:
# If we have a Binary package in the Debug section, we
# can allow it to not be present in the Binary field
# in the .changes file, so long as its name (without
@type: dict-like
"""
+ def is_debug(self):
+ return self.section == "debug"
+
@classmethod
def from_file(cls, directory, filename):
hashed_file = HashedFile.from_file(directory, filename)
raise InvalidBinaryException('{0}: Does not match re_file_binary'.format(self.hashed_file.filename))
return match.group('type')
+ @property
+ def section(self):
+ """section name
+ @type: str
+ """
+ return self.control['Section'].split('/', 1)[-1]
+
@property
def component(self):
"""component name