All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Khem Raj <raj.khem@gmail.com>
Cc: openembedded-devel@lists.openembedded.org
Subject: Re: [meta-oe][PATCH] libgpiod: Enable python3 in default packageconfig
Date: Wed, 28 Aug 2019 08:22:34 +0300	[thread overview]
Message-ID: <20190828052234.GA15528@localhost> (raw)
In-Reply-To: <20190828011436.24057-1-raj.khem@gmail.com>

On Tue, Aug 27, 2019 at 06:14:36PM -0700, Khem Raj wrote:
> this recipe inherits python3native class conditionally, this condition
> depends on a given packageconfig, however inherit ${VAR} syntax requires
> VAR to be evaluated before inheriting it, therefore if someone appends
> python3 to packageconfig via a bbappend, then the packageconfig will
> become effective and add --enable-bindings-python to configure but
> inherit wont evaluate correctly since the expression adding to
> packageconfig
> 
> PACKAGECONFIG_append = " python3"
> 
> will be coming _after_ the inherit, and the builds will fail e.g.
> 
> | ../../../libgpiod-1.3/bindings/python/gpiodmodule.c:8:10: fatal error: Python.h: No such file or directory
> |  #include <Python.h>
> 
> This patch inverts the logic, meaning if someone has to disable python3
> bindings should write a bbappend e.g.
> 
> PACKAGECONFIG_remove = "python3"
> 
> This will still mean that python3native will be inherited but the
> effective configure option will be --disable-bindings-python and that
> will do the right thing
>...
>  # enable tools and cxx bindings
> -PACKAGECONFIG ?= "cxx tools"
> +PACKAGECONFIG ?= "cxx tools python3"
>...

It looks very fragile to me when a PACKAGECONFIG has this kind of 
unexpected side effects.

If I understand it correctly, for solving the problem you want 
python3native always inherited. And the simple way to do this would
be to make the inherit unconditionally without touching PACKAGECONFIG.

Anything I miss here?

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



      reply	other threads:[~2019-08-28  5:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28  1:14 [meta-oe][PATCH] libgpiod: Enable python3 in default packageconfig Khem Raj
2019-08-28  5:22 ` Adrian Bunk [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190828052234.GA15528@localhost \
    --to=bunk@stusta.de \
    --cc=openembedded-devel@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.