* [Buildroot] [PATCH] package/pkg-generic.mk: really make DL_SUBDIR inheritance work
@ 2024-05-09 17:23 Thomas Petazzoni via buildroot
2024-05-09 20:20 ` Yann E. MORIN
2024-06-03 18:08 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-05-09 17:23 UTC (permalink / raw)
To: buildroot; +Cc: Yann E . MORIN, Thomas Petazzoni
While bumping kodi, we figured out that the kodi-texturepacker and
kodi-jsonschemabuilder were both re-downloading the main Kodi tarball,
even though they contain:
KODI_JSONSCHEMABUILDER_DL_SUBDIR = kodi
KODI_TEXTUREPACKER_DL_SUBDIR = kodi
Both are host packages, and turns out that changing those variables to
HOST_ ones made the download sharing work.
Commit efa7712b092950c92f994e2ee30c120a64e5451b ("package/pkg-generic:
host variant inherits target download settings") introduced
inheritance of host variables from target variables from a number of
variables, including DL_SUBDIR. But it missed the fact that earlier in
pkg-generic.mk, the following line was defined:
$(2)_DL_SUBDIR ?= $$($(2)_RAWNAME)
So, when this later code kicked in:
ifndef $(2)_DL_SUBDIR
ifdef $(3)_DL_SUBDIR
$(2)_DL_SUBDIR = $$($(3)_DL_SUBDIR)
endif
endif
In fact it never did anything because $(2)_DL_SUBDIR would never be
undefined. This commit fixes this issue by properly adjusting the
logic to inherit the value of the target variable when it exists, or
defaulting to $$($(2)_RAWNAME) otherwise.
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
package/pkg-generic.mk | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 577a148c1e..a2749320c3 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -525,7 +525,6 @@ 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)_DL_DIR = $$(DL_DIR)/$$($(2)_DL_SUBDIR)
$(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASENAME)
@@ -538,6 +537,8 @@ endif
ifndef $(2)_DL_SUBDIR
ifdef $(3)_DL_SUBDIR
$(2)_DL_SUBDIR = $$($(3)_DL_SUBDIR)
+ else
+ $(2)_DL_SUBDIR = $$($(2)_RAWNAME)
endif
endif
--
2.44.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [Buildroot] [PATCH] package/pkg-generic.mk: really make DL_SUBDIR inheritance work
2024-05-09 17:23 [Buildroot] [PATCH] package/pkg-generic.mk: really make DL_SUBDIR inheritance work Thomas Petazzoni via buildroot
@ 2024-05-09 20:20 ` Yann E. MORIN
2024-06-03 18:08 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2024-05-09 20:20 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: buildroot
Thomas, All,
On 2024-05-09 19:23 +0200, Thomas Petazzoni spake thusly:
> While bumping kodi, we figured out that the kodi-texturepacker and
> kodi-jsonschemabuilder were both re-downloading the main Kodi tarball,
> even though they contain:
>
> KODI_JSONSCHEMABUILDER_DL_SUBDIR = kodi
> KODI_TEXTUREPACKER_DL_SUBDIR = kodi
>
> Both are host packages, and turns out that changing those variables to
> HOST_ ones made the download sharing work.
>
> Commit efa7712b092950c92f994e2ee30c120a64e5451b ("package/pkg-generic:
> host variant inherits target download settings") introduced
> inheritance of host variables from target variables from a number of
> variables, including DL_SUBDIR. But it missed the fact that earlier in
> pkg-generic.mk, the following line was defined:
>
> $(2)_DL_SUBDIR ?= $$($(2)_RAWNAME)
>
> So, when this later code kicked in:
>
> ifndef $(2)_DL_SUBDIR
> ifdef $(3)_DL_SUBDIR
> $(2)_DL_SUBDIR = $$($(3)_DL_SUBDIR)
> endif
> endif
>
> In fact it never did anything because $(2)_DL_SUBDIR would never be
> undefined. This commit fixes this issue by properly adjusting the
> logic to inherit the value of the target variable when it exists, or
> defaulting to $$($(2)_RAWNAME) otherwise.
>
> Cc: Yann E. MORIN <yann.morin.1998@free.fr>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Applied to master, thanks for fixing my mess!
Regards,
Yann E. MORIN.
> ---
> package/pkg-generic.mk | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 577a148c1e..a2749320c3 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -525,7 +525,6 @@ 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)_DL_DIR = $$(DL_DIR)/$$($(2)_DL_SUBDIR)
> $(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASENAME)
>
> @@ -538,6 +537,8 @@ endif
> ifndef $(2)_DL_SUBDIR
> ifdef $(3)_DL_SUBDIR
> $(2)_DL_SUBDIR = $$($(3)_DL_SUBDIR)
> + else
> + $(2)_DL_SUBDIR = $$($(2)_RAWNAME)
> endif
> endif
>
> --
> 2.44.0
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Buildroot] [PATCH] package/pkg-generic.mk: really make DL_SUBDIR inheritance work
2024-05-09 17:23 [Buildroot] [PATCH] package/pkg-generic.mk: really make DL_SUBDIR inheritance work Thomas Petazzoni via buildroot
2024-05-09 20:20 ` Yann E. MORIN
@ 2024-06-03 18:08 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-06-03 18:08 UTC (permalink / raw)
To: Thomas Petazzoni via buildroot; +Cc: Yann E . MORIN, Thomas Petazzoni
>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:
> While bumping kodi, we figured out that the kodi-texturepacker and
> kodi-jsonschemabuilder were both re-downloading the main Kodi tarball,
> even though they contain:
> KODI_JSONSCHEMABUILDER_DL_SUBDIR = kodi
> KODI_TEXTUREPACKER_DL_SUBDIR = kodi
> Both are host packages, and turns out that changing those variables to
> HOST_ ones made the download sharing work.
> Commit efa7712b092950c92f994e2ee30c120a64e5451b ("package/pkg-generic:
> host variant inherits target download settings") introduced
> inheritance of host variables from target variables from a number of
> variables, including DL_SUBDIR. But it missed the fact that earlier in
> pkg-generic.mk, the following line was defined:
> $(2)_DL_SUBDIR ?= $$($(2)_RAWNAME)
> So, when this later code kicked in:
> ifndef $(2)_DL_SUBDIR
> ifdef $(3)_DL_SUBDIR
> $(2)_DL_SUBDIR = $$($(3)_DL_SUBDIR)
> endif
> endif
> In fact it never did anything because $(2)_DL_SUBDIR would never be
> undefined. This commit fixes this issue by properly adjusting the
> logic to inherit the value of the target variable when it exists, or
> defaulting to $$($(2)_RAWNAME) otherwise.
> Cc: Yann E. MORIN <yann.morin.1998@free.fr>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Committed to 2024.02.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-03 18:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-09 17:23 [Buildroot] [PATCH] package/pkg-generic.mk: really make DL_SUBDIR inheritance work Thomas Petazzoni via buildroot
2024-05-09 20:20 ` Yann E. MORIN
2024-06-03 18:08 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox