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

Where does <pkg>.install belongs? #31

Open
gildor478 opened this issue Dec 9, 2016 · 2 comments
Open

Where does <pkg>.install belongs? #31

gildor478 opened this issue Dec 9, 2016 · 2 comments

Comments

@gildor478
Copy link
Member

Forking the discussion on #29

For .install, the OPAM manual indeed [talks about that file] (https://opam.ocaml.org/doc/Manual.html#packagenameinstall) without expressing a clear preference. A discussion — somewhere on Github I think — made clear however that <pkg>.install files are not welcome in the opam-repository in order not to "pollute" everybody with extra files that may not be useful for them.

Not sure to understand where the .install should be ?

  1. in the upstream source?
    I don't see the use of it in there. Except for OPAM, it won't be useful (hence polluting the source).
  2. in the OPAM repository?
    I thought it was a good option. If you can point me to the right place for the mentioned discussion. that would be nice.
@Chris00
Copy link
Member

Chris00 commented Dec 9, 2016

It is 1. See #24

An alternative may be to add commands to the opam file to preserve (and then remove) the files. If oasis2opam becomes a plugin, ocaml setup.ml -install -opam (or similar) could just generate an <pkg>.install file for opam to use.

@gildor478
Copy link
Member Author

You mean that we should generate a .install when we actually install the files in OPAM?

I think that is totally do-able with an "Extra" plugin (just like the "META" plugin).

If we do it this way, the user will have to add this to its _oasis file:

Plugins: oasis2opam (0.7), META (0.4)...

This will add some code in setup.ml that can generate a .install and some extra configure flags (--enable-opam-install).

The opam file generated need to invoke

$ ocaml setup.ml -configure --enable-opam-install

During the install, it will generate an extra .install that can be used to uninstall (if I understand correctly).

I think in this case, you don't have to move setup.* into etc and you can focus on only what has been installed.

N.B: this kind of plugin is an OASIS plugin (activated inside _oasis, rather than on command line).

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

No branches or pull requests

2 participants