summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
diff options
context:
space:
mode:
authorFrederic Martinsons <frederic.martinsons@gmail.com>2023-03-15 08:48:51 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-16 17:49:38 +0000
commit0b937af08cc172589083fdae41f1c301059010c9 (patch)
tree55bc98e07033e2ae4bdfb6e83dc919ff31e8dc85 /meta/classes-recipe
parent39594c12fcdb56193bbbc481b11fd203495b92ab (diff)
downloadpoky-0b937af08cc172589083fdae41f1c301059010c9.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: 8e9ec03c73e8c09e223d6f6cce297df363991350) Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe')
-rw-r--r--meta/classes-recipe/cargo.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes-recipe/cargo.bbclass b/meta/classes-recipe/cargo.bbclass
index 93e185f2c9..7a8cc1e751 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
40RUSTFLAGS ??= "" 40RUSTFLAGS ??= ""
41BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" 41BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}"
42CARGO_BUILD_FLAGS = "-v --target ${RUST_HOST_SYS} ${BUILD_MODE} --manifest-path=${MANIFEST_PATH}" 42CARGO_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.