summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2016-04-01 12:57:58 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-03 15:53:44 +0100
commit158575c73860c293dae49a5c38d3211c567a83d1 (patch)
tree61630350e9192f47cec0462cc69c47871b2715ab /bitbake
parentc634473ed3122295483699cd3fe697c56ea5a946 (diff)
downloadpoky-158575c73860c293dae49a5c38d3211c567a83d1.tar.gz
bitbake: toaster: orm better detect requires during CustomImageRecipe generation
We were doing a string search for the literal string "require" and assuming that a match meant the recipe uses the require keyword to include the contents of another recipe. This test isn't very smart (it should at least have matched on "require ") and triggers on the word require anywhere in the recipe, i.e. the word "required" in the DESCRIPTION of core-image-lsb.bb, and then breaks as the much smarter regex fails to match anything. Instead always run the regex search and only try to update the require entry when the regex matches. (Bitbake rev: a6add0e95d3d1e9a6a9fcabd73543bc5c278915f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/toaster/orm/models.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/bitbake/lib/toaster/orm/models.py b/bitbake/lib/toaster/orm/models.py
index 08b1a7ca0d..d3277efb1f 100644
--- a/bitbake/lib/toaster/orm/models.py
+++ b/bitbake/lib/toaster/orm/models.py
@@ -1548,11 +1548,10 @@ class CustomImageRecipe(Recipe):
1548 # "require core-image-minimal.bb" is changed to: 1548 # "require core-image-minimal.bb" is changed to:
1549 # "require recipes-core/images/core-image-minimal.bb" 1549 # "require recipes-core/images/core-image-minimal.bb"
1550 1550
1551 if "require" in base_recipe: 1551 req_search = re.search(r'(require\s+)(.+\.bb\s*$)',
1552 req_search = re.search(r'(require\s+)(.+\.bb\s*$)',
1553 base_recipe, 1552 base_recipe,
1554 re.MULTILINE) 1553 re.MULTILINE)
1555 1554 if req_search:
1556 require_filename = req_search.group(2).strip() 1555 require_filename = req_search.group(2).strip()
1557 1556
1558 corrected_location = Recipe.objects.filter( 1557 corrected_location = Recipe.objects.filter(