summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/sstatesig.py
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-16 22:33:09 +0000
commitecbf203e34484731dcb6acc5e75df79cb86e55dc (patch)
tree782a22389dc0fdd1bf3f3b053c0dee5620819568 /meta/lib/oe/sstatesig.py
parent8dd90ff82e781821b6f4c2ce2c353936c8e042d2 (diff)
downloadpoky-ecbf203e34484731dcb6acc5e75df79cb86e55dc.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: 9d7a5219713af8117eda145052c6d9abdf577d8f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/sstatesig.py')
-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 0e17ad6f5b..4325b66a9e 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -541,8 +541,12 @@ def OEOuthashBasic(path, sigfile, task, d):
541 add_perm(stat.S_IXOTH, 'x') 541 add_perm(stat.S_IXOTH, 'x')
542 542
543 if include_owners: 543 if include_owners:
544 update_hash(" %10s" % pwd.getpwuid(s.st_uid).pw_name) 544 try:
545 update_hash(" %10s" % grp.getgrgid(s.st_gid).gr_name) 545 update_hash(" %10s" % pwd.getpwuid(s.st_uid).pw_name)
546 update_hash(" %10s" % grp.getgrgid(s.st_gid).gr_name)
547 except KeyError:
548 bb.warn("KeyError in %s" % path)
549 raise
546 550
547 update_hash(" ") 551 update_hash(" ")
548 if stat.S_ISBLK(s.st_mode) or stat.S_ISCHR(s.st_mode): 552 if stat.S_ISBLK(s.st_mode) or stat.S_ISCHR(s.st_mode):