package/pkg-cargo: allow packages to define download environment

Currently, the cargo infrastructure forcibly sets the package _DL_ENV
variable, instead of appending to it, which prevents packages from
providing their own download environment variables.

We fix that by using an append-assignment.

Note: when introduced, that variable was explicitly not documented, and
is supposed to only be used by packages infrastructures. However, that
variable exists, and it can be (ab)used by br2-external packages (most
probably to ill effects, but heh!). We anyway leave it undocumented,
like _ROOTFS_PRE_CMD_HOOKS.

Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Yann E. MORIN 2022-02-10 16:29:24 +01:00 committed by Peter Korsgaard
parent a6b348b3c7
commit 6d508d8e45

View File

@ -69,7 +69,7 @@ define inner-cargo-package
$(2)_DOWNLOAD_DEPENDENCIES += host-rustc
$(2)_DOWNLOAD_POST_PROCESS = cargo
$(2)_DL_ENV = CARGO_HOME=$$(HOST_DIR)/share/cargo
$(2)_DL_ENV += CARGO_HOME=$$(HOST_DIR)/share/cargo
# Due to vendoring, it is pretty likely that not all licenses are
# listed in <pkg>_LICENSE.