This is the mail archive of the cygwin-apps mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

how to use opam for package builds?

orpie recently changed to an opam-based build system. So I want to use opam
to update it for Cygwin, but I've never used opam before and I have some
questions about how to use it.

The orpie build instructions say just to run "opam install orpie". When I
do that, opam complains that I haven't set it up yet:

    $ opam install orpie
    [ERROR] No OPAM root found at /home/andrew/.opam.
            Please run 'opam init' to initialize the state of OPAM, or
specify '--root'.
            See 'opam init --help' for details.

Now for packaging, what's the right thing to do here? For example I could
create the following install function for Cygport:

    opam init
    opam install orpie

But this has two problems:

(1) I can't get "opam init" to complete. It hangs after "synchronized from";, until I interrupt it:

    $ opam init
    Checking for available remotes: rsync and local, git, mercurial.
      - you won't be able to use darcs repositories unless you install the
darcs command on your system.
    [WARNING] Recommended external solver aspcud not found.

    =-=- Fetching repository information
    [default] synchronized from
    ### hangs here until I hit ctrl-C: ###
    [ERROR] Initialisation failed
    User interruption
    # opam-version    1.2.2
    # os              cygwin
    Cannot remove /home/andrew/.opam (error 255).

(2) Even if I get this to work, I don't think it's the right thing to do
because it's setting up persistent opam configuration in my home directory,
which I don't think is the right place for packaging. Should there be some
global opam configuration, that all packaging scripts that rely on opam
would use? If so, where should that go?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]