From: Ansgar Burchardt Date: Fri, 20 Jul 2012 11:10:54 +0000 (+0200) Subject: daklib/archive.py: guess source component even with component mappings X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=876e61a7692b121c2a1ac68a8cb0739101c213c4;p=dak.git daklib/archive.py: guess source component even with component mappings --- diff --git a/daklib/archive.py b/daklib/archive.py index 914bc0f3..539a8d20 100644 --- a/daklib/archive.py +++ b/daklib/archive.py @@ -1101,7 +1101,8 @@ class ArchiveUpload(object): component = binary_component_func(binary) binary_component_names.add(component.component_name) source_component_name = None - for guess in ('main', 'contrib', 'non-free'): + for c in self.session.query(Component).order_by(Component.component_id): + guess = c.component_name if guess in binary_component_names: source_component_name = guess break