Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] pkg-generic: Fix host _DL_VERSION corner case
@ 2015-02-24 22:26 Clayton Shotwell
  2015-03-04 22:56 ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Clayton Shotwell @ 2015-02-24 22:26 UTC (permalink / raw)
  To: buildroot

In the case when a package has a host version, the package is dependent
on the host version, and the version contains a '/', the host version
does not evaluate properly. The host version will contain a '_' instead
of a '/', resulting in a failed download. To solve this corner case, add
a check to see if the _DL_VERSION of the package has been defined before
defining the host _DL_VERSION. If the package _DL_VERSION has not been
defined yet, then the version string has not been formatted yet and is
still good to use.

This error occured on a package in a BR2_EXTERNAL that uses a git repo
for its remote storage with '/' in the tag names. I do not believe this
affects any packages in the Buildroot mainline but it could in the
future.

Signed-off-by: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
---
 package/pkg-generic.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 1b09955..fcef461 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -323,7 +323,11 @@ $(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 := $$(strip $$($(3)_VERSION))
+  ifdef $(3)_DL_VERSION
+   $(2)_DL_VERSION := $$(strip $$($(3)_DL_VERSION))
+  else
+   $(2)_DL_VERSION := $$(strip $$($(3)_VERSION))
+  endif
   $(2)_VERSION := $$(subst /,_,$$(strip $$($(3)_VERSION)))
  else
   $(2)_VERSION = undefined
-- 
1.9.1

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

end of thread, other threads:[~2015-07-11 22:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-24 22:26 [Buildroot] [PATCH] pkg-generic: Fix host _DL_VERSION corner case Clayton Shotwell
2015-03-04 22:56 ` Thomas Petazzoni
2015-03-04 23:17   ` Clayton Shotwell
2015-03-05  8:25     ` Thomas Petazzoni
2015-07-11 15:21       ` Arnout Vandecappelle
2015-07-11 15:40         ` [Buildroot] [PATCH v3] " Arnout Vandecappelle
2015-07-11 22:50           ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox