summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/parse/ast.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index cb06e89179..cfead466e1 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -376,6 +376,27 @@ class AddFragmentsNode(AstNode):
376 376
377 if not fragments: 377 if not fragments:
378 return 378 return
379
380 # Check for multiple builtin fragments setting the same variable
381 for builtin_fragment_key in builtin_fragments.keys():
382 builtin_fragments_list = list(
383 filter(
384 lambda f: f.startswith(builtin_fragment_key + "/"),
385 fragments.split(),
386 )
387 )
388 if len(builtin_fragments_list) > 1:
389 bb.warn(
390 ("Multiple builtin fragments are enabled for %s via variable %s: %s. "
391 "This likely points to a mis-configuration in the metadata, as only "
392 "one of them should be set. The build will use the last value.")
393 % (
394 builtin_fragment_key,
395 self.fragments_variable,
396 " ".join(builtin_fragments_list),
397 )
398 )
399
379 for f in fragments.split(): 400 for f in fragments.split():
380 if check_and_set_builtin_fragment(f, data, builtin_fragments): 401 if check_and_set_builtin_fragment(f, data, builtin_fragments):
381 continue 402 continue