summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com>2022-10-05 13:14:02 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-10-26 12:28:37 +0100
commit2eb933bb8c920a3aec71e353cdd8b3b145aec00c (patch)
treeeaf88b0b61412ab110a5aa7d61fa914df88d97d7
parent2cd51cfe9989f8c259f7a38858f73bad76a24086 (diff)
downloadpoky-2eb933bb8c920a3aec71e353cdd8b3b145aec00c.tar.gz
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 <Vyacheslav.Yurkov@bruker.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes-recipe/overlayfs.bbclass6
-rw-r--r--meta/lib/oe/overlayfs.py6
2 files changed, 10 insertions, 2 deletions
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() {
102 overlayMountPoints = d.getVarFlags("OVERLAYFS_MOUNT_POINT") 102 overlayMountPoints = d.getVarFlags("OVERLAYFS_MOUNT_POINT")
103 for mountPoint in overlayMountPoints: 103 for mountPoint in overlayMountPoints:
104 bb.debug(1, "Process variable flag %s" % mountPoint) 104 bb.debug(1, "Process variable flag %s" % mountPoint)
105 for lower in d.getVarFlag('OVERLAYFS_WRITABLE_PATHS', mountPoint).split(): 105 lowerList = d.getVarFlag('OVERLAYFS_WRITABLE_PATHS', mountPoint)
106 if not lowerList:
107 bb.note("No mount points defined for %s flag, skipping" % (mountPoint))
108 continue
109 for lower in lowerList.split():
106 bb.debug(1, "Prepare mount unit for %s with data mount point %s" % 110 bb.debug(1, "Prepare mount unit for %s with data mount point %s" %
107 (lower, d.getVarFlag('OVERLAYFS_MOUNT_POINT', mountPoint))) 111 (lower, d.getVarFlag('OVERLAYFS_MOUNT_POINT', mountPoint)))
108 prepareUnits(d.getVarFlag('OVERLAYFS_MOUNT_POINT', mountPoint), lower) 112 prepareUnits(d.getVarFlag('OVERLAYFS_MOUNT_POINT', mountPoint), lower)
diff --git a/meta/lib/oe/overlayfs.py b/meta/lib/oe/overlayfs.py
index 8d7a047125..8b88900f71 100644
--- a/meta/lib/oe/overlayfs.py
+++ b/meta/lib/oe/overlayfs.py
@@ -40,7 +40,11 @@ def unitFileList(d):
40 bb.fatal("Missing required mount point for OVERLAYFS_MOUNT_POINT[%s] in your MACHINE configuration" % mountPoint) 40 bb.fatal("Missing required mount point for OVERLAYFS_MOUNT_POINT[%s] in your MACHINE configuration" % mountPoint)
41 41
42 for mountPoint in overlayMountPoints: 42 for mountPoint in overlayMountPoints:
43 for path in d.getVarFlag('OVERLAYFS_WRITABLE_PATHS', mountPoint).split(): 43 mountPointList = d.getVarFlag('OVERLAYFS_WRITABLE_PATHS', mountPoint)
44 if not mountPointList:
45 bb.debug(1, "No mount points defined for %s flag, don't add to file list", mountPoint)
46 continue
47 for path in mountPointList.split():
44 fileList.append(mountUnitName(path)) 48 fileList.append(mountUnitName(path))
45 fileList.append(helperUnitName(path)) 49 fileList.append(helperUnitName(path))
46 50