[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] Correctly match version part of source tarballs



The version part must not be greedy in order to not include the .orig.tar.*
part.  Also add .debian.tar.* which I forgot earlier.

Signed-off-by: Ansgar Burchardt <ansgar@debian.org>
---
 daklib/regexes.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/daklib/regexes.py b/daklib/regexes.py
index 15b79a6..3da3b29 100755
--- a/daklib/regexes.py
+++ b/daklib/regexes.py
@@ -141,7 +141,7 @@ re_includeinpdiff = re.compile(r"(Translation-[a-zA-Z_]+\.(?:bz2|xz))")
 re_file_safe = re.compile(r'^[a-zA-Z0-9][a-zA-Z0-9_.:~+-]*$')
 
 # Prefix of binary and source filenames
-_re_file_prefix = '^(?P<package>[a-z0-9][a-z0-9.+-]+)_(?P<version>[A-Za-z0-9.:~+-]+)'
+_re_file_prefix = '^(?P<package>[a-z0-9][a-z0-9.+-]+)_(?P<version>[A-Za-z0-9.:~+-]+?)'
 
 # Match binary packages
 # Groups: package, version, architecture, type
@@ -153,7 +153,7 @@ re_file_dsc = re.compile(_re_file_prefix + r'\.dsc$')
 
 # Match other source files
 # Groups: package, version
-re_file_source = re.compile(_re_file_prefix + r'(?:(?:\.orig(?:-[a-zA-Z0-9-]+)?)?\.tar\.(?:bz2|gz|xz)|\.diff\.gz)$')
+re_file_source = re.compile(_re_file_prefix + r'(?:(?:\.orig(?:-[a-zA-Z0-9-]+)?|\.debian)?\.tar\.(?:bz2|gz|xz)|\.diff\.gz)$')
 
 # Match upstream tarball
 # Groups: package, version
-- 
1.7.2.5



Reply to: