Don't inherit image-overlay by default
This attempts to address a race condition in the build where
we attempt to build a complete flash image before all the sub-images
are available (specifically the initramfs image).
Any classes in IMAGE_CLASSES are inherited by all image recipes, including
the initramfs image. OE-Core's live/hddimg recipes address this
by pulling in the class configuration in recipe scope, rather than
global scope. Copy that behavior here.
diff --git a/classes/obmc-phosphor-image.bbclass b/classes/obmc-phosphor-image.bbclass
index 811bbd3..0d4a0d0 100644
--- a/classes/obmc-phosphor-image.bbclass
+++ b/classes/obmc-phosphor-image.bbclass
@@ -42,3 +42,10 @@
i2c-tools \
screen \
"
+
+def build_overlay(d):
+ if bb.utils.contains("IMAGE_FSTYPES", "overlay", "overlay", "0", d) != "0":
+ return "image-overlay"
+ return ""
+
+inherit ${@build_overlay(d)}