From: Pavel Zhukov Date: Fri, 9 Feb 2024 19:27:28 +0000 (+0100) Subject: systemd.bbclass: Check for existence of the symlink too X-Git-Tag: yocto-5.2~3726 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e2b638dcd6b7c51f7ee2cd4bc051d6b12e642d6c;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git systemd.bbclass: Check for existence of the symlink too If the packages' service file is a link to parameterized service file provided by different package [1] then link is dangling link at do_package stage and os.path.exists(path) returns False even if the link exists. Replace os.path.exists with lexists to fix this issue. [1] An example: Package A provides myservice@.service Package B depends and rdepends on A and provides: myservice@B.service -> myservice@.service Signed-off-by: Pavel Zhukov Signed-off-by: Richard Purdie --- diff --git a/meta/classes-recipe/systemd.bbclass b/meta/classes-recipe/systemd.bbclass index 9a16babe434..48b364c1d4d 100644 --- a/meta/classes-recipe/systemd.bbclass +++ b/meta/classes-recipe/systemd.bbclass @@ -170,7 +170,7 @@ python systemd_populate_packages() { base = service[:at] + '@' + service[ext:] for path in searchpaths: - if os.path.exists(oe.path.join(d.getVar("D"), path, service)): + if os.path.lexists(oe.path.join(d.getVar("D"), path, service)): path_found = path break elif base is not None: