Skip to content

Commit

Permalink
Merge branch 'master' of github.com:OCamlPro/opam
Browse files Browse the repository at this point in the history
  • Loading branch information
samoht committed Sep 28, 2012
2 parents c81e7a7 + b378116 commit 1231800
Show file tree
Hide file tree
Showing 12 changed files with 200 additions and 200 deletions.
2 changes: 1 addition & 1 deletion opam.ocp
Expand Up @@ -21,7 +21,7 @@ begin library "opam-lib"
"lexer.mll"
"linelexer.mll"
"parser.mly"
"file.ml"
"opamFile.ml"
"path.ml"
"repositories.ml"
]
Expand Down
340 changes: 170 additions & 170 deletions src/client.ml

Large diffs are not rendered by default.

File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/path.ml
Expand Up @@ -147,7 +147,7 @@ module G = struct
let repo_index t = t / "repo" // "index"

let available_aliases t =
let l = List.map fst (File.Aliases.safe_read (aliases t)) in
let l = List.map fst (OpamFile.Aliases.safe_read (aliases t)) in
Alias.Set.of_list l
end

Expand Down
4 changes: 2 additions & 2 deletions src/repo/curl.ml
Expand Up @@ -47,7 +47,7 @@ let make_state ~download_index remote_path =
) else
local_index_file in
let remote_local, local_remote, local_files, file_permissions, file_digests =
let urls = File.Urls_txt.read index in
let urls = OpamFile.Urls_txt.read index in
let remote_local, local_remote, locals, perms, digests =
Remote_file.Set.fold (fun r (rl, lr, locals, perms, digests) ->
let base = Remote_file.base r in
Expand Down Expand Up @@ -209,7 +209,7 @@ let make_urls_txt local_repo =
@ Filename.list (Path.R.archives_dir local_repo)
@ Filename.list (Path.R.compilers_dir local_repo)
)) in
File.Urls_txt.write local_index_file index;
OpamFile.Urls_txt.write local_index_file index;
index

let make_index_tar_gz local_repo =
Expand Down
6 changes: 3 additions & 3 deletions src/repo/git.ml
Expand Up @@ -45,7 +45,7 @@ module B = struct

let check_file file =
let local_repo = Path.R.cwd () in
let updates = File.Filenames.read (updates local_repo) in
let updates = OpamFile.Filenames.read (updates local_repo) in
if Filename.Set.mem file updates then
Result file
else if Filename.exists file then
Expand All @@ -56,7 +56,7 @@ module B = struct
let init address =
let local_repo = Path.R.cwd () in
git_init address;
File.Filenames.write (updates local_repo) (Filename.Set.empty)
OpamFile.Filenames.write (updates local_repo) (Filename.Set.empty)

let download_archive address nv =
let local_repo = Path.R.cwd () in
Expand Down Expand Up @@ -88,7 +88,7 @@ module B = struct
let local_repo = Path.R.cwd () in
let local_path = Dirname.cwd () in
match check_updates local_path remote_address with
| Some f -> File.Filenames.write (updates local_repo) f; f
| Some f -> OpamFile.Filenames.write (updates local_repo) f; f
| None ->
Globals.error_and_exit
"The repository %s is not initialized correctly"
Expand Down
26 changes: 13 additions & 13 deletions src/repositories.ml
Expand Up @@ -52,7 +52,7 @@ let init r =
let root = Path.R.create r in
let module B = (val find_backend r: BACKEND) in
Dirname.mkdir (Path.R.root root);
File.Repo_config.write (Path.R.config root) r;
OpamFile.Repo_config.write (Path.R.config root) r;
Dirname.mkdir (Path.R.packages_dir root);
Dirname.mkdir (Path.R.archives_dir root);
Dirname.mkdir (Path.R.compilers_dir root);
Expand Down Expand Up @@ -145,12 +145,12 @@ let make_archive ?(gener_digest = false) nv =
let extract_dir = extract_root / NV.to_string nv in

if Filename.exists url_f then (
let url_file = File.URL.read url_f in
let checksum = File.URL.checksum url_file in
let kind = match File.URL.kind url_file with
| None -> kind_of_url (File.URL.url url_file)
let url_file = OpamFile.URL.read url_f in
let checksum = OpamFile.URL.checksum url_file in
let kind = match OpamFile.URL.kind url_file with
| None -> kind_of_url (OpamFile.URL.url url_file)
| Some k -> k in
let url = File.URL.url url_file in
let url = OpamFile.URL.url url_file in
log "downloading %s:%s" url kind;

match Dirname.in_dir local_dir (fun () -> download_one ~gener_digest kind nv url checksum) with
Expand All @@ -166,7 +166,7 @@ let make_archive ?(gener_digest = false) nv =
(Filename.to_string local_archive) c digest (Filename.to_string url_f);
| _ -> ();
end;
File.URL.write url_f (File.URL.with_checksum url_file digest);
OpamFile.URL.write url_f (OpamFile.URL.with_checksum url_file digest);
);
log "extracting %s to %s"
(Filename.to_string local_archive)
Expand Down Expand Up @@ -255,12 +255,12 @@ let update r =
let cached_packages = Path.R.available_tmp local_repo in
let updated_cached_packages = NV.Set.filter (fun nv ->
let url_f = Path.R.url local_repo nv in
let url = File.URL.read url_f in
let kind = match File.URL.kind url with
| None -> kind_of_url (File.URL.url url)
let url = OpamFile.URL.read url_f in
let kind = match OpamFile.URL.kind url with
| None -> kind_of_url (OpamFile.URL.url url)
| Some k -> k in
let checksum = File.URL.checksum url in
let url = File.URL.url url in
let checksum = OpamFile.URL.checksum url in
let url = OpamFile.URL.url url in
log "updating %s:%s" url kind;
match Dirname.in_dir local_dir (fun () -> download_one kind nv url checksum) with
| Not_available -> Globals.error_and_exit "Cannot get %s" url
Expand All @@ -269,4 +269,4 @@ let update r =
) cached_packages in

let updated = NV.Set.union updated_packages updated_cached_packages in
File.Updated.write (Path.R.updated local_repo) updated
OpamFile.Updated.write (Path.R.updated local_repo) updated
6 changes: 3 additions & 3 deletions src/scripts/opam_check.ml
Expand Up @@ -19,9 +19,9 @@ let () = Arg.parse spec ano usage
let packages = NV.Set.of_list (List.map NV.of_string !packages)

let installed () =
let config = File.Config.read (Path.G.config (Path.G.create ())) in
let version = File.Config.ocaml_version config in
let installed = File.Installed.read (Path.C.installed (Path.C.create version)) in
let config = OpamFile.Config.read (Path.G.config (Path.G.create ())) in
let version = OpamFile.Config.ocaml_version config in
let installed = OpamFile.Installed.read (Path.C.installed (Path.C.create version)) in
NV.Set.filter (fun nv -> N.to_string (NV.name nv) <> Globals.default_package) installed

let () =
Expand Down
8 changes: 4 additions & 4 deletions src/scripts/opam_mk_repo.ml
Expand Up @@ -64,7 +64,7 @@ let () =
(* Read urls.txt *)
log "Reading urls.txt";
let local_index_file = Filename.of_string "urls.txt" in
let old_index = File.Urls_txt.safe_read local_index_file in
let old_index = OpamFile.Urls_txt.safe_read local_index_file in
let new_index = Curl.make_urls_txt local_repo in

let to_remove = Remote_file.Set.diff old_index new_index in
Expand All @@ -77,9 +77,9 @@ let () =
let nv = NV.create n v in
let opam_f = Path.R.opam local_repo nv in
if Filename.exists opam_f then (
let opam = File.OPAM.read opam_f in
let deps = File.OPAM.depends opam in
let depopts = File.OPAM.depopts opam in
let opam = OpamFile.OPAM.read opam_f in
let deps = OpamFile.OPAM.depends opam in
let depopts = OpamFile.OPAM.depopts opam in
List.fold_left (fun accu l ->
List.fold_left (fun accu ((n,_),_) ->
N.Set.add (N.of_string n) accu
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/opam_repo_check.ml
@@ -1,7 +1,7 @@
(* Script to check that a given repository is well-typed (or well-parsed) *)
open Types
open Printf
open File
open OpamFile

let () =
let usage = Printf.sprintf "Usage: %s" Sys.argv.(0) in
Expand Down
4 changes: 2 additions & 2 deletions src/solver.ml
Expand Up @@ -283,7 +283,7 @@ module Graph = struct
let options = {
Debian.Debcudf.default_options with
Debian.Debcudf.extras_opt = [
File.OPAM.s_depopts, (File.OPAM.s_depopts, `String None)
OpamFile.OPAM.s_depopts, (OpamFile.OPAM.s_depopts, `String None)
]
} in
Debian.Debcudf.tocudf ~options table pkg
Expand Down Expand Up @@ -324,7 +324,7 @@ module Graph = struct
file.ml when we create the debian package. It could make sense
to do it here. *)
let extended_dependencies table pkg =
let opt = File.OPAM.s_depopts in
let opt = OpamFile.OPAM.s_depopts in
if List.mem_assoc opt pkg.Cudf.pkg_extra then
match List.assoc opt pkg.Cudf.pkg_extra with
| `String s ->
Expand Down

0 comments on commit 1231800

Please sign in to comment.