From e6031dd2c20e8a08a1d96fd0b474003b3fe23663 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Fri, 15 Aug 2014 10:16:47 +0200 Subject: [PATCH] Debian_arch_to_Debian_triplet: handle linux-${arch} --- daklib/architecture.py | 3 +++ tests/test_architecture.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/daklib/architecture.py b/daklib/architecture.py index 48e033ab..8354de02 100644 --- a/daklib/architecture.py +++ b/daklib/architecture.py @@ -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 diff --git a/tests/test_architecture.py b/tests/test_architecture.py index 8fd2d3a5..3a63c07e 100755 --- a/tests/test_architecture.py +++ b/tests/test_architecture.py @@ -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')) -- 2.39.5