From: Thomas Petazzoni Date: Thu, 4 Aug 2011 19:34:24 +0000 (+0200) Subject: package: fix _DL_VERSION value X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f940d7602ca0810da0432638d2ce8441d6486991;p=buildroot.git package: fix _DL_VERSION value 993e51bc22f508fbaf39c5c49fd0595fc5c56013 introduced a _DL_VERSION in addition to _VERSION. This variable, purely internal to the package infrastructure, allows to store the *raw* version name, as defined in the package .mk file. However, as this version string can contain slashes, it is not appropriate to be part of the build directory name of the package. This is why _VERSION is defined to be the same thing as _DL_VERSION, except that slashes are replaced by underscores. However, the initial implementation didn't take into account the case of host packages. So 763822e874fd8d39b591feaa9639f76183897fb7 was committed to fix this. But unfortunately, this commit got it wrong again: it forgot the case where _VERSION is set, but not HOST__VERSION. In this case, HOST__DL_VERSION remained empty. This can be seen for example by building host-sstrip. This problem has been noticed by Julien Boibessot , who also helped in fixing the issue. Thanks! The fix is simply to ensure that _DL_VERSION is properly set in all cases: when HOST__VERSION is defined, when only _VERSION is defined, and when no version is defined. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- diff --git a/package/Makefile.package.in b/package/Makefile.package.in index 90530dc432..868bf28420 100644 --- a/package/Makefile.package.in +++ b/package/Makefile.package.in @@ -366,15 +366,17 @@ $(2)_NAME = $(1) # sanitize the package version that is used in paths, directory and file names. # Forward slashes may appear in the package's version when pointing to a # version control system branch or tag, for example remotes/origin/1_10_stable. -$(2)_DL_VERSION = $($(2)_VERSION) ifndef $(2)_VERSION ifdef $(3)_VERSION - $(2)_VERSION = $($(3)_VERSION) + $(2)_DL_VERSION = $($(3)_VERSION) + $(2)_VERSION = $(subst /,_,$($(3)_VERSION)) else $(2)_VERSION = undefined + $(2)_DL_VERSION = undefined endif else - $(2)_VERSION = $(subst /,_,$($(2)_VERSION)) + $(2)_DL_VERSION = $($(2)_VERSION) + $(2)_VERSION = $(subst /,_,$($(2)_VERSION)) endif $(2)_BASE_NAME = $(1)-$$($(2)_VERSION)