Skip to contentSkip to conversation

cooker: warn if user specifies a target listed in ASSUME_PROVIDED

PATCH New Paul Eggleton 1 participant 1 message Nov 14, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cooker: warn if user specifies a target listed in ASSUME_PROVIDED

If the user explicitly asks to build a target that is listed in the value of ASSUME_PROVIDED, show a warning mentioning that it will be ignored.

---
 lib/bb/cooker.py | 5 +++++
 1 file changed, 5 insertions(+)
lib/bb/cooker.py +5 -0
index 0580cd5..267d19e 100644
@@ -1268,6 +1268,11 @@ class BBCooker:
         if len(pkgs_to_build) == 0:
             raise NothingToBuild
 
+        ignore = (self.data.getVar("ASSUME_PROVIDED", True) or "").split()
+        for pkg in pkgs_to_build:
+            if pkg in ignore:
+                parselog.warn("Explicit target \"%s\" is in ASSUME_PROVIDED, ignoring" % pkg)
+
         if 'world' in pkgs_to_build:
             self.buildWorldTargetList()
             pkgs_to_build.remove('world')
Signature · 1 line
1.8.1.2