Skip to content

Commit 0f96876

Browse files
committed
Uses/cargo: use --locked flag on install
By default cargo install ignores the lock file [1]. This will cause our build to fail easily. First of all, when building with tools like poudriere, network access will be disabled in install stage. Fetching a new crate won't be possible. Additionally, a newer crate version might be incompatible with our crate or even more worse unbuildable at all. For that reason, force cargo to honor the lock file on install. [1] https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfile Sponsored by: Beckhoff Automation GmbH & Co. KG
1 parent c68bf06 commit 0f96876

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Mk/Uses/cargo.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ do-build:
341341
do-install:
342342
. for path in ${CARGO_INSTALL_PATH}
343343
@${CARGO_CARGO_RUN} install \
344+
--locked \
344345
--no-track \
345346
--path "${path}" \
346347
--root "${STAGEDIR}${PREFIX}" \

0 commit comments

Comments
 (0)