core/pkg-infra: host variant inherits DL_SUBDIR
PATCH 1/1 core/pkg-infra: host variant inherits DL_SUBDIR
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
--- package/pkg-generic.mk | 6 ++++++ 1 file changed, 6 insertions(+)
package/pkg-generic.mk +6 -0
@@ -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)
Signature · 1 line
2.14.1
PATCH 1/1 core/pkg-infra: host variant inherits DL_SUBDIR
Hi Yann,
Quoted 6 lines · Yann E. MORIN
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...
Quoted 20 lines
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-setuptoolsSigned-off-by Yann E. MORIN <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Peter Korsgaard <[email protected]>Cc Maxime Hadjinlian <[email protected]>--- package/pkg-generic.mk | 6 ++++++ 1 file changed, 6 insertions(+)package/pkg-generic.mk +0
-0
package/pkg-generic.mk ifdef $(3)_OVERRIDE_SRCDIR · line 471
Quoted 6 lines
package/pkg-generic.mk +3
-0@@ -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
Quoted 7 lines
package/pkg-generic.mk +3
-0+ 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)
PATCH 1/1 core/pkg-infra: host variant inherits DL_SUBDIR
In reply to Yann E. MORINQuoted 13 lines · On Sun, 28 Apr 2019 19:44:58 +0200 "Yann E. MORIN" <[email protected]>…
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
Quoted 7 lines
Signed-off-by Yann E. MORIN <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Peter Korsgaard <[email protected]>Cc Maxime Hadjinlian <[email protected]>--- 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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com