caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Francois Berenger <francois.berenger@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] How to create a local opam repository for offline use?
Date: Mon, 4 Jan 2016 17:08:53 +0100	[thread overview]
Message-ID: <568A9915.7000006@inria.fr> (raw)
In-Reply-To: <568A848A.50108@cea.fr>

On 01/04/2016 03:41 PM, François Bobot wrote:
> Hello,
>
> On 04/01/2016 09:39, Francois Berenger wrote:
>> What is the current procedure to prepare an opam repository
>> so that a machine that has no internet access can still use
>> opam ?
>>
>> Furthermore, is it possible to create a minimal opam repository,
>> so also for offline use, but let's say I know only a single
>> software with all its dependencies will be installed by the
>> offline machine.
>> Because, I am foreseeing that downloading all tarballs of all possible
>> ocaml software/libraries might exhaust my patience.
>
> The relevant issues are, I think:
> https://github.com/ocaml/opam/issues/2098
>
> And a PR that solve some remaining problems with virtual packages:
> https://github.com/ocaml/opam/pull/2257
>
> However I need to rewrite it in order to have something less hackish.

OK, thanks for the info, so here is a recipe that worked for me:

wget https://github.com/ocaml/opam-repository/archive/master.tar.gz
tar xzf master.tar.gz
cd opam-repository-master
opam-admin make --resolve PKG
# here I needed to remove
# ocamlbuild from the depends field in the opam file of several packages
# so that the solver finally succeed, so opam-admin-make probably has
# a bug
opam repo add offline $PWD
opam repo remove default # then I have only one opam repository setup
# here I turned off my network card
opam update
opam install PKG # worked using tarballs from the local-disk only

-- 
Regards,
Francois.
"When in doubt, use more types"

      reply	other threads:[~2016-01-04 16:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-04  8:39 Francois Berenger
2016-01-04 14:41 ` François Bobot
2016-01-04 16:08   ` Francois Berenger [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=568A9915.7000006@inria.fr \
    --to=francois.berenger@inria.fr \
    --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;
as well as URLs for NNTP newsgroup(s).