diff options
| author | Vyacheslav Yurkov <Vyacheslav.Yurkov@bruker.com> | 2022-10-05 13:14:02 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-11-09 17:42:08 +0000 |
| commit | 75be860f340504d4368a9f59259bc8d6685735de (patch) | |
| tree | ca17d609f627ee2a9cf4bc7917f1b05b2a053b76 /meta | |
| parent | 67b2d0267a50d7e87e2f24aa3ea61a63bc560f66 (diff) | |
| download | poky-75be860f340504d4368a9f59259bc8d6685735de.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: 89d83920dc7f80abb20fadde97b47aba9cd992cc)
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>
(cherry picked from commit c7c6b273656a3e2b8b959004b996e56d4086ce5e)
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/overlayfs.bbclass | 6 | ||||
| -rw-r--r-- | meta/lib/oe/overlayfs.py | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/meta/classes/overlayfs.bbclass b/meta/classes/overlayfs.bbclass index f7069edd41..c3564b6ec1 100644 --- a/meta/classes/overlayfs.bbclass +++ b/meta/classes/overlayfs.bbclass | |||
| @@ -96,7 +96,11 @@ python do_create_overlayfs_units() { | |||
| 96 | overlayMountPoints = d.getVarFlags("OVERLAYFS_MOUNT_POINT") | 96 | overlayMountPoints = d.getVarFlags("OVERLAYFS_MOUNT_POINT") |
| 97 | for mountPoint in overlayMountPoints: | 97 | for mountPoint in overlayMountPoints: |
| 98 | bb.debug(1, "Process variable flag %s" % mountPoint) | 98 | bb.debug(1, "Process variable flag %s" % mountPoint) |
| 99 | for lower in d.getVarFlag('OVERLAYFS_WRITABLE_PATHS', mountPoint).split(): | 99 | lowerList = d.getVarFlag('OVERLAYFS_WRITABLE_PATHS', mountPoint) |
| 100 | if not lowerList: | ||
| 101 | bb.note("No mount points defined for %s flag, skipping" % (mountPoint)) | ||
| 102 | continue | ||
| 103 | for lower in lowerList.split(): | ||
| 100 | bb.debug(1, "Prepare mount unit for %s with data mount point %s" % | 104 | bb.debug(1, "Prepare mount unit for %s with data mount point %s" % |
| 101 | (lower, d.getVarFlag('OVERLAYFS_MOUNT_POINT', mountPoint))) | 105 | (lower, d.getVarFlag('OVERLAYFS_MOUNT_POINT', mountPoint))) |
| 102 | prepareUnits(d.getVarFlag('OVERLAYFS_MOUNT_POINT', mountPoint), lower) | 106 | prepareUnits(d.getVarFlag('OVERLAYFS_MOUNT_POINT', mountPoint), lower) |
diff --git a/meta/lib/oe/overlayfs.py b/meta/lib/oe/overlayfs.py index b5d5e88e80..590c0de58a 100644 --- a/meta/lib/oe/overlayfs.py +++ b/meta/lib/oe/overlayfs.py | |||
| @@ -38,7 +38,11 @@ def unitFileList(d): | |||
| 38 | bb.fatal("Missing required mount point for OVERLAYFS_MOUNT_POINT[%s] in your MACHINE configuration" % mountPoint) | 38 | bb.fatal("Missing required mount point for OVERLAYFS_MOUNT_POINT[%s] in your MACHINE configuration" % mountPoint) |
| 39 | 39 | ||
| 40 | for mountPoint in overlayMountPoints: | 40 | for mountPoint in overlayMountPoints: |
| 41 | for path in d.getVarFlag('OVERLAYFS_WRITABLE_PATHS', mountPoint).split(): | 41 | mountPointList = d.getVarFlag('OVERLAYFS_WRITABLE_PATHS', mountPoint) |
| 42 | if not mountPointList: | ||
| 43 | bb.debug(1, "No mount points defined for %s flag, don't add to file list", mountPoint) | ||
| 44 | continue | ||
| 45 | for path in mountPointList.split(): | ||
| 42 | fileList.append(mountUnitName(path)) | 46 | fileList.append(mountUnitName(path)) |
| 43 | fileList.append(helperUnitName(path)) | 47 | fileList.append(helperUnitName(path)) |
| 44 | 48 | ||
