summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2017-02-01 13:09:16 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-19 06:28:46 -0800
commit7ab8b6558c568399769cfbad4e480981558768d9 (patch)
tree02fe5e5a4419bd89d476307b891051fce2c1dc09 /bitbake
parent6cfc1c83b90c9c9dd5290749aed49896327739e6 (diff)
downloadpoky-7ab8b6558c568399769cfbad4e480981558768d9.tar.gz
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>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cooker.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index ce84e1c745..662a7ac071 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -1900,6 +1900,11 @@ class CookerCollectFiles(object):
1900 # that do not compile 1900 # that do not compile
1901 bbmasks = [] 1901 bbmasks = []
1902 for mask in bbmask.split(): 1902 for mask in bbmask.split():
1903 # When constructing an older style single regex, it's possible for BBMASK
1904 # to end up beginning with '|', which matches and masks _everything_.
1905 if mask.startswith("|"):
1906 collectlog.warn("BBMASK contains regular expression beginning with '|', fixing: %s" % mask)
1907 mask = mask[1:]
1903 try: 1908 try:
1904 re.compile(mask) 1909 re.compile(mask)
1905 bbmasks.append(mask) 1910 bbmasks.append(mask)