Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit 3fa040c

Browse files
committed
refkit-sanity.bbclass: simplify error diagnosis
When there is a dangling symlink, the resulting error message did not make it clear how to suppress the error for valid symlinks. Now it mentions REFKIT_QA_IMAGE_SYMLINK_WHITELIST and what was checked for in it. The path resolution uses the same string before giving the full path on the build host. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
1 parent 3d6f5b4 commit 3fa040c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

meta-refkit-core/classes/refkit-sanity.bbclass

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ python refkit_qa_image () {
4646
if os.path.islink(path):
4747
target = os.readlink(path)
4848
final_target = resolve_links(target, root)
49-
if not os.path.exists(final_target) and not final_target[len(rootfs):] in whitelist:
50-
bb.error("Dangling symlink: %s -> %s -> %s does not resolve to a valid filesystem entry." %
51-
(path, target, final_target))
49+
local_target = final_target[len(rootfs):]
50+
if not os.path.exists(final_target) and not local_target in whitelist:
51+
bb.error("Dangling symlink: %s -> %s -> %s (= %s) does not resolve to a valid filesystem entry and %s not in REFKIT_QA_IMAGE_SYMLINK_WHITELIST." %
52+
(path, target, local_target, final_target, local_target))
5253
qa_sane = False
5354

5455
if not qa_sane:

0 commit comments

Comments
 (0)