]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
lib/bb/cooker.py: fix for BBFILE_PATTERN = ""
authorRobert Yang <liezhi.yang@windriver.com>
Thu, 27 Oct 2016 08:50:18 +0000 (01:50 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 4 Nov 2016 12:50:29 +0000 (12:50 +0000)
There would be error when BBFILE_PATTERN = None:
  BBFILE_PATTERN_foo not defined

This is the correct behaviour, but when the layer sets BBFILE_PATTERN = "",
it would match all the remaining recipes, and cause "No bb files matched BBFILE_PATTERN"
warnings for all the layers which behind it.

When a layer sets BBFILE_PATTERN = "" (for example, a layer only
provides git repos and source tarballs), now it means has no recipes.
This is different from BBFILE_PATTERN_IGNORE_EMPTY, the later one means
that it *may* not have any recipes.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/cooker.py

index 42831e2771765cae1bee544026bd5c36230d335b..c08af4593fbabf02227772f33524ca07f07626d7 100644 (file)
@@ -1240,6 +1240,10 @@ class BBCooker:
                     parselog.error("BBFILE_PATTERN_%s not defined" % c)
                     errors = True
                     continue
+                elif regex == "":
+                    parselog.debug(1, "BBFILE_PATTERN_%s is empty" % c)
+                    errors = False
+                    continue
                 try:
                     cre = re.compile(regex)
                 except re.error: