Skip to content

Commit d54c5d4

Browse files
authored
docs(cargo-package): alwasy include the lockfile (#15067)
### What does this PR try to resolve? This was overlooked in #14815. ### How should we test and review this PR? ``` cargo build target/debug/cargo help package # and read the manpage ```
2 parents 2909c01 + 662394e commit d54c5d4

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/doc/man/cargo-package.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ stored in the `target/package` directory. This performs the following steps:
2626
- The original `Cargo.toml` file is rewritten and normalized.
2727
- `[patch]`, `[replace]`, and `[workspace]` sections are removed from the
2828
manifest.
29-
- `Cargo.lock` is automatically included if the package contains an
30-
executable binary or example target. {{man "cargo-install" 1}} will use the
31-
packaged lock file if the `--locked` flag is used.
29+
- `Cargo.lock` is always included. When missing, a new lock file will be
30+
generated. {{man "cargo-install" 1}} will use the packaged lock file if
31+
the `--locked` flag is used.
3232
- A `.cargo_vcs_info.json` file is included that contains information
3333
about the current VCS checkout hash if available, as well as a flag if the
3434
worktree is dirty.

src/doc/man/generated_txt/cargo-package.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ DESCRIPTION
2626
o [patch], [replace], and [workspace] sections are removed from the
2727
manifest.
2828

29-
o Cargo.lock is automatically included if the package contains an
30-
executable binary or example target. cargo-install(1) will use the
31-
packaged lock file if the --locked flag is used.
29+
o Cargo.lock is always included. When missing, a new lock file will
30+
be generated. cargo-install(1) will use the packaged lock file if
31+
the --locked flag is used.
3232

3333
o A .cargo_vcs_info.json file is included that contains information
3434
about the current VCS checkout hash if available, as well as a

src/doc/src/commands/cargo-package.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ stored in the `target/package` directory. This performs the following steps:
2121
- The original `Cargo.toml` file is rewritten and normalized.
2222
- `[patch]`, `[replace]`, and `[workspace]` sections are removed from the
2323
manifest.
24-
- `Cargo.lock` is automatically included if the package contains an
25-
executable binary or example target. [cargo-install(1)](cargo-install.html) will use the
26-
packaged lock file if the `--locked` flag is used.
24+
- `Cargo.lock` is always included. When missing, a new lock file will be
25+
generated. [cargo-install(1)](cargo-install.html) will use the packaged lock file if
26+
the `--locked` flag is used.
2727
- A `.cargo_vcs_info.json` file is included that contains information
2828
about the current VCS checkout hash if available, as well as a flag if the
2929
worktree is dirty.

src/etc/man/cargo-package.1

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ manifest.
3535
.RE
3636
.sp
3737
.RS 4
38-
\h'-04'\(bu\h'+02'\fBCargo.lock\fR is automatically included if the package contains an
39-
executable binary or example target. \fBcargo\-install\fR(1) will use the
40-
packaged lock file if the \fB\-\-locked\fR flag is used.
38+
\h'-04'\(bu\h'+02'\fBCargo.lock\fR is always included. When missing, a new lock file will be
39+
generated. \fBcargo\-install\fR(1) will use the packaged lock file if
40+
the \fB\-\-locked\fR flag is used.
4141
.RE
4242
.sp
4343
.RS 4

0 commit comments

Comments
 (0)