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:
parent
2677a540b6
commit
9fb4bb1d88
13
SpecCheck.py
13
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:
|
||||
|
|
Loading…
Reference in New Issue