bitbake: cooker: detect malformed BBMASK expressions which begin with a separator
When constructing an older style single regex, it's possible for BBMASK to end up beginning with '|', which matches and masks _everything_. (Bitbake rev: 56ad67017e601c7e0f6085ca84e29c28d8d4519f) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
6cfc1c83b9
commit
7ab8b6558c
|
@ -1900,6 +1900,11 @@ class CookerCollectFiles(object):
|
||||||
# that do not compile
|
# that do not compile
|
||||||
bbmasks = []
|
bbmasks = []
|
||||||
for mask in bbmask.split():
|
for mask in bbmask.split():
|
||||||
|
# When constructing an older style single regex, it's possible for BBMASK
|
||||||
|
# to end up beginning with '|', which matches and masks _everything_.
|
||||||
|
if mask.startswith("|"):
|
||||||
|
collectlog.warn("BBMASK contains regular expression beginning with '|', fixing: %s" % mask)
|
||||||
|
mask = mask[1:]
|
||||||
try:
|
try:
|
||||||
re.compile(mask)
|
re.compile(mask)
|
||||||
bbmasks.append(mask)
|
bbmasks.append(mask)
|
||||||
|
|
Loading…
Reference in New Issue