diff options
author | Frederic Martinsons <frederic.martinsons@gmail.com> | 2023-03-15 08:48:51 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-03-25 23:00:14 +0000 |
commit | 2929a3bb19b1cad57391521e9fc80b067f3300c7 (patch) | |
tree | d59975dcaf792d74d1590d172ca1e2fa050c99a2 /meta | |
parent | 84cfe291ad4069499e9c8b537a5726cfe2ea8414 (diff) | |
download | poky-2929a3bb19b1cad57391521e9fc80b067f3300c7.tar.gz |
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>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes-recipe/cargo.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes-recipe/cargo.bbclass b/meta/classes-recipe/cargo.bbclass index d1e83518b5..b27eb2f209 100644 --- a/meta/classes-recipe/cargo.bbclass +++ b/meta/classes-recipe/cargo.bbclass | |||
@@ -39,7 +39,7 @@ MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" | |||
39 | 39 | ||
40 | RUSTFLAGS ??= "" | 40 | RUSTFLAGS ??= "" |
41 | BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" | 41 | BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" |
42 | CARGO_BUILD_FLAGS = "-v --target ${RUST_HOST_SYS} ${BUILD_MODE} --manifest-path=${MANIFEST_PATH}" | 42 | CARGO_BUILD_FLAGS = "-v --offline --target ${RUST_HOST_SYS} ${BUILD_MODE} --manifest-path=${MANIFEST_PATH}" |
43 | 43 | ||
44 | # This is based on the content of CARGO_BUILD_FLAGS and generally will need to | 44 | # This is based on the content of CARGO_BUILD_FLAGS and generally will need to |
45 | # change if CARGO_BUILD_FLAGS changes. | 45 | # change if CARGO_BUILD_FLAGS changes. |