Message ID | 11363_1644506973_62052F5D_11363_173_9_da4c09036712600e0ab76db801a5a5c693bfa267.1644506959.git.yann.morin@orange.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/5,v3] package/pkg-cargo: allow packages to define download environment | expand |
>>>>> <yann.morin@orange.com> writes: > From: "Yann E. MORIN" <yann.morin@orange.com> > Currently, host-rustc is a download dependency, because we need cargo > for the vendoring during the download step. > 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 package from scratch: > $ 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> Committed, thanks.
diff --git a/package/pkg-cargo.mk b/package/pkg-cargo.mk index 8b246abfed..6f5125f1d4 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