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
This commit is contained in:
Ville Skyttä 2008-07-30 16:49:48 +00:00
parent 2677a540b6
commit 9fb4bb1d88
1 changed files with 12 additions and 1 deletions

View File

@ -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: