From 2eb933bb8c920a3aec71e353cdd8b3b145aec00c Mon Sep 17 00:00:00 2001 From: Vyacheslav Yurkov Date: Wed, 5 Oct 2022 13:14:02 +0200 Subject: overlayfs: Allow not used mount points When machine configuration defines a mount point, which is not used in any recipe, allow to fall through and only report a note in the logs. This can be expected behavior, when a mount point is defined for several machines, but not used in all of them (From OE-Core rev: a9c604b5e0d943b5b5f7c8bdd5be730c2abcf866) Signed-off-by: Vyacheslav Yurkov Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie --- meta/classes-recipe/overlayfs.bbclass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'meta/classes-recipe') diff --git a/meta/classes-recipe/overlayfs.bbclass b/meta/classes-recipe/overlayfs.bbclass index bdc6dd9d57..53d65d7531 100644 --- a/meta/classes-recipe/overlayfs.bbclass +++ b/meta/classes-recipe/overlayfs.bbclass @@ -102,7 +102,11 @@ python do_create_overlayfs_units() { overlayMountPoints = d.getVarFlags("OVERLAYFS_MOUNT_POINT") for mountPoint in overlayMountPoints: bb.debug(1, "Process variable flag %s" % mountPoint) - for lower in d.getVarFlag('OVERLAYFS_WRITABLE_PATHS', mountPoint).split(): + lowerList = d.getVarFlag('OVERLAYFS_WRITABLE_PATHS', mountPoint) + if not lowerList: + bb.note("No mount points defined for %s flag, skipping" % (mountPoint)) + continue + for lower in lowerList.split(): bb.debug(1, "Prepare mount unit for %s with data mount point %s" % (lower, d.getVarFlag('OVERLAYFS_MOUNT_POINT', mountPoint))) prepareUnits(d.getVarFlag('OVERLAYFS_MOUNT_POINT', mountPoint), lower) -- cgit v1.2.3-54-g00ecf