Gentle ping.

The other patch of the series was rejected but imho this one is useful as
it improves the error reporting.

Jose

Jose Quaresma via lists.openembedded.org <quaresma.jose=
[email protected]> escreveu no dia quinta, 13/07/2023 à(s)
12:03:

> 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.
>
> Signed-off-by: Jose Quaresma <[email protected]>
> ---
>  meta/lib/oe/sstatesig.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
> index 30f27b0f4f..4a886215b2 100644
> --- a/meta/lib/oe/sstatesig.py
> +++ b/meta/lib/oe/sstatesig.py
> @@ -595,9 +595,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:
> --
> 2.34.1
>
>
> 
>
>

-- 
Best regards,

José Quaresma
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188338): 
https://lists.openembedded.org/g/openembedded-core/message/188338
Mute This Topic: https://lists.openembedded.org/mt/101622322/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to