mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 01:40:07 +00:00
cargo.bbclass: use offline mode for building
There should not be any network access during the build step so specify this explicitely to cargo. This will allow better error message, e.g: | Caused by: | can't checkout from 'ssh://git@.../fmartinsons/zbus-git-dep-test.git': you are in the offline mode (--offline) Instead of | Updating git repository `ssh://git@.../fmartinsons/zbus-git-dep-test.git` | warning: spurious network error (2 tries remaining): failed to resolve address for gitlab.com: Temporary failure in name resolution;class=Net (12) (From OE-Core rev: bad6361b2f90e7916e344148976a968559375eda) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 8e9ec03c73e8c09e223d6f6cce297df363991350) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
84cfe291ad
commit
2929a3bb19
@@ -39,7 +39,7 @@ MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml"
|
||||
|
||||
RUSTFLAGS ??= ""
|
||||
BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}"
|
||||
CARGO_BUILD_FLAGS = "-v --target ${RUST_HOST_SYS} ${BUILD_MODE} --manifest-path=${MANIFEST_PATH}"
|
||||
CARGO_BUILD_FLAGS = "-v --offline --target ${RUST_HOST_SYS} ${BUILD_MODE} --manifest-path=${MANIFEST_PATH}"
|
||||
|
||||
# This is based on the content of CARGO_BUILD_FLAGS and generally will need to
|
||||
# change if CARGO_BUILD_FLAGS changes.
|
||||
|
||||
Reference in New Issue
Block a user