From: Ansgar Burchardt Date: Mon, 4 Jun 2012 15:48:24 +0000 (+0200) Subject: Correctly match version part of source tarballs X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=b703f001864338ecbce22f12c2a515d4d34704bf;p=dak.git 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 --- diff --git a/daklib/regexes.py b/daklib/regexes.py index 15b79a63..3da3b298 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[a-z0-9][a-z0-9.+-]+)_(?P[A-Za-z0-9.:~+-]+)' +_re_file_prefix = '^(?P[a-z0-9][a-z0-9.+-]+)_(?P[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