summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-14 21:05:10 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-28 11:51:03 +0000
commit5fd44938fd80021d4be54e653cf0532baec5fc8e (patch)
treec62e1c4ec70229adad31b02f2c185faeb1f8a0c7 /meta/lib
parent167bd3e6b64099792aa8136ba559295d9c56b795 (diff)
downloadpoky-5fd44938fd80021d4be54e653cf0532baec5fc8e.tar.gz
sstatesig: Improve debug output if getpwuid() fails
If getpwduid fails, we don't see which file it failed on which is key information to aid debugging. Print this information when exceptions are raised. (From OE-Core rev: 2bba0052597020ea887c84419440df11f9859283) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9d7a5219713af8117eda145052c6d9abdf577d8f) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/sstatesig.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index 24a221eb1a..b2316b12b8 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -521,8 +521,12 @@ def OEOuthashBasic(path, sigfile, task, d):
521 add_perm(stat.S_IXOTH, 'x') 521 add_perm(stat.S_IXOTH, 'x')
522 522
523 if include_owners: 523 if include_owners:
524 update_hash(" %10s" % pwd.getpwuid(s.st_uid).pw_name) 524 try:
525 update_hash(" %10s" % grp.getgrgid(s.st_gid).gr_name) 525 update_hash(" %10s" % pwd.getpwuid(s.st_uid).pw_name)
526 update_hash(" %10s" % grp.getgrgid(s.st_gid).gr_name)
527 except KeyError:
528 bb.warn("KeyError in %s" % path)
529 raise
526 530
527 update_hash(" ") 531 update_hash(" ")
528 if stat.S_ISBLK(s.st_mode) or stat.S_ISCHR(s.st_mode): 532 if stat.S_ISBLK(s.st_mode) or stat.S_ISCHR(s.st_mode):