Skip to content

Please add --licensedir flag to cabal-install #5281

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

Open
peti opened this issue Apr 23, 2018 · 4 comments · May be fixed by #5323
Open

Please add --licensedir flag to cabal-install #5281

peti opened this issue Apr 23, 2018 · 4 comments · May be fixed by #5323

Comments

@peti
Copy link
Collaborator

peti commented Apr 23, 2018

Currently, cabal install license files into the location given by --docdir. Many distributions, however, have a special location into which license files (and nothing else) should be placed, i.e. both SUSE and Fedora use /usr/share/licenses/PKGNAME for that purpose. It would be nice if we could have Cabal install those license files into the correct location right away, instead of having to move the files around after the fact.

@hvr
Copy link
Member

hvr commented May 2, 2018

there's a problem though: for tooling I'm working on I need to be able to locate the license files; the docdir is registered in the pkg-db; so locating the licence file is doable now by querying the pkg-db for the docdir, and working from there.

If we add a licensdir, we need to extend the IPI format to register this new location

moreover, we have additional problems with the current install-logic which I intended to address to avoid licence files overwriting or being overwritten by name-clashes (ticket pending)

@juhp
Copy link
Collaborator

juhp commented May 14, 2018

@hvr can you explain in more detail? Eg I don't see any docdir in package .conf files?

Anyway seems to me Cabal happily breaks API for major versions, though I see what you are saying :)

juhp added a commit that referenced this issue May 14, 2018
- needed for modern RPM-based Linux distros like Fedora and SUSE
- still defaults to docdir
juhp added a commit that referenced this issue May 14, 2018
- needed for modern RPM-based Linux distros like Fedora and SUSE
- defaults to docdir
@hvr
Copy link
Member

hvr commented May 14, 2018

Breaking the API isn't a big deal if all you need to do is to change your code; but in this case you'd make it impossible to adapt to the new API, as you'd remove the ability to locate those files via the pkg-db metadata

juhp added a commit that referenced this issue May 14, 2018
- needed for modern RPM-based Linux distros like Fedora and SUSE
- defaults to docdir
@juhp
Copy link
Collaborator

juhp commented May 14, 2018

So we need to add licensedir to pkg-db too?

I just don't understand how docdir is getting into it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants