Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Edgar Friendly <thelema314@gmail.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Package installation assumptions made by odb
Date: Mon, 13 Feb 2012 08:53:21 -0500	[thread overview]
Message-ID: <4F3915D1.6090406@gmail.com> (raw)
In-Reply-To: <4F39128D.7020706@lsv.ens-cachan.fr>

On 02/13/2012 08:39 AM, Romain Bardou wrote:
> For instance, I'm currently working on a suite of tools named
> like foo-feature1, foo-feature2, foo-feature3 and so on. The package
> would obviously be named foo, but it does not make sense to have a
> single "foo" executable. It does not make sense to have once package per
> executable either.

If it's all compiled at once, it's probably one package - don't split it 
up.  I see three options:
1) name your package (in odb) foo-feature1 (ugly, but simple and works)
2) provide a dummy executable `foo` for odb to detect
3) convince me that your requirements are common enough to deserve more 
complexity in odb

There's no need for odb to detect (or even know about) all three 
foo-features, it's perfectly fine for it to only know about one of them 
and base its decision to recompile on that one.

> So I guess you need some way to override this
> behavior when needed. Can odb extract this kind of information from an
> _oasis file, or from a META file? I'm not very familiar with those.
>
odb doesn't directly access either of those files.  Oasis-db extracts 
lots of info from _oasis files and make them available to odb in a form 
it understands.  Findlib also handles META files on behalf of odb, 
although for different uses.

> Regarding Melt, I'm a bit confused: you say in this mail that "its odb
> package name could be melt or melt-build, depending on which part of
> melt should be used to detect its installation". But in your guidelines
> it is written: "Programs that are both should do both". By the way, Melt
> actually installs two libraries: Melt and Latex.
>
At the moment, the library/executable distinction is important only for 
detecting installed packages.  If a package is a library, it is 
installed only if ocamlfind knows of an ocamlfind package with the same 
name as the odb package.  Similarly, if a package is a executable, it is 
installed only if `which` knows of that executable name.

> Regarding the version number, if you need to define a standard I think
> it would be good if this standard was to call the executable with the
> "-version" option. It is, after all, the behavior of "ocamlc". This does
> not work for libraries though;

Libraries are not a problem - ocamlfind provides a version for them 
trivially (from their META file).  IIRC, I wrote some code that tried to 
run `foo -version` to get the version of foo, but it looks like I'll 
have to parse the output of most programs looking for a version number.

E.

      parent reply	other threads:[~2012-02-13 13:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-11 21:10 Edgar Friendly
2012-02-13 11:01 ` Arnaud Spiwack
2012-02-13 13:04   ` Edgar Friendly
2012-02-13 13:39     ` Romain Bardou
2012-02-13 13:46       ` Török Edwin
2012-02-13 13:53       ` Edgar Friendly [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F3915D1.6090406@gmail.com \
    --to=thelema314@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox