From 7b7819f9a21ff2b3daf45f2077b1026a250cc1ab Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@debian.org>
Date: Sat, 23 Apr 2016 14:02:16 +0200
Subject: [PATCH] Move more specific source file regexes before general ones

The orig tarball regexes match also the orig tarball detached
signatures because they are not anchored at the end, and the loop
short-circuits on first match. So we have to move them before their
more general counterparts.

Fixes commit 84f230b6cfb4b3eb1ef5fbe672e121b1a8e7aabb.
---
 daklib/utils.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/daklib/utils.py b/daklib/utils.py
index ce72a2c..206ee0b 100644
--- a/daklib/utils.py
+++ b/daklib/utils.py
@@ -315,11 +315,11 @@ def check_dsc_files(dsc_filename, dsc, dsc_files):
         (r'diff\.gz',                  ('debian_diff',)),
         (r'tar\.gz',                   ('native_tar_gz', 'native_tar')),
         (r'debian\.tar\.(gz|bz2|xz)',  ('debian_tar',)),
-        (r'orig\.tar\.(gz|bz2|xz)',    ('orig_tar',)),
         (r'orig\.tar\.(gz|bz2|xz)\.asc', ('orig_tar_sig',)),
+        (r'orig\.tar\.(gz|bz2|xz)',    ('orig_tar',)),
         (r'tar\.(gz|bz2|xz)',          ('native_tar',)),
-        (r'orig-.+\.tar\.(gz|bz2|xz)', ('more_orig_tar',)),
         (r'orig-.+\.tar\.(gz|bz2|xz)\.asc', ('more_orig_tar_sig',)),
+        (r'orig-.+\.tar\.(gz|bz2|xz)', ('more_orig_tar',)),
     )
 
     for f in dsc_files:
-- 
2.8.1

