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

depexts: Disable the detection of available packages on RHEL-based distributions #4791

Merged
merged 1 commit into from
Sep 13, 2021

Conversation

kit-ty-kate
Copy link
Member

#4790 shows that yum list is an unreliable command to use and no options seems to be available to make it so.
#4759 also shows that RHEL-based distributions have virtual packages that opam is not taking into account.

For these two reasons I propose we simply remove the use of yum list in favour of rpm -qa which seems way more reliable and leaps faster (~0.1s vs. ~2s!!).

Sadly we incidently disable the detection of available packages and thus revert to the behaviour of the opam-depext plugin.
IMO this is not a big deal as only a few distributions that we support actually have it disabled as well due to the method to acquire the data being either incomplete or too tedious/unreliable. This is the case currently (in 2.1.0) for FreeBSD, Gentoo, Homebrew, NetBSD and OpenBSD

@bikallem
Copy link

bikallem commented Aug 9, 2021

I just tried the fix-2 branch and it seems to work, i.e. opam update, opam install seems to work correctly even in the presence of a corrupted yum repository.

src/state/opamSysInteract.ml Outdated Show resolved Hide resolved
@rjbou rjbou added the PR: QUEUED Pending pull request, waiting for other work to be merged or closed label Aug 23, 2021
@rjbou
Copy link
Collaborator

rjbou commented Aug 23, 2021

Good to go for me (with comment), it just need to be updated on github action depext test once finished.

@rjbou rjbou added PR: NEEDS UPDATE and removed PR: QUEUED Pending pull request, waiting for other work to be merged or closed labels Aug 30, 2021
@rjbou
Copy link
Collaborator

rjbou commented Sep 13, 2021

Thanks!

@rjbou rjbou merged commit 78093ea into ocaml:master Sep 13, 2021
@rjbou rjbou mentioned this pull request Sep 20, 2021
Leonidas-from-XIV added a commit to Leonidas-from-XIV/opam-monorepo that referenced this pull request May 2, 2023
As ocaml/opam#4791 removed support for detection
of available packages on Fedora and according to @kit-ty-kate the
detection is very dependent on the system, this test is too flaky to be
useful.
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.

3 participants