package/pkg-download.mk: add <pkg>_DL_ENV variable

This variable can be used by package to pass extra environment
variables to the download logic. It will be used for the Go/Cargo
vendoring.

The <pkg>_DL_ENV variable is intentionally not documented: at this
point, it is not meant to be used by packages directly, but only by
package infrastructures.

Suggested-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[yann.morin.1998@free.fr: move the two _ENV variables to the same line]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
Thomas Petazzoni 2020-12-19 16:35:16 +01:00 committed by Yann E. MORIN
parent c4a11de044
commit 53f23aaceb

View File

@ -99,7 +99,8 @@ endif
define DOWNLOAD
$(Q)mkdir -p $($(2)_DL_DIR)
$(Q)$(EXTRA_ENV) flock $($(2)_DL_DIR)/.lock $(DL_WRAPPER) \
$(Q)$(EXTRA_ENV) $($(2)_DL_ENV) \
flock $($(2)_DL_DIR)/.lock $(DL_WRAPPER) \
-c '$($(2)_DL_VERSION)' \
-d '$($(2)_DL_DIR)' \
-D '$(DL_DIR)' \