On Thu, 2021-02-04 at 13:13 +0100, Tomasz Dziendzielski wrote:
> If image recipe depends on another image recipe it will try to use
> license recipeinfo that is not deployed. It will result in:
> > Exception: FileNotFoundError: [Errno 2] No such file or directory:
> > 'TMPDIR/deploy/licenses/foo-image/recipeinfo'
> 
> We can't determine in a simple and efficient way if dependency recipe
> inherits image.bbclass, so let's introduce SKIP_LICENSE_MANIFEST_RECIPES
> variable that will contain list of recipes that should be skipped.
> 
> Signed-off-by: Tomasz Dziendzielski <tomasz.dziendziel...@gmail.com>
> ---
>  meta/classes/license_image.bbclass | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/license_image.bbclass 
> b/meta/classes/license_image.bbclass
> index 8fd88cfb2d..e2f3178306 100644
> --- a/meta/classes/license_image.bbclass
> +++ b/meta/classes/license_image.bbclass
> @@ -223,7 +223,8 @@ def get_deployed_dependencies(d):
>      pn = d.getVar("PN", True)
>      depends = list(set([dep[0] for dep
>                      in list(taskdata.values())
> -                    if not dep[0].endswith("-native") and not dep[0] == pn]))
> +                    if not dep[0].endswith("-native") and not dep[0] == pn
> +                    and dep[0] not in 
> (d.getVar("SKIP_LICENSE_MANIFEST_RECIPES", True) or "").split()]))
>  
> 
> 
> 

I've been giving this some thought and I really don't like having to
remember to manually add special cases like this, it sounds/looks like
something we should really fix in a better way.

Perhaps we should just skip license files if they don't exist? We could
perhaps show a warning if the match isn't for a recipe called *-image?

Cheers,

Richard

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#147860): 
https://lists.openembedded.org/g/openembedded-core/message/147860
Mute This Topic: https://lists.openembedded.org/mt/80377785/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to