All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] core/pkg-infra: host variant inherits DL_SUBDIR
@ 2019-04-28 17:44 Yann E. MORIN
  2019-04-29 20:28 ` Arnout Vandecappelle
  2019-05-20 21:01 ` Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: Yann E. MORIN @ 2019-04-28 17:44 UTC (permalink / raw)
  To: buildroot

We have no clear separation between variables that should be
automatically inherited by the host variant, from the target
variant, and those variables that should not be inherited.

However, it clearly makes sense that the host variant does inherit
all the download variables, of which the sub-directory.

Notes: currently, only three packages define HOST_FOO_DL_SUBDIR,
but they all are host-only packages anyway, so needs not be fixed:
  - gcc-initial
  - gcc-final
  - python3-setuptools

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
---
 package/pkg-generic.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 67782138b4..5c7c039390 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -466,6 +466,12 @@ ifdef $(3)_OVERRIDE_SRCDIR
   $(2)_OVERRIDE_SRCDIR ?= $$($(3)_OVERRIDE_SRCDIR)
 endif
 
+ifndef $(2)_DL_SUBDIR
+ ifdef $(3)_DL_SUBDIR
+  $(2)_DL_SUBDIR = $$($(3)_DL_SUBDIR)
+ endif
+endif
+
 $(2)_BASENAME	= $$(if $$($(2)_VERSION),$(1)-$$($(2)_VERSION),$(1))
 $(2)_BASENAME_RAW = $$(if $$($(2)_VERSION),$$($(2)_RAWNAME)-$$($(2)_VERSION),$$($(2)_RAWNAME))
 $(2)_DL_SUBDIR ?= $$($(2)_RAWNAME)
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] core/pkg-infra: host variant inherits DL_SUBDIR
  2019-04-28 17:44 [Buildroot] [PATCH] core/pkg-infra: host variant inherits DL_SUBDIR Yann E. MORIN
@ 2019-04-29 20:28 ` Arnout Vandecappelle
  2019-05-20 21:01 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2019-04-29 20:28 UTC (permalink / raw)
  To: buildroot

 Hi Yann,

On 28/04/2019 19:44, Yann E. MORIN wrote:
> We have no clear separation between variables that should be
> automatically inherited by the host variant, from the target
> variant, and those variables that should not be inherited.
> 
> However, it clearly makes sense that the host variant does inherit
> all the download variables, of which the sub-directory.

 I'm not sure it's worth doing this if nothing uses it. But it does make things
consistent. However...

> 
> Notes: currently, only three packages define HOST_FOO_DL_SUBDIR,
> but they all are host-only packages anyway, so needs not be fixed:
>   - gcc-initial
>   - gcc-final
>   - python3-setuptools
> 
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Peter Korsgaard <peter@korsgaard.com>
> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
> ---
>  package/pkg-generic.mk | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 67782138b4..5c7c039390 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -466,6 +466,12 @@ ifdef $(3)_OVERRIDE_SRCDIR
>    $(2)_OVERRIDE_SRCDIR ?= $$($(3)_OVERRIDE_SRCDIR)
>  endif
>  
> +ifndef $(2)_DL_SUBDIR
> + ifdef $(3)_DL_SUBDIR
> +  $(2)_DL_SUBDIR = $$($(3)_DL_SUBDIR)

 For most (all?) others, we define the default value in the same place. So move
it from 4 lines below to the else branch here.

 Regards,
 Arnout

> + endif
> +endif
> +
>  $(2)_BASENAME	= $$(if $$($(2)_VERSION),$(1)-$$($(2)_VERSION),$(1))
>  $(2)_BASENAME_RAW = $$(if $$($(2)_VERSION),$$($(2)_RAWNAME)-$$($(2)_VERSION),$$($(2)_RAWNAME))
>  $(2)_DL_SUBDIR ?= $$($(2)_RAWNAME)
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] core/pkg-infra: host variant inherits DL_SUBDIR
  2019-04-28 17:44 [Buildroot] [PATCH] core/pkg-infra: host variant inherits DL_SUBDIR Yann E. MORIN
  2019-04-29 20:28 ` Arnout Vandecappelle
@ 2019-05-20 21:01 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2019-05-20 21:01 UTC (permalink / raw)
  To: buildroot

On Sun, 28 Apr 2019 19:44:58 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> We have no clear separation between variables that should be
> automatically inherited by the host variant, from the target
> variant, and those variables that should not be inherited.
> 
> However, it clearly makes sense that the host variant does inherit
> all the download variables, of which the sub-directory.
> 
> Notes: currently, only three packages define HOST_FOO_DL_SUBDIR,
> but they all are host-only packages anyway, so needs not be fixed:
>   - gcc-initial
>   - gcc-final
>   - python3-setuptools
> 
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Peter Korsgaard <peter@korsgaard.com>
> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
> ---
>  package/pkg-generic.mk | 6 ++++++
>  1 file changed, 6 insertions(+)

Following the comments from Arnout, I marked this patch as Changes
Requested in patchwork. Could you send an updated version ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-20 21:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-28 17:44 [Buildroot] [PATCH] core/pkg-infra: host variant inherits DL_SUBDIR Yann E. MORIN
2019-04-29 20:28 ` Arnout Vandecappelle
2019-05-20 21:01 ` Thomas Petazzoni

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.