diff options
-rw-r--r-- | lib/bb/cooker.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index ce84e1c74..662a7ac07 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -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) |