Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allowing packages to override default environment updates #6051

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Jun 24, 2024

Opening this is as a draft PR so it doesn't get forgotten. This has come up in the context of ocaml/opam-repository#25928.

The problem is that it is not possible for a package to prepend a directory before opam's bin directory in PATH and this feels like a mistake. Given, say, /usr/local/bin:/usr/bin:/bin etc. in a standard posix PATH, it feels reasonable that opam prepends the switch bin directory before packages - i.e. we have <package-PATH-directory>:<switch-PATH-directory>:/usr/local/bin:/usr/bin:/bin. This is also mildly more coherent with other environment variable updates in build-env, which the manual explicitly states can be overridden.

In the context of the opam-repository PR above, it means that

build-env: PATH += "%{some-package:share}%/bin"

doesn't allow binaries in the additional directory to override those in the switch directory, which seems incorrect.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant