registration tricks (cabal)

Isaac Jones ijones at
Sun Feb 13 22:01:52 EST 2005

Mighty Haskellers,

I'm afraid we've never had a very good story about how to run
"register" and "unregister" on a target machine which is different
from the machine that a cabal package was built on.

This comes up when building Debian or RPM packages which get copied
into a temporary location, packaged up, and shipped off to an end
user's machine.

The closest I've come is to say that after installing into a temporary
directory, you should bring the Setup script (and the .cabal file, and
the .installed-pkg-info file) along and rerun it on the target
machine, which probably has cabal anyway.

This should work fine, but it's a little heavy handed for a one-line
call to ghc-pkg.  Yesterday someone suggested that instead of doing
this, we could emit a little shell script / batch file (which might
even contain the .installed-pkg-info file) and just run that on the
target machine.

So I'm thinking of adding a flag to register and unregister, maybe
--dry-run or something which does _not_ register right away, but
rather emits such a script.  This is actually a pretty small change,
but I wanted to check with you folks before adding it, since we're so
close to a release.

Does anyone see any problems with this?



More information about the Libraries mailing list