提交 c1a20d66 编写于 作者: R Raphael Hertzog 提交者: Raphaël Hertzog

daklib/regexes.py: updates to support new source files

The regex re_issource is modified to recognize the new compression scheme
supported by the 3.0 source package formats. Also add the
the debian.tar file used by 3.0 (quilt) and 2.0 and the
.orig-component.tar for additional upstream tarballs.

Add a new regex re_is_orig_source to know if a file correspond
to some upstream source tarballs (where the version should not have a
debian revision).

Add new regexes re_source_ext and re_orig_source_ext to match only the
extension of source files. And reuse those in the definition of
re_is_orig_source and re_issource to avoid duplication.
Signed-off-by: NRaphael Hertzog <hertzog@debian.org>
上级 7f657044
......@@ -42,7 +42,11 @@ re_arch_from_filename = re.compile(r"/binary-[^/]+/")
re_extract_src_version = re.compile (r"(\S+)\s*\((.*)\)")
re_isadeb = re.compile (r"(.+?)_(.+?)_(.+)\.u?deb$")
re_issource = re.compile (r"(.+)_(.+?)\.(orig\.tar\.gz|diff\.gz|tar\.gz|dsc)$")
orig_source_ext_re = r"orig(?:-.+)?\.tar\.(?:gz|bz2|lzma)"
re_orig_source_ext = re.compile(orig_source_ext_re + "$")
re_source_ext = re.compile("(" + orig_source_ext_re + r"|debian\.tar\.(?:gz|bz2|lzma)|diff\.gz|tar\.(?:gz|bz2|lzma)|dsc)$")
re_issource = re.compile(r"(.+)_(.+?)\." + re_source_ext.pattern)
re_is_orig_source = re.compile (r"(.+)_(.+?)\.orig(?:-.+)?\.tar\.(?:gz|bz2|lzma)$")
re_single_line_field = re.compile(r"^(\S*?)\s*:\s*(.*)")
re_multi_line_field = re.compile(r"^\s(.*)")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册