diff options
author | Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> | 2022-02-24 18:00:10 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-25 12:41:24 +0000 |
commit | 4fee926120f2c0b95483ad60b86bfd3084709072 (patch) | |
tree | 002c312c9fe4342277446a7cbd14d699bebf2c03 /meta/classes/rootfs-postcommands.bbclass | |
parent | fd2c86b06963345683ac5dc4f47f9da8e0c8c69d (diff) | |
download | poky-4fee926120f2c0b95483ad60b86bfd3084709072.tar.gz |
classes: rootfs-postcommands: avoid exception in overlayfs_qa_check
The overlayfs_qa_check in the rootfs-postcommands class throws an
exception if the overlayfs distro feature is enabled but no global
OVERLAYFS_MOUNT_POINT is specifived.
File: '/home/stefan/dalos-linutronix/poky/meta/classes/rootfs-postcommands.bbclass', lineno: 389, function: overlayfs_qa_check
0385: searchpaths = [oe.path.join(imagepath, d.getVar("sysconfdir"), "systemd", "system"),
0386: oe.path.join(imagepath, d.getVar("systemd_system_unitdir"))]
0387:
0388: allUnitExist = True;
*** 0389: for mountPoint in overlayMountPoints:
0390: path = d.getVarFlag('OVERLAYFS_MOUNT_POINT', mountPoint)
0391: unit = mountUnitName(path)
0392:
0393: if not any(os.path.isfile(oe.path.join(dirpath, unit))
Exception: TypeError: 'NoneType' object is not iterable
(From OE-Core rev: 4396348c24efb1185d68876d3cf6ade90324dee5)
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rootfs-postcommands.bbclass')
-rw-r--r-- | meta/classes/rootfs-postcommands.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass index 74035c30b7..cd8986d8a9 100644 --- a/meta/classes/rootfs-postcommands.bbclass +++ b/meta/classes/rootfs-postcommands.bbclass | |||
@@ -380,7 +380,7 @@ python overlayfs_qa_check() { | |||
380 | from oe.overlayfs import mountUnitName | 380 | from oe.overlayfs import mountUnitName |
381 | 381 | ||
382 | # this is a dumb check for unit existence, not its validity | 382 | # this is a dumb check for unit existence, not its validity |
383 | overlayMountPoints = d.getVarFlags("OVERLAYFS_MOUNT_POINT") | 383 | overlayMountPoints = d.getVarFlags("OVERLAYFS_MOUNT_POINT") or {} |
384 | imagepath = d.getVar("IMAGE_ROOTFS") | 384 | imagepath = d.getVar("IMAGE_ROOTFS") |
385 | searchpaths = [oe.path.join(imagepath, d.getVar("sysconfdir"), "systemd", "system"), | 385 | searchpaths = [oe.path.join(imagepath, d.getVar("sysconfdir"), "systemd", "system"), |
386 | oe.path.join(imagepath, d.getVar("systemd_system_unitdir"))] | 386 | oe.path.join(imagepath, d.getVar("systemd_system_unitdir"))] |