mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 03:32:12 +02:00
sstatesig: be more precise and show the full path in exceptions
Also remove the warning than doesn't make sense as the code will generate an exception and bitbake will abort. Before: | WARNING: core-image-minimal-initramfs-1.0-r0 do_image_complete: KeyError in . | Exception: Exception: KeyError: 'getpwuid(): uid not found: xxxxx' | Path . is owned by uid xxxxx, gid yyy, which doesn't match any user/group on target. This may be due to host contamination. After: | Exception: Exception: KeyError: 'getpwuid(): uid not found: xxxxx' | Path /build/tmp/work/intel_corei7_64-lmp-linux/core-image-minimal-initramfs/1.0-r0/sstate-build-image_complete is owned by uid xxxxx, gid yyy, which doesn't match any user/group on target. This may be due to host contamination. (From OE-Core rev: 90f84e345950a02bf91f823cc9c6d893e7cd1100) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
70eddc70f8
commit
f784681413
@@ -598,9 +598,9 @@ def OEOuthashBasic(path, sigfile, task, d):
|
||||
update_hash(" %10s" % pwd.getpwuid(s.st_uid).pw_name)
|
||||
update_hash(" %10s" % grp.getgrgid(s.st_gid).gr_name)
|
||||
except KeyError as e:
|
||||
bb.warn("KeyError in %s" % path)
|
||||
msg = ("KeyError: %s\nPath %s is owned by uid %d, gid %d, which doesn't match "
|
||||
"any user/group on target. This may be due to host contamination." % (e, path, s.st_uid, s.st_gid))
|
||||
"any user/group on target. This may be due to host contamination." %
|
||||
(e, os.path.abspath(path), s.st_uid, s.st_gid))
|
||||
raise Exception(msg).with_traceback(e.__traceback__)
|
||||
|
||||
if include_timestamps:
|
||||
|
||||
Reference in New Issue
Block a user