hints = []
hints_map = dict([ ((o['type'], o['package']), o) for o in hints ])
- def check_override(name, type, priority, section):
+ def check_override(name, type, priority, section, included):
component = 'main'
if section.find('/') != -1:
component = section.split('/', 1)[0]
section = section,
component = component,
type = type,
+ included = included
))
components.add(component)
binary_proxy = binary.proxy
priority = binary_proxy['Priority']
section = binary_proxy['Section']
- check_override(binary.package, binary.binarytype, priority, section)
+ check_override(binary.package, binary.binarytype, priority, section, included=True)
if source is not None:
source_proxy = source.proxy
if not package_list.fallback:
packages = package_list.packages_for_suite(self.upload.target_suite)
for p in packages:
- check_override(p.name, p.type, p.priority, p.section)
+ check_override(p.name, p.type, p.priority, p.section, included=False)
- source_component = '(unknown)'
- for component, in self.session.query(Component.component_name).order_by(Component.ordering):
- if component in components:
- source_component = component
- break
- else:
- if source is not None:
- if self._source_override(component) is not None:
- source_component = component
- break
+ # see daklib.archive.source_component_from_package_list
+ # which we cannot use here as we might not have a Package-List
+ # field for old packages
+ query = self.session.query(Component).order_by(Component.ordering) \
+ .filter(Component.component_name.in_(components))
+ source_component = query.first().component_name
- if source is not None:
override = self._source_override(source_component)
if override is None:
hint = hints_map.get(('dsc', source.source))
missing.append(hint)
else:
section = 'misc'
- if component != 'main':
- section = "{0}/{1}".format(component, section)
+ if source_component != 'main':
+ section = "{0}/{1}".format(source_component, section)
missing.append(dict(
package = source.source,
priority = 'extra',
section = section,
component = source_component,
type = 'dsc',
+ included = True,
))
return missing