]> git.decadent.org.uk Git - dak.git/commitdiff
built_in_suite: Do not consider architecture 'source'
authorAnsgar Burchardt <ansgar@debian.org>
Fri, 1 Aug 2014 17:40:05 +0000 (19:40 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Fri, 1 Aug 2014 17:41:16 +0000 (19:41 +0200)
daklib.architecture.match_architecture would consider 'source' as an
invalid architecture name.

daklib/packagelist.py
tests/test_packagelist.py

index 04a0ef518777b754405b26b6bfb4c01ef1e366d4..4a671839e11733b6085c298a2651c1d99d09174b 100644 (file)
@@ -53,6 +53,8 @@ class PackageListEntry(object):
     def built_in_suite(self, suite):
         built = False
         for arch in suite.architectures:
+            if arch.arch_string == 'source':
+                continue
             built_on_arch = self.built_on_architecture(arch.arch_string)
             if built_on_arch:
                 return True
index fa5cc86ad3c34f522dd852eab9f7f9f0a46aa0d8..4c2fe4d416b58d1a758d3922fcf4dd7d87f16aed 100644 (file)
@@ -161,6 +161,10 @@ class TestPackageList(DakTestCase):
         p_kfreebsdi386 = pl.packages_for_suite(suite_kfreebsdi386)
         self.assertEqual(len(p_kfreebsdi386), 0)
 
+        suite_source = FakeSuite('source')
+        p_source = pl.packages_for_suite(suite_source)
+        self.assertEqual(len(p_source), 0)
+
     def testNoArch(self):
         pl = PackageList(source_noarch)