mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 09:49:33 +02:00
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 <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -434,9 +434,8 @@ def package_qa_check_buildpaths(path, name, d, elf):
|
|||||||
explicitly ignored.
|
explicitly ignored.
|
||||||
"""
|
"""
|
||||||
import stat
|
import stat
|
||||||
global cpath
|
|
||||||
# Ignore symlinks/devs/fifos
|
# 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):
|
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
|
return
|
||||||
|
|
||||||
@@ -1050,7 +1049,7 @@ def package_qa_check_host_user(path, name, d, elf):
|
|||||||
return
|
return
|
||||||
|
|
||||||
try:
|
try:
|
||||||
stat = cpath.lstat(path)
|
stat = os.lstat(path)
|
||||||
except OSError as exc:
|
except OSError as exc:
|
||||||
import errno
|
import errno
|
||||||
if exc.errno != errno.ENOENT:
|
if exc.errno != errno.ENOENT:
|
||||||
|
|||||||
@@ -111,9 +111,13 @@ class CachedPath(object):
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
# WARNING - this is not currently a drop in replacement since they return False
|
||||||
|
# rather than raise exceptions.
|
||||||
def stat(self, path):
|
def stat(self, path):
|
||||||
return self.callstat(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):
|
def lstat(self, path):
|
||||||
return self.calllstat(path)
|
return self.calllstat(path)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user