Skip to content
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

Disable filtering of available packages for availability of their depexts #322

Merged

Conversation

Leonidas-from-XIV
Copy link
Member

OPAM by default filters out packages for which the system on which it is running does not have the depexts. Which is nice in theory but when building a lockfile we want all packages to be available.

The problem here is that some configurations do not have a queryable package list, e.g. when using Docker containers the package list might have been deleted to save on space in the container, thus available_packages would be just a subset and missing packages, despite these existing in the OPAM repositories.

This is the reason why on the Tezos CI it needs apk update because if the package list is missing it will just silently exclude a lot of the necessary conf-* packages. I tested it locally in a Docker container built in the same way as Tezos where I could reproduce the issue and disabling this in the config makes it work out of the box, without the need for workarounds.

…exts

OPAM by default filters out packages for which the system on which it is
running does not have the depexts. Which is nice in theory but when
building a lockfile we want all packages to be available.

The problem here is that some configurations do not have a queryable
package list, e.g. when using Docker containers the package list might
have been deleted to save on space in the container, thus
`available_packages` would be just a subset and missing packages,
despite these existing in the OPAM repositories.
Copy link
Contributor

@NathanReb NathanReb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Looking forward to drop this solving method entirely!

@Leonidas-from-XIV Leonidas-from-XIV merged commit a3e29d2 into tarides:main Jul 13, 2022
@Leonidas-from-XIV Leonidas-from-XIV deleted the disable-depext-filtering branch July 13, 2022 10:30
Leonidas-from-XIV added a commit to Leonidas-from-XIV/opam-repository that referenced this pull request Nov 21, 2022
CHANGES:

### Added

- Add support for specifying remote URLs in `x-opam-monorepo-repositories`
  (tarides/opam-monorepo#284, tarides/opam-monorepo#317, @Leonidas-from-XIV)

### Fixed

- Enable locking of packages with depexts even with uninitialized system
  package manager state (tarides/opam-monorepo#322, @Leonidas-from-XIV)
- Fix a bug where `pull` would crash if the lock file contained no package to
  vendor (tarides/opam-monorepo#321, @NathanReb)
- Display a better error message when the depext command fails when getting the
  status of the packages (tarides/opam-monorepo#258, tarides/opam-monorepo#323, @RyanGibb, @Julow)
- Take `archive-mirrors` from the global opam configuration into account to
  allow more local caches (tarides/opam-monorepo#337, @hannesm)
- Log at WARN level when opam-monorepo chooses a source for a package that
  doesn't match the package's version (tarides/opam-monorepo#352, @reynir)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants