From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 58E857EEAF for ; Fri, 18 Jan 2013 11:42:06 +0100 (CET) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of anil@recoil.org) identity=pra; client-ip=89.16.177.154; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="anil@recoil.org"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of anil@recoil.org) identity=mailfrom; client-ip=89.16.177.154; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="anil@recoil.org"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@dark.recoil.org) identity=helo; client-ip=89.16.177.154; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="postmaster@dark.recoil.org"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ak0CAFkm+VBZELGagWdsb2JhbABFvkwOAQEWJieCHgEBBAF5BQsLGC5XBhOIEwoIvA2QWGEDlgyBHJIi X-IronPort-AV: E=Sophos;i="4.84,491,1355094000"; d="scan'208";a="168904071" Received: from recoil.dh.bytemark.co.uk (HELO dark.recoil.org) ([89.16.177.154]) by mail4-smtp-sop.national.inria.fr with SMTP; 18 Jan 2013 11:42:05 +0100 Received: (qmail 10813 invoked by uid 634); 18 Jan 2013 10:42:04 -0000 X-Spam-Level: * X-Spam-Check-By: dark.recoil.org Received: from volstagg-0.srg.cl.cam.ac.uk (HELO [10.0.0.83]) (128.232.32.232) (smtp-auth username remote@recoil.org, mechanism cram-md5) by dark.recoil.org (qpsmtpd/0.84) with ESMTPA; Fri, 18 Jan 2013 10:42:04 +0000 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) From: Anil Madhavapeddy In-Reply-To: <50F92486.2020704@frisch.fr> Date: Fri, 18 Jan 2013 10:42:04 +0000 Cc: Thomas Gazagnaire , OCaml mailing-list , Mirage List Content-Transfer-Encoding: quoted-printable Message-Id: References: <6833F17C-B642-4ED9-8C8F-2665A9742845@ocamlpro.com> <50F831B6.6020404@frisch.fr> <224865B3-055C-4E03-AA42-9F962AD516D7@recoil.org> <50F92486.2020704@frisch.fr> To: Alain Frisch X-Mailer: Apple Mail (2.1499) X-Virus-Checked: Checked by ClamAV on dark.recoil.org Subject: Re: [Caml-list] [ANN] beta-release of OPAM On 18 Jan 2013, at 10:31, Alain Frisch wrote: > On 01/17/2013 06:22 PM, Anil Madhavapeddy wrote: >> I added `opam switch 4.01.0dev+trunk` recently, which will grab the late= st trunk snapshot. >> To reinstall it and refresh to a newer snapshot, just do `opam switch re= install 4.01.0dev+trunk`, which will also attempt to recompile any packages= you had in there before. >=20 > Thanks, this is exactly what I wanted! >=20 > Shouldn't the package be called simply "trunk", without a reference to a = version number? Yeah, but OPAM also has compiler version constraints, so that you can mark = a package as requiring {>=3D4.00} for example. If the package is just mark= ed trunk, then we need to manually record the version number somewhere. One option is to have a very high version, so that any packages with a lowe= r bound will continue to work. The other option (which I chose) is to pick= the current working version, since compiler releases only happen a couple = of times a year. We can improve on this... > I've started to play with opam a little bit, and it's a surprisingly plea= sant experience. Thanks to everyone who contributed to this project! >=20 > Now I want to create my first package. I've followed the instructions fr= om http://opam.ocamlpro.com/doc/Packaging.html but I don't know where to fi= nd opam-mk-repo (I've installed opam from the amd64 linux binary). (that binary is hopefully just a stopgap until the OPAM binary packages bec= ome more widely available) opam-mk-repo is installed as part of OPAM, so you'll need to install from s= ource. However, you don't actually need to create a repository unless you = want to host a mirror of the tarballs. Simply try this: $ mkdir -p my-repo/packages $ opam remote add localdev my-repo $ opam update $ opam install The same applies for compilers. If you specify a git:// or darcs:// URL in the package `url` file, a subseq= uent `opam update` will refresh the working copy from the remote source. If you want to work with a local copy of that package, just do `opam pin `. If you want the bleeding edge version of a stable package, you can even do = `opam pin git://foo/bar`. Quite the swiss-army knife, but each of those scenarios has come in useful = at one point or another, particularly when hacking on Mirage which requires= rebuilding lots of forward dependencies if (e.g.) a network driver library= is being modified. -anil=