Skip to content

Commit

Permalink
wafsamba: fix samba_abi for default catch-all case
Browse files Browse the repository at this point in the history
Only filter out the symbol when positive match was not found and there is
negative match.

ABI signature file generator worked incorrectly for cases when mixture of
positive and negative matches were provided. This resulted in generating empty
signature file for libpdb since there was no catch-all positive match anymore.

Commit 9ba44cc removed explicit '*' positive
match and corresponding vscript generator adds '*' by default if global match
list is empty, so this commit introduces feature parity into signature
generator.

Reviewed-by: Andreas Schneider <[email protected]>
  • Loading branch information
abbra authored and cryptomilk committed Apr 9, 2013
1 parent 28da1af commit 6058bc9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion buildtools/wafsamba/samba_abi.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,15 @@ def parse_sigs(sigs, abi_match):
sa = s.split(':')
if abi_match:
matched = False
negative = False
for p in abi_match:
if p[0] == '!' and fnmatch.fnmatch(sa[0], p[1:]):
negative = True
break
elif fnmatch.fnmatch(sa[0], p):
matched = True
break
if not matched:
if (not matched) and negative:
continue
Logs.debug("%s -> %s" % (sa[1], normalise_signature(sa[1])))
ret[sa[0]] = normalise_signature(sa[1])
Expand Down

0 comments on commit 6058bc9

Please sign in to comment.