-
Notifications
You must be signed in to change notification settings - Fork 368
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: Find the optimal scheme for conf-* packages for maxium coverage and non-overlaping #4440
Comments
Current related PR: https://github.com/ocaml/opam/pull/4441/files and some prior issues related to this: ocaml/opam-repository#15044, ocaml/opam-repository#14906 |
The problem seems to be that take
(see also docs |
As a slight tweak on your suggestion of a distribution-specific moniker, I think what's wanted is a variable whose value describes a package management namespace? So you'd have |
related (linux mint & opensuse) #3692 |
Something like that yeah, except RHEL, CentOS, Fedora and OpenSUSE need to be separate as they have different sets of packages (a bit like the distinction between Ubuntu and Debian) |
if we want to add a new variable |
Actually, it'd be interesting (at some point) to get a handle on just how many packages are different across those in opam-repository - the example above has
and possibly also:
But the script to analyse that will take me more time than the margin of the comment permits 😉 |
Indeed, although perhaps |
I don't think
My point is that for maintenance purpose it is much better to rely on the package set rather than the family (too clumsy), distribution (too many cases) or package manager (too restrictive) |
Maybe |
why not.
|
In case it helps, more data-points / distros where depext does not find the packages to install (because they are referenced under Manjaro:
Pop'OS (System76's distro):
|
Current state of things in opam-repository
Currently depexts in opam-repository (mostly inside
conf-*
packages) typically look like this:This is problematic if we want to support more than just some specific distributions but also their "derived distributions" (e.g. Manjaro for Archlinux, PopOS for Ubuntu, …)
I've tried using
os-family
instead ofos-distribution
for all of them, as it is what is used in opam internally anyway to detect and launch the commands but for selecting package some issues arise from that approach, mainly:In this example requested packages have a different name. However if we were to use
os-family
here it would result in the right behaviour onubuntu-derived
distribution, but not on the main ubuntu as theos-family
variable would pick updebian
.The same thing happens with
centos
being derived fromrhel
but the set of packages can vary wildly (especially given the sub-repositories structure – e.g. EPEL, PowerTools, … – in CentOS)2) To complicate things even further, some distributions might have different names. From https://github.com/ocaml/opam/blob/3ee922d3e621bd0ee7427f33196bd977009131ef/src/state/opamSysInteract.ml for instance, Archlinux can be called
arch
orarchlinux
, Oraclelinux can be calledol
ororaclelinux
, OpenSUSE can be calledsuse
oropensuse
(I remember the change of the last one in OpenSUSE 15.x or whatever, for sure)These things can be encoded using disjunction such as:
However this is getting quite hard to read and maintain with all this.
Does anyone have any idea how to get the clean and easy scheme we already now have but make it work for derived distributions and be maintainable? Maybe by adding a new variable unique to a distribution and its derivatives? Thoughts?
cc @rjbou
The text was updated successfully, but these errors were encountered: