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: diff --git a/meta/lib/oe/cachedpath.py b/meta/lib/oe/cachedpath.py index 0138b791d4..68c85807d9 100644 --- a/meta/lib/oe/cachedpath.py +++ b/meta/lib/oe/cachedpath.py @@ -111,9 +111,13 @@ class CachedPath(object): return True return False + # WARNING - this is not currently a drop in replacement since they return False + # rather than raise exceptions. def stat(self, path): return self.callstat(path) + # WARNING - this is not currently a drop in replacement since they return False + # rather than raise exceptions. def lstat(self, path): return self.calllstat(path)