From 9fb4bb1d883fd590492fef0659a13e2379bf2909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Wed, 30 Jul 2008 16:49:48 +0000 Subject: [PATCH] Kludge for dependency token parsing within multiline macro definitions, https://bugzilla.redhat.com/456843 git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1447 9bc8b190-ac0f-0410-8968-dc7d1f502856 --- SpecCheck.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/SpecCheck.py b/SpecCheck.py index c877479d..d4c5dbf7 100644 --- a/SpecCheck.py +++ b/SpecCheck.py @@ -80,7 +80,18 @@ def deptokens(line): prco = [] tmp = '' wantmore = 0 - for tok in re.split('[\s,]+', line.strip()): + toks = re.split('[\s,]+', line.strip()) + + # Drop line continuation backslash in multiline macro definition, eg. + # [...] \ + # Obsoletes: foo-%1 <= 1.0.0 \ + # [...] \ + # (yes, this is an ugly hack and we probably have other problems with + # multiline macro definitions elsewhere...) + if toks[-1] == '\\': + del toks[-1] + + for tok in toks: if len(tok) == 0: continue if len(tmp) == 0: