Skip to contentSkip to conversation

cooker.py: Fix layer priority processing

PATCH New Mark Hatle 1 participant 1 message Sep 2, 2017

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

PATCH 1/1 cooker.py: Fix layer priority processing

If you have a layer with a blank BBFILE_PATTERN the layer was ignored when processing the list of layers with priorities. This list is not only used for processing recipes, but also by additional programs such as bitbake-layers show-layers.

Without this change, a layer that provides configuration or classes only does now show up in show-layers, which is used by the yocto-compat-layer.py script. This causes a failures in the compatibility check.

---
 lib/bb/cooker.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
lib/bb/cooker.py +7 -7
index f5ae831..90de40d 100644
@@ -1171,13 +1171,13 @@ class BBCooker:
                 elif regex == "":
                     parselog.debug(1, "BBFILE_PATTERN_%s is empty" % c)
                     errors = False
-                    continue
-                try:
-                    cre = re.compile(regex)
-                except re.error:
-                    parselog.error("BBFILE_PATTERN_%s \"%s\" is not a valid regular expression", c, regex)
-                    errors = True
-                    continue
+                else:
+                    try:
+                        cre = re.compile(regex)
+                    except re.error:
+                        parselog.error("BBFILE_PATTERN_%s \"%s\" is not a valid regular expression", c, regex)
+                        errors = True
+                        continue
                 self.bbfile_config_priorities.append((c, regex, cre, collection_priorities[c]))
         if errors:
             # We've already printed the actual error(s)
Signature · 1 line
1.8.3.1