diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-14 21:05:10 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-16 22:33:09 +0000 |
commit | ecbf203e34484731dcb6acc5e75df79cb86e55dc (patch) | |
tree | 782a22389dc0fdd1bf3f3b053c0dee5620819568 /meta/lib/oe | |
parent | 8dd90ff82e781821b6f4c2ce2c353936c8e042d2 (diff) | |
download | poky-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')
-rw-r--r-- | meta/lib/oe/sstatesig.py | 8 |
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): |