Search code examples
ocamlopam

In Opam how do I tell which package owns a given file?


In Opam how do I tell which package owns a given file under ${OPAMROOT}/system? If there is no direct mean to achieve this, is it possible to list files owned by a given package?


Solution

  • There is no such facility, as opam allows packages to install their files virtually everywhere. But in general structure is quite simple and most packages respect it:

    1. Each installed package has its own subfolder in lib, etc, doc and share.
    2. For each package opam creates an entry install/<package-name>.install that may contain files that this package installed, if special facilities, provided by opam, were used in the installation process.
    3. binaries are put into bin or sbin without further subdivision.