diff --git a/doc/pages/Manual.md b/doc/pages/Manual.md
index 0f4929b6201..24cc4ed84ba 100644
--- a/doc/pages/Manual.md
+++ b/doc/pages/Manual.md
@@ -973,14 +973,18 @@ files.
considered incompatible. This is useful to define sets of mutually conflicting
packages.
--
- `depexts: [ [ ... ] { } ... ]`:
- the package external dependencies. This field may be used to describe the
- dependencies of the package toward software or packages external to the opam ecosystem, for various systems. Each
- `[ ... ] { }` element declares the strings to the left as
- identifiers to required system-managed packages, while the filter to the right
- allows one to select the systems they will be active on.
+- `depexts: [ [ ... ] { } ... ]`:
+ the package external dependencies. This field is used to describe the
+ dependencies of the package toward packages external to the opam ecosystem; opam will then
+ use its knowledge of the system package manager to determine the availability
+ of the package, and install these external dependencies on the system as
+ prerequisites of the package, asking the user for administrator rights if
+ required.
+
+ Each `[ ... ] { }` element declares the strings to the
+ left as identifiers to required system-managed packages, while the filter to
+ the right allows one to select the systems they will be active on.
The filters typically use variables [`arch`](#opamvar-arch),
[`os`](#opamvar-os), [`os-distribution`](#opamvar-os-distribution),
diff --git a/master_changes.md b/master_changes.md
index e0a25fe4f2d..c149b490957 100644
--- a/master_changes.md
+++ b/master_changes.md
@@ -106,6 +106,7 @@ New option/command/subcommand are prefixed with ◈.
* Improve messages to hint that answering `no` doesn't abort installation [#4591 @AltGr]
* Add support for non-interactive mode in macports [#4676 @kit-ty-kate]
* Handling of packages of tagged repositories for alpine [#4700 @rjbou - fix #4670]
+ * Clarify some `assume-depexts` related messages [#4671 @AltGr - partial fix #4662]
## Sandbox
* Fix the conflict with the environment variable name used by dune [#4535 @smorimoto - fix ocaml/dune#4166]
diff --git a/src/state/opamSwitchState.ml b/src/state/opamSwitchState.ml
index 1f05a325a00..ffca58c1d53 100644
--- a/src/state/opamSwitchState.ml
+++ b/src/state/opamSwitchState.ml
@@ -1094,14 +1094,16 @@ let unavailable_reason st ?(default="") (name, vformula) =
in
let msg =
match missing with
- | [pkg] ->
- " '" ^ pkg ^ "'"
+ | [pkg] -> " '" ^ pkg ^ "'"
| pkgs ->
- "s " ^ (OpamStd.Format.pretty_list (List.rev_map (Printf.sprintf "'%s'") pkgs))
+ "s " ^ (OpamStd.Format.pretty_list
+ (List.rev_map (Printf.sprintf "'%s'") pkgs))
in
Printf.sprintf
"depends on the unavailable system package%s. Use \
- `--assume-depexts' to attempt installation anyway." msg
+ `--no-depexts' to attempt installation anyway, or it is \
+ possible that a depext package name in the opam file \
+ is incorrect." msg
| None -> default
let update_package_metadata nv opam st =