From 6dfe291284c6667e44733e06f820bf9546d4702b Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 14 Oct 2024 11:05:59 +0100 Subject: insane: Don't used cachedpath for os.lstat() The functions behave slightly differently to the functions they're caching and the use in insane.bbclass isn't compatible. For now, to avoid build failures, switch back to the stat calls. We may be able to improve cachedpath or change the call sites. (From OE-Core rev: fa771ae887ab5152f043748cf3419735831bcf7b) Signed-off-by: Richard Purdie --- meta/classes-global/insane.bbclass | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'meta/classes-global/insane.bbclass') diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index 36b139a20d..efcfa08d2e 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass @@ -434,9 +434,8 @@ def package_qa_check_buildpaths(path, name, d, elf): explicitly ignored. """ import stat - global cpath # Ignore symlinks/devs/fifos - mode = cpath.lstat(path).st_mode + mode = os.lstat(path).st_mode if stat.S_ISLNK(mode) or stat.S_ISBLK(mode) or stat.S_ISFIFO(mode) or stat.S_ISCHR(mode) or stat.S_ISSOCK(mode): return @@ -1050,7 +1049,7 @@ def package_qa_check_host_user(path, name, d, elf): return try: - stat = cpath.lstat(path) + stat = os.lstat(path) except OSError as exc: import errno if exc.errno != errno.ENOENT: -- cgit v1.2.3-54-g00ecf