]> code.ossystems Code Review - openembedded-core.git/commit
classes: rootfs-postcommands: avoid exception in overlayfs_qa_check
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Thu, 24 Feb 2022 17:00:10 +0000 (18:00 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 25 Feb 2022 12:39:00 +0000 (12:39 +0000)
commit4396348c24efb1185d68876d3cf6ade90324dee5
tree25368b4884e56f832d823ad2f23e4d4cdeaa5b79
parent6e12ee5f7871150c11dac754145d146ed364b506
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

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/rootfs-postcommands.bbclass