Skip to content
Merged

Doc #3656

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions doc/pages/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,11 @@ enabled. Note, however, that:
configuration file, e.g `export OPAM_USER_PATH_RO=/rw/usrlocal:/media`.
Contained paths are added as read-only.
- If needed, for special cases like unprivileged containers, sandboxing can be
disabled on `opam init` with the `--disable-sandboxing` flag. Or by using a
[custom `opamrc`](Manual.html#configfield-wrap-build-commands). Use wisely,
broken Makefiles that run `rm -rf /`
[__do__ happen](https://github.com/ocaml/opam/issues/3231).
disabled on `opam init` with the `--disable-sandboxing` flag (only for
non-initialised opam). Or by using a [custom
`opamrc`](Manual.html#configfield-wrap-build-commands). Use wisely, broken
Makefiles that run `rm -rf /` [__do__
happen](https://github.com/ocaml/opam/issues/3231).

---

Expand Down
12 changes: 8 additions & 4 deletions doc/pages/Install.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,16 @@ make install

#### OSX

Opam packages for [homebrew](http://mxcl.github.com/homebrew/) and
[MacPorts](http://www.macports.org/) are available:
Opam packages for [homebrew](http://mxcl.github.com/homebrew/) and [MacPorts](http://www.macports.org/) are available.
homebrew need a prior installation of `gpatch`, as opam uses gnu-specific options.

```
brew install opam # Homebrew
port install opam # MacPort
# Homebrew
brew install gpatch
brew install opam

# MacPort
port install opam
```

See also
Expand Down
27 changes: 14 additions & 13 deletions doc/pages/Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ selected.

The current switch can be selected in the following ways:
- globally, using `opam switch <switch>`. <span class="opam">opam</span> will use that switch for all
further commands, except when overriden in one of the following ways.
further commands, except when overridden in one of the following ways.
- for local switches, which are external to the opam root, when in the directory
where the switch resides or a descendant.
- by setting the `OPAMSWITCH=<switch>` environment variable, to set it within a
Expand All @@ -101,7 +101,7 @@ The current switch can be selected in the following ways:
- through the `--switch <switch>` command-line flag, for a single command.

Switches have their own prefix, normally `~/.opam/<switch>`, where packages get
intalled ; to use what is installed in a switch, some environment variables need
installed ; to use what is installed in a switch, some environment variables need
to be set, _e.g._ to make executables installed into `~/.opam/<switch>/bin`
visible, that directory needs to be added to `PATH`, but individual packages can
define their own settings as well.
Expand Down Expand Up @@ -210,7 +210,7 @@ to refer to pinned packages.
Syntax is given in a BNF-like notation. Non-terminals are written `<like this>`,
terminals are either plain text or written in double-quotes (`"terminal"`),
curly brackets denote zero or more repetitions when suffixed with `*`, or one or
more when suffixed with `+`, and square brackets denote zero or one occurence.
more when suffixed with `+`, and square brackets denote zero or one occurrence.
Parentheses are for grouping. `(")` and `(""")` respectively mean one and three
quotation mark characters.

Expand Down Expand Up @@ -410,7 +410,7 @@ three scopes:
#### Pre-defined variables

The following variables are dynamically defined by opam, but can still be
overriden from configuration. You can get the list of currently defined
overridden from configuration. You can get the list of currently defined
variables by running:

```
Expand Down Expand Up @@ -501,7 +501,7 @@ Extra variables can be defined by any package at installation time, using a
[`variables {}`](#dotconfigsection-variables) field.

Additionally, the following are limited to some package fields (`depends:`,
`depopts:`, `build:`, `install:`, `remove:`, `run-test:`):
`depopts:`, `build:`, `install:`, `remove:`):

- <a id="pkgvar-with-test">`with-test`</a>: only true if tests have been
enabled for this specific package
Expand Down Expand Up @@ -575,7 +575,7 @@ evaluated as a first pass, before any action is taken, to deduce a concrete
package formula.

The definition is similar to that of `<package-formula>`, except that two cases
`<filter>` and `<relop> <filter>` ar added to `<version-formula>`
`<filter>` and `<relop> <filter>` are added to `<version-formula>`

```BNF
<filtered-package-formula> ::= <filtered-package-formula> <logop> <filtered-package-formula>
Expand Down Expand Up @@ -884,7 +884,8 @@ files.
- <a id="opamfield-run-test">
`run-test: [ [ <term> { <filter> } ... ] { <filter> } ... ]`</a>:
specific instructions for running the package tests, in a format similar to
the [`build:`](#opamfield-build) field.
the [`build:`](#opamfield-build) field. Run only when the package is
explicitly installed with `--with-test`.

- <a id="opamfield-remove"> `remove: [ [ <term> { <filter> } ... ] { <filter>
} ... ]`</a>: commands to run before removing the package, in the same format
Expand All @@ -894,7 +895,7 @@ files.
should not be needed anymore in most cases (and may even be harmful if files
from different packages overlap, which remove scripts generally don't handle).
Use it for special actions, like reverting updates to files, or stopping
daemons: removing what was just added is alredy taken care of.
daemons: removing what was just added is already taken care of.

The commands are run from the root of a fresh copy of the package source,
unless the [`light-uninstall`](#opamflag-light-uninstall) package flag is
Expand All @@ -919,8 +920,8 @@ files.
Note that, in case of failed or interrupted builds, opam can not guarantee
the invariant that `!build` dependencies are always installed.
* `with-test` dependencies are only needed when building tests (when the
package is explicitely installed with `--with-test`)
* likewise, `with-doc` dependecies are only required when building the
package is explicitly installed with `--with-test`)
* likewise, `with-doc` dependencies are only required when building the
package documentation

- <a id="opamfield-depopts">
Expand Down Expand Up @@ -994,7 +995,7 @@ files.

- <a id="opamfield-available">`available: [ <filter> ]`</a>:
can be used to add constraints on the OS and other global variables.
In case the filter doesn't evaluete to `true`, the package is disabled.
In case the filter doesn't evaluate to `true`, the package is disabled.

This field is evaluated before request solving or any actions take place ;
it can only refer to global variables, since it shouldn't depend on the
Expand Down Expand Up @@ -1085,7 +1086,7 @@ files.
`<pkgname>` to `depends:` field.
2. `pin-depends:` are NOT transitive, that is, `pin-depends:` of packages
getting pinned through `pin-depends:` are ignored
3. they won't get updated on `opam update`, the users will need to use `opam
3. They won't get updated on `opam update`, the users will need to use `opam
pin` or `opam install|upgrade DIR` again to get the new pins if the field
has changed. Even then, this won't unpin any packages that would have
been removed from `pin-depends:`.
Expand Down Expand Up @@ -1375,7 +1376,7 @@ for <span class="opam">opam</span>.
expected final state for `pre-session`, and to the actually reached state
for `post-session`.
- `installed`: all installed packages with versions.
- `new`: all packages or versions that are geting installed but wheren't
- `new`: all packages or versions that are getting installed but weren't
present before the session.
- `removed`: all packages or versions that were installed before, but no
longer after the session. Note that an upgrade of `foo.0.1` to `foo.0.2` is considered
Expand Down
1 change: 1 addition & 0 deletions src/client/opamArg.ml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ let help_sections = [
acquiring its lock and fails. <= 0 means infinite wait.";
`P "$(i,OPAMNO) answer no to any question asked.";
`P "$(i,OPAMNOASPCUD) see option `--no-aspcud'.";
`P "$(i,OPAMNOCHECKSUMS) enables option --no-checksums when available.";
`P "$(i,OPAMNOSELFUPGRADE) see option `--no-self-upgrade'.";
`P "$(i,OPAMPINKINDAUTO) sets whether version control systems should be \
detected when pinning to a local path. Enabled by default since 1.3.0.";
Expand Down