caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Creating fresh OPAM repository
@ 2012-12-11 15:06 Dario Teixeira
  2012-12-11 15:55 ` Thomas Gazagnaire
  0 siblings, 1 reply; 6+ messages in thread
From: Dario Teixeira @ 2012-12-11 15:06 UTC (permalink / raw)
  To: OCaml mailing-list

Hi,


How does one create a fresh repository with OPAM?  The documentation has plenty
of examples of cloning existing repos, but what I want is to start an empty one on the
local filesystem.  Does the OPAM tool have some option for this, or is one supposed
to do it "by hand", ie, create a filesystem structure that mimics existing repos?

Best regards,
Dario Teixeira


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Creating fresh OPAM repository
  2012-12-11 15:06 [Caml-list] Creating fresh OPAM repository Dario Teixeira
@ 2012-12-11 15:55 ` Thomas Gazagnaire
  2012-12-11 16:31   ` Dario Teixeira
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Gazagnaire @ 2012-12-11 15:55 UTC (permalink / raw)
  To: Dario Teixeira; +Cc: OCaml mailing-list

Hi Dario,

> How does one create a fresh repository with OPAM?  The documentation has plenty
> of examples of cloning existing repos, but what I want is to start an empty one on the
> local filesystem.  Does the OPAM tool have some option for this, or is one supposed
> to do it "by hand", ie, create a filesystem structure that mimics existing repos?

If you want to start an empty local repository in /foo/bar, just run:

$ opam remote local /foo/bar

(you can replace 'local' by any other name in the previous commands, it's just a way to identify the repository)

After that, you can:
* either populate it incrementally by adding the usual '/foo/bar/packages/NAME.VERSION/{opam,url,descr}' for package descriptions and '/foo/bar/compilers/VERSION+NAME.comp' for  compiler description. Don't forget to update your repository by doing 'opam update local' to take these changes into account; or
* use 'opam upload'. This is however not yet tested as well as the first solution. If you use it and found some issues, please do not hesitate to fill a bug.

--
Thomas


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Creating fresh OPAM repository
  2012-12-11 15:55 ` Thomas Gazagnaire
@ 2012-12-11 16:31   ` Dario Teixeira
  2012-12-11 16:48     ` Anil Madhavapeddy
  0 siblings, 1 reply; 6+ messages in thread
From: Dario Teixeira @ 2012-12-11 16:31 UTC (permalink / raw)
  To: Thomas Gazagnaire; +Cc: OCaml mailing-list

Hi,

> If you want to start an empty local repository in /foo/bar, just run:

> 
> $ opam remote local /foo/bar
> 
> (you can replace 'local' by any other name in the previous commands, 
> it's just a way to identify the repository)

Thanks for the prompt reply, Thomas.  The command you suggested
does not seem to work, at least with OPAM version 0.8.1.

The error message suggests that one of -add, -rm, or -list must be given.
However, all the following fail:

  opam remote -add local /foo/bar
  opam remote -add local file:///foo/bar
  opam remote -add -kind local local /foo/bar
  opam remote -add -kind local local file:///foo/bar

The 'remote' subcommand seems to expect an already formed repository
at the given address.

Any ideas?

Thanks in advance!
Dario Teixeira


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Creating fresh OPAM repository
  2012-12-11 16:31   ` Dario Teixeira
@ 2012-12-11 16:48     ` Anil Madhavapeddy
  2012-12-11 16:52       ` Thomas Gazagnaire
  2012-12-11 18:40       ` Dario Teixeira
  0 siblings, 2 replies; 6+ messages in thread
From: Anil Madhavapeddy @ 2012-12-11 16:48 UTC (permalink / raw)
  To: Dario Teixeira; +Cc: Thomas Gazagnaire, OCaml mailing-list

On 11 Dec 2012, at 16:31, Dario Teixeira <darioteixeira@yahoo.com> wrote:

> Hi,
> 
>> If you want to start an empty local repository in /foo/bar, just run:
> 
>> 
>> $ opam remote local /foo/bar
>> 
>> (you can replace 'local' by any other name in the previous commands, 
>> it's just a way to identify the repository)
> 
> Thanks for the prompt reply, Thomas.  The command you suggested
> does not seem to work, at least with OPAM version 0.8.1.
> 
> The error message suggests that one of -add, -rm, or -list must be given.
> However, all the following fail:
> 
>   opam remote -add local /foo/bar
>   opam remote -add local file:///foo/bar
>   opam remote -add -kind local local /foo/bar
>   opam remote -add -kind local local file:///foo/bar
> 
> The 'remote' subcommand seems to expect an already formed repository
> at the given address.

Just mkdir the directory first.  There's nothing special about a local remote
except that a "packages" directory is expected.

$ mkdir -p /foo/bar/packages
$ opam remote -add local /foo/bar

should (hopefully) do the trick.

-anil

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Creating fresh OPAM repository
  2012-12-11 16:48     ` Anil Madhavapeddy
@ 2012-12-11 16:52       ` Thomas Gazagnaire
  2012-12-11 18:40       ` Dario Teixeira
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Gazagnaire @ 2012-12-11 16:52 UTC (permalink / raw)
  To: Anil Madhavapeddy; +Cc: Dario Teixeira, OCaml mailing-list

> Just mkdir the directory first.  There's nothing special about a local remote
> except that a "packages" directory is expected.
> 
> $ mkdir -p /foo/bar/packages
> $ opam remote -add local /foo/bar
> 
> should (hopefully) do the trick.

Indeed, sorry for the confusion, you need to add '-add' and /foo/bar must already exists (and can be empty -- the package subdir is not mandatory).

Thomas


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] Creating fresh OPAM repository
  2012-12-11 16:48     ` Anil Madhavapeddy
  2012-12-11 16:52       ` Thomas Gazagnaire
@ 2012-12-11 18:40       ` Dario Teixeira
  1 sibling, 0 replies; 6+ messages in thread
From: Dario Teixeira @ 2012-12-11 18:40 UTC (permalink / raw)
  To: Anil Madhavapeddy; +Cc: Thomas Gazagnaire, OCaml mailing-list

Hi,

> Just mkdir the directory first.  There's nothing special about a local 

> remote
> except that a "packages" directory is expected.
> 
> $ mkdir -p /foo/bar/packages
> $ opam remote -add local /foo/bar
> 
> should (hopefully) do the trick.

Yes, that did the trick -- thank you!  The only other "tricky" thing
I came across is that the individual package directories under
'packages' should be named using a dot to separate the package
name from the package version (probably because the customary
dash would be ambiguous, since it also appears frequently in
package names)...

Best regards,
Dario Teixeira

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-12-11 18:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-11 15:06 [Caml-list] Creating fresh OPAM repository Dario Teixeira
2012-12-11 15:55 ` Thomas Gazagnaire
2012-12-11 16:31   ` Dario Teixeira
2012-12-11 16:48     ` Anil Madhavapeddy
2012-12-11 16:52       ` Thomas Gazagnaire
2012-12-11 18:40       ` Dario Teixeira

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).