]> err.no Git - dak/commitdiff
daklib/archive.py: guess source component even with component mappings
authorAnsgar Burchardt <ansgar@debian.org>
Fri, 20 Jul 2012 11:10:54 +0000 (13:10 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Tue, 24 Jul 2012 09:06:48 +0000 (11:06 +0200)
daklib/archive.py

index 914bc0f33c0c43851ad0d9734d10a492eec9342c..539a8d20c55bde975a66c098baad0f657e369acb 100644 (file)
@@ -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