Commit 1939011c authored by Yann E. MORIN's avatar Yann E. MORIN Committed by Thomas Petazzoni
Browse files

package/infra: fix downloading versions with a slash

Since cset 54456cc6 (infra: consistently use double dollar signs...), it
is no longer possible to download versions with a slash in it, because
the _DL_VERSION variable is second-expanded, but the _VERSION variable
is immediately-expanded to have '/' substitued with '_'.

So, _DL_VERSION is only expanded at the time it is evaluated, and by
that time, we've lost the slashes in _VERSION.

Make the _DL_VERSION variables immediately-evaluated.

Fixes:
    https://bugs.busybox.net/show_bug.cgi?id=7328



Reported-by: default avatarVincent Stehlé <vincent.stehle@freescale.com>
Signed-off-by: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
Cc:  Vincent Stehlé <vincent.stehle@freescale.com>
Acked-by: default avatarThomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Tested-by: default avatarThomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent e05c6a79
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -318,14 +318,14 @@ $(2)_RAWNAME = $$(patsubst host-%,%,$(1))
# version control system branch or tag, for example remotes/origin/1_10_stable.
ifndef $(2)_VERSION
 ifdef $(3)_VERSION
  $(2)_DL_VERSION = $$($(3)_VERSION)
  $(2)_DL_VERSION := $$($(3)_VERSION)
  $(2)_VERSION := $$(subst /,_,$$($(3)_VERSION))
 else
  $(2)_VERSION = undefined
  $(2)_DL_VERSION = undefined
 endif
else
  $(2)_DL_VERSION = $$($(2)_VERSION)
  $(2)_DL_VERSION := $$($(2)_VERSION)
  $(2)_VERSION := $$(subst /,_,$$($(2)_VERSION))
endif