Message ID | 9430_1644422939_6203E71B_9430_485_1_951512fc2010b31a4d2d50fe12c2ad86f3a0c1a1.1644422916.git.yann.morin@orange.com |
---|---|
State | Changes Requested |
Headers | show |
Series | [1/5,v2] package/pkg-cargo: allow packages to define download environment | expand |
On Wed, 9 Feb 2022 17:08:45 +0100 <yann.morin@orange.com> wrote: > From: "Yann E. MORIN" <yann.morin@orange.com> > > Currently, host-rustc is a download dependency, because we need cargo > for the vendoring during the downlaod step. ^^^^^^^^ download > However, when using a package in override-srcdir, there is no download > step, so host-rustc is not pulled in as a dependency which breaks > running the build of a single pcakge from scratch: ^^^^^^ package > $ make clean > $ make my-rust-package > [...] > [...] cargo build --offline --release --manifest-path Cargo.toml --locked > /bin/sh: cargo: command not found > > We fix that by adding host-rustc as a standard dependency too. > > 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>
diff --git a/package/pkg-cargo.mk b/package/pkg-cargo.mk index e1d81197b5..24dd50e399 100644 --- a/package/pkg-cargo.mk +++ b/package/pkg-cargo.mk @@ -65,8 +65,10 @@ HOST_PKG_CARGO_ENV = \ define inner-cargo-package -# We need host-rustc to run cargo +# We need host-rustc to run cargo at download time (for vendoring), +# and at build and install time. $(2)_DOWNLOAD_DEPENDENCIES += host-rustc +$(2)_DEPENDENCIES += host-rustc $(2)_DOWNLOAD_POST_PROCESS = cargo $(2)_DL_ENV += CARGO_HOME=$$(HOST_DIR)/share/cargo