Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 113 lines (83 sloc) 4.374 kb
7892d49 Towards the complete support of "opam switch".
Frédéric Tuong authored
1 (***********************************************************************)
2 (* *)
3 (* Copyright 2012 OCamlPro *)
4 (* Copyright 2012 INRIA *)
5 (* *)
6 (* All rights reserved. This file is distributed under the terms of *)
7 (* the GNU Public License version 3.0. *)
8 (* *)
4ca3c23 Thomas Gazagnaire Remove TypeRex from headers
samoht authored
9 (* OPAM is distributed in the hope that it will be useful, *)
7892d49 Towards the complete support of "opam switch".
Frédéric Tuong authored
10 (* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
11 (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *)
12 (* GNU General Public License for more details. *)
13 (* *)
14 (***********************************************************************)
15
aa67aa9 Thomas Gazagnaire Big refactoring work.
samoht authored
16 (** Mangagement of OPAM repositories. *)
bd3a033 Thomas Gazagnaire [repo-server] read/write OPAM server can now be used as a repository plu...
samoht authored
17
aa67aa9 Thomas Gazagnaire Big refactoring work.
samoht authored
18 open OpamTypes
7892d49 Towards the complete support of "opam switch".
Frédéric Tuong authored
19
0256cca Warn user when trying to add a repository that specifies an unsupported ...
Vincent Bernardoff authored
20 exception Unknown_backend
21
aa67aa9 Thomas Gazagnaire Big refactoring work.
samoht authored
22 include OpamMisc.ABSTRACT with type t = repository
23
24 (** Default repository *)
25 val default: repository
26
27 (** Constructor *)
28 val create: name:string -> kind:string -> address:string -> repository
29
30 (** Create a dummy local repository *)
31 val local_repo: unit -> OpamPath.Repository.r
32
33 (** Create a dummy remote repository *)
34 val remote_repo: dirname -> OpamPath.Repository.r
35
f09920f Thomas Gazagnaire Start fixing the converter from 0.3 to 0.4
samoht authored
36 (** Initialize {i $opam/repo/$repo} *)
37 val init: repository -> unit
38
dd85106 Thomas Gazagnaire Fix basic functional tests for 0.4
samoht authored
39 (** Update {i $opam/repo/$repo} *)
f09920f Thomas Gazagnaire Start fixing the converter from 0.3 to 0.4
samoht authored
40 val update: repository -> unit
41
dd85106 Thomas Gazagnaire Fix basic functional tests for 0.4
samoht authored
42 (** Download {i $opam/repo/$repo/archive/$nv.tar.gz} *)
aa67aa9 Thomas Gazagnaire Big refactoring work.
samoht authored
43 val download: repository -> package -> unit
f09920f Thomas Gazagnaire Start fixing the converter from 0.3 to 0.4
samoht authored
44
dd85106 Thomas Gazagnaire Fix basic functional tests for 0.4
samoht authored
45 (** Upload the content of {i $opam/repo/$repo/upload} to the remote
46 repository.*)
f09920f Thomas Gazagnaire Start fixing the converter from 0.3 to 0.4
samoht authored
47 val upload: repository -> unit
48
a1beb23 Thomas Gazagnaire Update HTML doc
samoht authored
49 (** {2 Repository backends} *)
f09920f Thomas Gazagnaire Start fixing the converter from 0.3 to 0.4
samoht authored
50
0c21f91 Thomas Gazagnaire Simplification of backends code
samoht authored
51 (** Backend signature *)
52 module type BACKEND = sig
53
dd85106 Thomas Gazagnaire Fix basic functional tests for 0.4
samoht authored
54 (** Initialize an OPAM repository in the current directory. The
55 argument is the remote repository address. *)
56 val init: address -> unit
0c21f91 Thomas Gazagnaire Simplification of backends code
samoht authored
57
dd85106 Thomas Gazagnaire Fix basic functional tests for 0.4
samoht authored
58 (** Update the OPAM repository in the current directory. Return the
59 list of locally updated files. *)
aa67aa9 Thomas Gazagnaire Big refactoring work.
samoht authored
60 val update: address -> OpamFilename.Set.t
0c21f91 Thomas Gazagnaire Simplification of backends code
samoht authored
61
dd85106 Thomas Gazagnaire Fix basic functional tests for 0.4
samoht authored
62 (** Download a (remote) archive file, stored on the (remote) OPAM
63 repository, in the current repository. Return the local path to
64 the downloaded archive.*)
aa67aa9 Thomas Gazagnaire Big refactoring work.
samoht authored
65 val download_archive: address -> package -> filename download
0c21f91 Thomas Gazagnaire Simplification of backends code
samoht authored
66
dd85106 Thomas Gazagnaire Fix basic functional tests for 0.4
samoht authored
67 (** Download a (remote) file and return the local path to the
68 downloaded file. As the opposite to [download_archive], the
69 downloaded file needs not to be stored on the remote
70 repository. If needed, the function can use {i $repo/tmp/$nv/}
71 to store transient states between downloads. *)
aa67aa9 Thomas Gazagnaire Big refactoring work.
samoht authored
72 val download_file: package -> filename -> filename download
0c21f91 Thomas Gazagnaire Simplification of backends code
samoht authored
73
dd85106 Thomas Gazagnaire Fix basic functional tests for 0.4
samoht authored
74 (** Download a (remote) directory and return the local path to the
75 downloaded directory. If needed, the function can use {i
76 $repo/tmp/$nv/} to store transient states between downloads. *)
aa67aa9 Thomas Gazagnaire Big refactoring work.
samoht authored
77 val download_dir: package -> ?dst:dirname -> dirname -> dirname download
0c21f91 Thomas Gazagnaire Simplification of backends code
samoht authored
78
dd85106 Thomas Gazagnaire Fix basic functional tests for 0.4
samoht authored
79 (** Upload the content of the current directory to the directory
80 given as argument. Return the local paths corresponding to the
81 uploaded local files. *)
aa67aa9 Thomas Gazagnaire Big refactoring work.
samoht authored
82 val upload_dir: address:address -> dirname -> OpamFilename.Set.t
f09920f Thomas Gazagnaire Start fixing the converter from 0.3 to 0.4
samoht authored
83
0c21f91 Thomas Gazagnaire Simplification of backends code
samoht authored
84 end
85
86 (** Register a repository backend *)
87 val register_backend: kind -> (module BACKEND) -> unit
88
d894f34 Thomas Gazagnaire [pin] Now pin uses the same code path as other download operations. This...
samoht authored
89 (** Find a backend *)
90 val find_backend: kind -> (module BACKEND)
91
92 (** Copy the additional package files in the current dir *)
aa67aa9 Thomas Gazagnaire Big refactoring work.
samoht authored
93 val copy_files: OpamPath.Repository.r -> package -> OpamFilename.Set.t
d894f34 Thomas Gazagnaire [pin] Now pin uses the same code path as other download operations. This...
samoht authored
94
dd85106 Thomas Gazagnaire Fix basic functional tests for 0.4
samoht authored
95 (** [make_archive repo_kind nv] build ./$nv.tar.gz, assuming the
d894f34 Thomas Gazagnaire [pin] Now pin uses the same code path as other download operations. This...
samoht authored
96 repository kind is [repo_kind].
97 By default, the digest that appear in
98 {i $NAME.$VERSION/url} is not modified,
fff1b3b [opam-mk-repo] new option "-generate-checksums" to automatically insert ...
Frédéric Tuong authored
99 unless [gener_digest = true] is given. *)
aa67aa9 Thomas Gazagnaire Big refactoring work.
samoht authored
100 val make_archive: ?gener_digest:bool -> ?local_path:dirname -> package -> unit
101
102 (** Get the list of packages *)
103 val packages: OpamPath.Repository.r -> package_set
104
105 (** Get the list of compilers *)
106 val compilers: OpamPath.Repository.r -> compiler_version_set
107
108 (** Get the available versions for a given compiler *)
109 val versions: OpamPath.Repository.r -> name -> version_set
110
111 (** Get the external files associated to a package *)
112 val files: OpamPath.Repository.r -> package -> filename_set
Something went wrong with that request. Please try again.