]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: cooker: detect malformed BBMASK expressions which begin with a separator
authorAndre McCurdy <armccurdy@gmail.com>
Wed, 1 Feb 2017 21:09:16 +0000 (13:09 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 19 Feb 2017 14:28:46 +0000 (06:28 -0800)
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>
bitbake/lib/bb/cooker.py

index ce84e1c7459a33793eef24a45813182bed12839f..662a7ac071854203db7ae0426b002ea5f406dcff 100644 (file)
@@ -1900,6 +1900,11 @@ class CookerCollectFiles(object):
             # that do not compile
             bbmasks = []
             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:
                     re.compile(mask)
                     bbmasks.append(mask)