diff options
Diffstat (limited to 'meta/classes-recipe')
| -rw-r--r-- | meta/classes-recipe/cargo_common.bbclass | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes-recipe/cargo_common.bbclass b/meta/classes-recipe/cargo_common.bbclass index 48cdd69bca..0fb443edbd 100644 --- a/meta/classes-recipe/cargo_common.bbclass +++ b/meta/classes-recipe/cargo_common.bbclass | |||
| @@ -40,6 +40,9 @@ CARGO_SRC_DIR ??= "" | |||
| 40 | # The actual path to the Cargo.toml | 40 | # The actual path to the Cargo.toml |
| 41 | CARGO_MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" | 41 | CARGO_MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" |
| 42 | 42 | ||
| 43 | # Path to Cargo.lock | ||
| 44 | CARGO_LOCK_PATH ??= "${@ os.path.join(os.path.dirname(d.getVar('CARGO_MANIFEST_PATH', True)), 'Cargo.lock')}" | ||
| 45 | |||
| 43 | CARGO_RUST_TARGET_CCLD ??= "${RUST_TARGET_CCLD}" | 46 | CARGO_RUST_TARGET_CCLD ??= "${RUST_TARGET_CCLD}" |
| 44 | cargo_common_do_configure () { | 47 | cargo_common_do_configure () { |
| 45 | mkdir -p ${CARGO_HOME}/bitbake | 48 | mkdir -p ${CARGO_HOME}/bitbake |
| @@ -168,8 +171,7 @@ python cargo_common_do_patch_paths() { | |||
| 168 | # here is better than letting cargo tell (in case the file is missing) | 171 | # here is better than letting cargo tell (in case the file is missing) |
| 169 | # "Cargo.lock should be modified but --frozen was given" | 172 | # "Cargo.lock should be modified but --frozen was given" |
| 170 | 173 | ||
| 171 | manifest_path = d.getVar("CARGO_MANIFEST_PATH", True) | 174 | lockfile = d.getVar("CARGO_LOCK_PATH", True) |
| 172 | lockfile = os.path.join(os.path.dirname(manifest_path), "Cargo.lock") | ||
| 173 | if not os.path.exists(lockfile): | 175 | if not os.path.exists(lockfile): |
| 174 | bb.fatal(f"{lockfile} file doesn't exist") | 176 | bb.fatal(f"{lockfile} file doesn't exist") |
| 175 | 177 | ||
