with apologies

Platforms, Packaging, Progress— Addendum

Richard Mortier September 01, 2017

This is a short addendum to my post of a couple of days ago caused by my carelessness in writing the OPAM file. Careful readers will observe the lack of any dependency on notty. Read on for what happened next…

The result of this carelessness was that everything worked just fine locally, but my PR to the OPAM package repository failed. Cue much wailing and gnashing of teeth.

However, thanks to a moment’s assistance from Daniel Bünzli, this was easy to fix:

$ git checkout 0.2.0       # checkout the relevant release version tag
$ topkg opam pkg           # create the release metadata
$ e _build/ocal.0.2.0/opam # invoke editor so I can add the missing dep
$ topkg opam submit        # submit the updated OPAM metadata, updating the PR
Submitting _build/ocal.0.2.0
[ocal-0.2.0.tbz] http://github.com/mor1/ocal/releases/download/0.2.0/ocal-0.2.0.tbz downloaded
Updating existing pull-request #10176
Pull-requested: https://github.com/ocaml/opam-repository/pull/10176

For me, the main thing to note here is that the OPAM metadata in the repo at the commit ref tagged for release doesn’t match that which OPAM uses to install the release. But as Sebastien Mondet pointed out to me, this is neither relevant nor (in the long term) likely, as (e.g.) version constraints on dependencies may need to be added to old versions of dependent packages to keep them working. (Though I did add and commit the dependency to master, naturally.)

So, all-in-all, an easy fix to a common problem. Which is the way it should be…