-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
depexts integration #3975
depexts integration #3975
Conversation
(* exception on linking described in the file LICENSE. *) | ||
(* *) | ||
(**************************************************************************) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change module name?
close #3790 |
|
c63324b
to
c613a38
Compare
ce997a6
to
79598d4
Compare
I have not looked into this PR in detail, but what I currently am missing from |
@hannesm: indeed, we don't have that kind of information at the moment. |
@AltGr ok, If I understand correctly, depext is to abstract away the host system package managers, and once this PR is in, I'd be keen to extend depext with an "info" subcommand (which gets a list of packages and returns a list of packages + versions). |
62e4b24
to
ae11de9
Compare
plus some fixes and spelling.
* adds depext_bypass to switch_config * when a package is installed successfully after bypassing its depexts, save the depext-bypass so that the user won't be asked again every time NOTE: the new field is documented, but refers to an undocumented global config field!
that allows to register a given sysdep as an exception, iff the corresponding package installs successfully. This might be slightly inaccurate if several packages use the same sys dependency and one has a broken check, but I don't think that's something to worry about.
So they don't get pissed about being asked each time ;)
... and implement the `depext-no-root` option The combination with `--skip-depexts` is not yet implemented
! `~/.opam/config` / `gt.config` only - `depext: true` Enable handling of external dependencies. When this is enabled, opam will interact with your system package manager when packages declare external dependencies, and prompt you to install them when needed. - `depext-run-installs: true` (was: `print-only`) Allows opam to run package installations through your system package manager when required by "depexts" of opam packages. You will be prompted before any calls to `sudo`, unless `--yes` was specified; if `false`, the installation command will be printed, and opam will pause to let you proceed. - `depext-cannot-install: false` (was: `no-root`) Instructs opam that no system package can be installed on your system. Any opam package declaring system dependencies towards a system package that is not yet installed will be marked as unavailable. Use this if you don't have root access. - `depext-verify: true` (was: `no-consistency-checks`) If an installed opam package depends on a system package that was removed and this is enabled, opam will mark the opam package as needing reinstallation. `~/.opam/config` + switch-config: - `depext-bypass: [SYS_PKGS]` List of system packages to assume as installed, without considering the results from the system package manager. ! CLI - `--assume-depexts` (OpamClientConfig) Skip the installation step for any missing system packages, and attempt to proceed with compilation of the opam packages anyway. If the installation is successful, opam won't prompt again about these system packages. - `--no-depexts` (OpamStateConfig) Temporarily disables handling of external dependencies. Implies `--assume-depexts`.
which doesn't make much sense in our latest iteration, and is to complicated to explain. Let's wait to see exactly what need arises if something like it is to be done at some point.
Integration of external dependencies management in opam: System dependencies are retrieved, checked and user is warned before build failure.
What is added ?
① At switch load, we retrieve the depext state of available packages. They are marked as:
source.list*
).For more information on what commands are used, see this function.
② It is then used to check that installed opam packages still have their system dependencies installed. If no, their are removed from installed packages and marked for reinstall (like when an external file dependencies changes).
③ It is also used at install, before performing actions, depexts of packages to install are checked. If some are missing, there is several interactions: proposal to install them via opam, proposal of the command line to run to install them, nothing, etc. All these interactions can be instrumented via the cli, using options
depext-no-root
,--depext-print-only
④ It is possible to notify opam to bypass the check of some system packages, using the option
--depext-bypass
. The information is stored in the switch config for further operations.