[OE-core] [bitbake-devel] hashequiv, pseudo, and GIDs

Richard Purdie richard.purdie at linuxfoundation.org
Wed Dec 11 11:05:58 UTC 2019


Hi,

On Wed, 2019-12-11 at 01:51 +0000, chris.laplante--- via bitbake-devel
wrote:
> I'm encountering a failure like below when using hashequiv. What is
> happening is recipe "A" is installing some files in do_install, and
> changing the group of those files. The group is defined by a
> different recipe ("B"). There is no dependency between A and B, so
> when A:do_package runs, the group is not present in A's pseudo
> database. OEOuthashBasic tries to lookup the owning group name of the
> file, and a KeyError is raised.

This doesn't make sense to me. How can a chgrp in recipe A succeed if
the group isn't known to recipe A?

(maybe I know, see below)

> A workaround is to add:
>     DEPENDS += "B"
> to recipe A, so that the group ends up in A's pseudo database. This
> works, but seems really really hacky, since it's only necessary when
> hashequiv is active.

I suspect this isn't a hack, but necessary and you're finding a
determinism/missing dependency issue that hashequiv is highlighting?

> So why is the group name used in the hash, as opposed to the GID? (I
> also have the same question regarding user name vs UID). If the GID
> was used we wouldn't have this issue.

The only way I can think this might work is that you're statically
assigning GIDs and using the GID directly in do_install? That isn't the
way the defaults are setup.

If that is the case we probably have to detect it and change the
behaviour of hashequiv's comparison function to use UID/GID but it does
depend on the wider system setup.

Cheers,

Richard



More information about the Openembedded-core mailing list