Skip to contentSkip to conversation

package/infra: fix downloading versions with a slash

PATCH New Yann E. MORIN 4 participants 5 messages Aug 19, 2014 – Aug 25, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/infra: fix downloading versions with a slash

Since cset 54456cc (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
---
 package/pkg-generic.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/pkg-generic.mk +2 -2
index fb4b849..d04fd36 100644
@@ -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
 
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/1 package/infra: fix downloading versions with a slash

In reply to Yann E. MORIN
Quoted 8 lines · Yann E. MORIN

Since cset 54456cc (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.

Quoted 8 lines

Make the _DL_VERSION variables immediately-evaluated.

Fixes:

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

(tested by temporary setting DTC_VERSION to 'refs/tags/v1.4.0' as proposed in the bug report)

Best regards,
Thomas

#3 lore raw

PATCH 1/1 package/infra: fix downloading versions with a slash

Quoted 14 lines · Thomas De Schampheleire
Quoted 13 lines · Yann E. MORIN

Since cset 54456cc (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
Quoted 9 lines
Quoted 3 lines

(tested by temporary setting DTC_VERSION to 'refs/tags/v1.4.0' as proposed in the bug report)

This patch should be applied to master, according to me.

Best regards,
Thomas

#4 lore raw

PATCH 1/1 package/infra: fix downloading versions with a slash

In reply to Yann E. MORIN

Dear Yann E. MORIN,

Quoted 8 lines · Yann E. MORIN

Since cset 54456cc (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.

Quoted 8 lines

Make the _DL_VERSION variables immediately-evaluated.

Fixes:

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

Applied, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com