summaryrefslogtreecommitdiffstats
path: root/meta
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-11-04 23:31:49 +0000
commitcc4b3a0040234b9fa30ed3fe7a8d068ed53192bc (patch)
treeddf4b0c4cf69973d5bfbde65f187c68c3d02202c /meta
parent900420392db750ede745461187e3307d56d96a37 (diff)
downloadpoky-cc4b3a0040234b9fa30ed3fe7a8d068ed53192bc.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: c7c6b273656a3e2b8b959004b996e56d4086ce5e) Signed-off-by: Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> (cherry picked from commit a9c604b5e0d943b5b5f7c8bdd5be730c2abcf866) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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