debian/bin/buildcheck.py: Interpret ABI patterns more conventionally

Currently '*' and '**' match at least one character.  Change them to
match zero or more characters, as in shell patterns.

'*' matches anything but '!', but that has no special meaning in
symbol names or module filenames.  Change it to match anything but
'/', as in shell patterns.
This commit is contained in:
Ben Hutchings 2017-10-13 01:39:24 +01:00
parent db9c353a75
commit 5872c32060
1 changed files with 2 additions and 2 deletions

View File

@ -139,9 +139,9 @@ class CheckAbi(object):
ret = []
for i in re.split(r'(\*\*?)', pattern):
if i == '*':
ret.append(r'[^!]+')
ret.append(r'[^/]*')
elif i == '**':
ret.append(r'.+')
ret.append(r'.*')
elif i:
ret.append(re.escape(i))
return re.compile('^' + ''.join(ret) + '$')