]> git.decadent.org.uk Git - dak.git/commitdiff
Debian_arch_to_Debian_triplet: handle linux-${arch}
authorAnsgar Burchardt <ansgar@debian.org>
Fri, 15 Aug 2014 08:16:47 +0000 (10:16 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Fri, 15 Aug 2014 08:16:47 +0000 (10:16 +0200)
daklib/architecture.py
tests/test_architecture.py

index 48e033abe4b89c9becac84fce1166bb8d71d8bc4..8354de02d2618387c414a0d0d4c85238bdc97575 100644 (file)
@@ -70,6 +70,9 @@ def Debian_arch_to_Debian_triplet(arch):
         else:
             return 'any', 'any', 'any'
 
+    if len(parts) == 2 and parts[0] == 'linux':
+        arch = parts[1]
+
     triplet = _triplettable()[1].get(arch, None)
     if triplet is None:
         return None
index 8fd2d3a5396565d48c24ff16ce30f0a466758724..3a63c07e93c37ceb94f4d8e08b6fe8cd17b46575 100755 (executable)
@@ -25,6 +25,9 @@ from daklib.architecture import match_architecture
 class MatchArchitecture(DakTestCase):
     def testEqual(self):
         self.assert_(match_architecture('amd64', 'amd64'))
+        self.assert_(match_architecture('linux-amd64', 'linux-amd64'))
+        self.assert_(match_architecture('linux-amd64', 'amd64'))
+        self.assert_(match_architecture('amd64', 'linux-amd64'))
         self.assert_(not match_architecture('amd64', 'i386'))
         self.assert_(match_architecture('kfreebsd-amd64', 'kfreebsd-amd64'))
         self.assert_(not match_architecture('kfreebsd-amd64', 'amd64'))