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

opam: retrieve package changelogs, docs, sources, examples, bugreports #466

Closed
edwintorok opened this issue Feb 13, 2013 · 3 comments
Closed

Comments

@edwintorok
Copy link

Thinking about apt-get vs opam there are a few features I'm missing, nothing major
but they would come in handy. Consider this a feature request.

opam info provides some basic information, but there is more info that could be provided:

  1. documentation/examples

Packages probably have a README, and possible some documentation (APIdocs, or perhaps more). Some have examples (sometimes disguised as testcases).
It would be useful to have an easy way of accessing these (short of downloading the full source code and unpacking or looking through all installed files).
This is somewhat related to #249 which got implemented.

  1. list of installed files (aka dpkg -L ), and findlib libraries

It'd also be useful if 'opam search' would know to search by findlib library (in case findlib name != package name).

For example: 'opam search netstring' could tell me its provided by ocamlnet, or
that 'opam search lwt.ssl' is provided by lwt if I install also 'ssl'.

  1. changelog (aka apt-get changelog )

Each opam package should have a changelog, which summarize both package-related and upstream changes.
Since git is already used to manage the opam repository, then the package-specific changelog could be generated by the commit message(s) of the pull request on opam-repository.
For the upstream changelog you could use the one provided by upstream (if any), or generate it from upstream's git repository.

  1. retrieve source code (aka apt-get source)
    Currently I do this by looking at $HOME/.opam/repo/default/packages//url and manually grabbing them, for various reasons (see the other bullet points).
    Having an opam command to do that would be handy.
  2. more package metadata
    I know that opam already supports quite a lot of metadata, but many packages don't use them. Perhaps some tool could be used to automatically import them from _oasis.

Here is what I've come to expect from a Debian package for example (besides obvious things like name, version and a short description):

  • dependencies (mandatory and optional ones)
  • a long description
  • upstream homepage
  • tags to categorize (could you use the info from the caml humps for this?)

Some more that would be useful:

  • upstream source repository
  • upstream preferred bugreport URL
    For example I'm often uncertain if build failures should be reported to opam-repository or upstream (I've been filing them on opam-repostitory). Will the package maintainer / upstream get notified of these?
  1. retrieve bugreports

apt-get has a plugin apt-listchanges that automatically searches Debian bugzilla for serious bugs related to the new package version. This is quite useful at times, for example if installing a package would break things.
Something similar could be done with opam and the github API searching opam-repository for bugreports/known issues related to the new package version.
Or perhaps this could be handled entirely serverside, i.e. when a package gets a build failure, or a bugreport some information about that is automatically added to a file in the opam root, like pkgbugs:
<v0.2> bug#100: fails to build on Foo
<v0.2> bug#101: fails to build if /tmp is mounted no-exec
....

And when you want to install the package you'd get a warning about what bugs are known about it.

@samoht
Copy link
Member

samoht commented Feb 13, 2013

Lot of good ideas here, thanks!

Could you try to prioritize some of these features ? Which ones do you think are the most "urgent" ?

@edwintorok
Copy link
Author

  • easy access to package documentation/examples
  • easy access to source code
  • list of installed files
  • ... the rest are fairly minor

@samoht
Copy link
Member

samoht commented Aug 8, 2013

Thanks for all the good ideas. Lot of them has been implemented in OPAM 1.1, I've added links to the already opened relevant issues and created new issues for the last missing ideas.

So I think I can close this issue now. Please feel free to contribute new ideas for the next release!

@samoht samoht closed this as completed Aug 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants