Package daklib :: Module regexes
[hide private]
[frames] | no frames]

Module regexes

source code

Central repository of regexes for dak


Contact: Debian FTP Master <ftpmaster@debian.org>

Copyright:

License: GNU General Public License version 2 or later

Variables [hide private]
  re_isanum = re.compile(r'^\d+$')
Is it a number?
  re_default_answer = re.compile(r'\[(.*)\]')
Looking for the default reply
  re_bin_only_nmu = re.compile(r'\+b\d+$')
Detect a binnmu
  re_comments = re.compile(r'#.*')
To sort out comment lines
  re_whitespace_comment = re.compile(r'^\s*(#|$)')
To ignore comment and whitespace lines.
  re_no_epoch = re.compile(r'^\d+:')
  re_extract_src_version = re.compile(r'(\S+)\s*\((.*)\)')
  re_isadeb = re.compile(r'(.+?)_(.+?)_(.+)\.u?deb$')
  orig_source_ext_re = 'orig(?:-[a-zA-Z0-9-]+)?\\.tar\\.(?:gz|bz...
  file_source_ext_re = '(orig(?:-[a-zA-Z0-9-]+)?\\.tar\\.(?:gz|b...
  re_source_ext = re.compile(r'((orig(?:-[a-zA-Z0-9-]+)?\.tar\.(...
  re_issource = re.compile(r'(.+)_(.+?)\.((orig(?:-[a-zA-Z0-9-]+...
  re_single_line_field = re.compile(r'^(\S*?)\s*:\s*(.*)')
  re_multi_line_field = re.compile(r'^\s(.*)')
  re_parse_maintainer = re.compile(r'^\s*(\S.*\S)\s*<([^>]+)>')
  re_srchasver = re.compile(r'^(\S+)\s+\((\S+)\)$')
  re_verwithext = re.compile(r'^(\d+)(?:\.(\d+))(?:\s+\((\S+)\))...
  re_isdeb = re.compile(r'^(.+)_(.+?)_(.+?).u?deb$')
  re_package = re.compile(r'^(.+?)_.*')
  re_doc_directory = re.compile(r'.*/doc/([^/]*).*')
  re_contrib = re.compile(r'^contrib/')
  re_nonfree = re.compile(r'^(?:non-free-firmware|)/')
  re_localhost = re.compile(r'localhost\.localdomain')
  re_version = re.compile(r'^(.*)\((.*)\)')
  re_newlinespace = re.compile(r'\n')
  re_spacestrip = re.compile(r'(\s)')
  re_taint_free = re.compile(r'^[\'/;-\+\.~\s\w]+$')
  re_changelog_versions = re.compile(r'^\w[-\+0-9a-z\.]+ \([^\(\...
  re_strip_source_version = re.compile(r'\s+.*$')
  re_build_dep_arch = re.compile(r'\[[^\]]+\]')
  re_broken_package = re.compile(r'[a-zA-Z]\w+\s+-.*')
  re_gpg_fingerprint_colon = re.compile(r'(?m)^fpr:+(.*):$')
  re_user_address = re.compile(r'(?m)^pub:.*<(.*)@.*>.*$')
  re_user_mails = re.compile(r'(?m)^(pub|uid):[^rdin].*<(.*@.*)>...
  re_user_name = re.compile(r'(?m)^pub:.*:(.*)<.*$')
  re_re_mark = re.compile(r'^RE:')
  re_parse_lintian = re.compile(r'^(?P<level>[WEO]): (?P<package...
  re_gensubrelease = re.compile(r'.*/(binary-[0-9a-z-]+|source)$')
  re_includeinrelease_byhash = re.compile(r'(Translation-[a-zA-Z...
  re_includeinrelease_plain = re.compile(r'(MD5SUMS|SHA256SUMS)$')
  re_includeinpdiff = re.compile(r'(Translation-[a-zA-Z_]+\.(?:b...
  re_file_safe = re.compile(r'^[a-zA-Z0-9][a-zA-Z0-9_\.~\+-]*$')
  re_file_safe_slash = re.compile(r'^[a-zA-Z0-9][/a-zA-Z0-9_\.~\...
  _re_file_prefix = '^(?P<package>[a-z0-9][a-z0-9.+-]+)_(?P<vers...
  re_file_binary = re.compile(r'^(?P<package>[a-z0-9][a-z0-9\.\+...
  re_file_changes = re.compile(r'^(?P<package>[a-z0-9][a-z0-9\.\...
  re_file_dsc = re.compile(r'^(?P<package>[a-z0-9][a-z0-9\.\+-]+...
  re_file_source = re.compile(r'^(?P<package>[a-z0-9][a-z0-9\.\+...
  re_file_orig = re.compile(r'^(?P<package>[a-z0-9][a-z0-9\.\+-]...
  re_file_buildinfo = re.compile(r'^(?P<package>[a-z0-9][a-z0-9\...
  re_field_package = re.compile(r'^[a-z0-9][a-z0-9\.\+-]+$')
  re_field_version = re.compile(r'^(?:[0-9]+:)?(?P<without_epoch...
  re_field_version_upstream = re.compile(r'^(?:[0-9]+:)?(?P<upst...
  re_field_source = re.compile(r'^(?P<package>[a-z0-9][a-z0-9\.\...
  __package__ = 'daklib'

Imports: re


Variables Details [hide private]

orig_source_ext_re

Value:
'orig(?:-[a-zA-Z0-9-]+)?\\.tar\\.(?:gz|bz2|xz)(?:\\.asc)?'

file_source_ext_re

Value:
'(orig(?:-[a-zA-Z0-9-]+)?\\.tar\\.(?:gz|bz2|xz)(?:\\.asc)?|(?:debian\\\
.)?tar\\.(?:gz|bz2|xz)|diff\\.gz)'

re_source_ext

Value:
re.compile(r'((orig(?:-[a-zA-Z0-9-]+)?\.tar\.(?:gz|bz2|xz)(?:\.asc)?|(\
?:debian\.)?tar\.(?:gz|bz2|xz)|diff\.gz)|dsc)$')

re_issource

Value:
re.compile(r'(.+)_(.+?)\.((orig(?:-[a-zA-Z0-9-]+)?\.tar\.(?:gz|bz2|xz)\
(?:\.asc)?|(?:debian\.)?tar\.(?:gz|bz2|xz)|diff\.gz)|dsc)$')

re_verwithext

Value:
re.compile(r'^(\d+)(?:\.(\d+))(?:\s+\((\S+)\))?$')

re_changelog_versions

Value:
re.compile(r'^\w[-\+0-9a-z\.]+ \([^\(\) \t]+\)')

re_user_mails

Value:
re.compile(r'(?m)^(pub|uid):[^rdin].*<(.*@.*)>.*$')

re_parse_lintian

Value:
re.compile(r'^(?P<level>[WEO]): (?P<package>.*?): (?P<tag>[^ ]*) ?(?P<\
description>.*)$')

re_includeinrelease_byhash

Value:
re.compile(r'(Translation-[a-zA-Z_]+\.(?:bz2|xz|zst)|Contents-[0-9a-z-\
]+.gz|Index|Packages(.gz|bz2|xz|zst)?|Sources(.gz|bz2|xz|zst)?|Compone\
nts-[0-9a-z-]+.yml(.gz|xz)|icons-[0-9x-]+.tar(.gz|xz)|Release)$')

re_includeinpdiff

Value:
re.compile(r'(Translation-[a-zA-Z_]+\.(?:bz2|xz|zst))')

re_file_safe_slash

Value:
re.compile(r'^[a-zA-Z0-9][/a-zA-Z0-9_\.~\+-]*$')

_re_file_prefix

Value:
'^(?P<package>[a-z0-9][a-z0-9.+-]+)_(?P<version>[A-Za-z0-9.~+-]+?)'

re_file_binary

Value:
re.compile(r'^(?P<package>[a-z0-9][a-z0-9\.\+-]+)_(?P<version>[A-Za-z0\
-9\.~\+-]+?)_(?P<architecture>[a-z0-9-]+)\.(?P<type>u?deb)$')

re_file_changes

Value:
re.compile(r'^(?P<package>[a-z0-9][a-z0-9\.\+-]+)_(?P<version>[A-Za-z0\
-9\.~\+-]+?)_(?P<suffix>[a-zA-Z0-9\+-]+)\.changes$')

re_file_dsc

Value:
re.compile(r'^(?P<package>[a-z0-9][a-z0-9\.\+-]+)_(?P<version>[A-Za-z0\
-9\.~\+-]+?)\.dsc$')

re_file_source

Value:
re.compile(r'^(?P<package>[a-z0-9][a-z0-9\.\+-]+)_(?P<version>[A-Za-z0\
-9\.~\+-]+?)\.(orig(?:-[a-zA-Z0-9-]+)?\.tar\.(?:gz|bz2|xz)(?:\.asc)?|(\
?:debian\.)?tar\.(?:gz|bz2|xz)|diff\.gz)')

re_file_orig

Value:
re.compile(r'^(?P<package>[a-z0-9][a-z0-9\.\+-]+)_(?P<version>[A-Za-z0\
-9\.~\+-]+?)\.orig(?:-[a-zA-Z0-9-]+)?\.tar\.(?:gz|bz2|xz)(?:\.asc)?')

re_file_buildinfo

Value:
re.compile(r'^(?P<package>[a-z0-9][a-z0-9\.\+-]+)_(?P<version>[A-Za-z0\
-9\.~\+-]+?)_(?P<suffix>[a-zA-Z0-9\+-]+)\.buildinfo$')

re_field_version

Value:
re.compile(r'^(?:[0-9]+:)?(?P<without_epoch>[A-Za-z0-9\.:~\+-]+)$')

re_field_version_upstream

Value:
re.compile(r'^(?:[0-9]+:)?(?P<upstream>.*)-[^-]*$')

re_field_source

Value:
re.compile(r'^(?P<package>[a-z0-9][a-z0-9\.\+-]+)(?:\s*\((?P<version>[\
A-Za-z0-9\.:~\+-]+)\))?$')