From d7eb2f04ceaa42082294fe05a79e0bc77a817831 Mon Sep 17 00:00:00 2001 From: Chris Lamb Date: Sun, 9 Aug 2009 04:22:04 +0100 Subject: [PATCH] Correct regex for 822 value fields that begin with a colon character Previously, we parsed "colon: :" => ("colon:", "") and "lol: :lol" => ("lol:", "lol"). This commit changes these parses to ("colon", "") and ("lol", ":lol") respectfully. Fields starting with colons can happen with values containing CVS locations. eg: Vcs-Cvs: :ext:_anoncvs@anoncvs.mirbsd.org:/cvs contrib/hosted/tg/deb/makefs (from /srv/ftp.debian.org/queue/new/makefs_20090808-1.dsc) This is causing a traceback when examining this package as the regex to strip the keys in read_changes_or_dsc(..) works differently to this one. Signed-off-by: Chris Lamb --- daklib/regexes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daklib/regexes.py b/daklib/regexes.py index 6fd0c81d..d1f0d381 100755 --- a/daklib/regexes.py +++ b/daklib/regexes.py @@ -44,7 +44,7 @@ re_isadeb = re.compile (r"(.+?)_(.+?)_(.+)\.u?deb$") re_issource = re.compile (r"(.+)_(.+?)\.(orig\.tar\.gz|diff\.gz|tar\.gz|dsc)$") -re_single_line_field = re.compile(r"^(\S*)\s*:\s*(.*)") +re_single_line_field = re.compile(r"^(\S*?)\s*:\s*(.*)") re_multi_line_field = re.compile(r"^\s(.*)") re_taint_free = re.compile(r"^[-+~/\.\w]+$") -- 2.39.5