From e45bbb083a95a586454efe1da6024b1824de5a77 Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Mon, 11 Mar 2013 15:42:58 +0100 Subject: [PATCH 1/8] Uddate CHANGES --- CHANGES | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 6f1d6708c9a..d17a3adc234 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,5 @@ -0.9.6 (trunk) -* Fix loading of `~/.profile` when using dash +0.9.6 [Mar 2013] +* Fix loading of `~/.profile` when using dash (eg. in Debian/Ubuntu) * Fix installation of packages with symbolic links (regression introduced in 0.9.5) 0.9.5 [Mar 2013] From df9eb37a00e5a506ea0512fe4241fa48377c245b Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Mon, 11 Mar 2013 16:10:11 +0100 Subject: [PATCH 2/8] Improve error message in case of checksums on 'opam init' --- src/core/opamRepository.ml | 27 +++++++++++++++++---------- src/core/opamRepository.mli | 3 +++ src/repositories/opamHTTP.ml | 19 ++++++++++++++++--- 3 files changed, 36 insertions(+), 13 deletions(-) diff --git a/src/core/opamRepository.ml b/src/core/opamRepository.ml index a1a1e1eea18..d905c8985c5 100644 --- a/src/core/opamRepository.ml +++ b/src/core/opamRepository.ml @@ -146,6 +146,18 @@ let map fn = function | Up_to_date x -> Up_to_date (fn x) | Not_available -> Not_available +let invalid_checksum file ~actual ~expected = + OpamSystem.internal_error + "Wrong checksum for %s:\n\ + \ - %s [expected result]\n\ + \ - %s [actual result]\n\ + This is surely due to outdated package descriptions and should be fixed by \ + running `opam update`. In case an update does not fix that problem, you can \ + use the `--no-checksums` command-line option to bypass any checksum checks." + (OpamFilename.to_string file) + expected + actual + (* Download file f in the current directory *) let download_file ~gener_digest kind nv remote_file checksum = log "download_file %s %s %s" @@ -159,16 +171,11 @@ let download_file ~gener_digest kind nv remote_file checksum = | Some c -> OpamFilename.digest file = c in if not gener_digest && not !OpamGlobals.no_checksums && not (digest ()) then ( OpamGlobals.error "Error: invalid checksum."; - OpamSystem.internal_error - "Wrong checksum for %s:\n\ - \ - %s [expecting result]\n\ - \ - %s [actual result]\n\ - This is surely due to outdated package descriptions and should be fixed by \ - running `opam update`. In case an update does not fix that problem, you can \ - use the `--no-checksums` command-line option to bypass any checksum checks." - (OpamFilename.to_string remote_file) - (match checksum with Some c -> c | None -> "") - (OpamFilename.digest file) + let actual = OpamFilename.digest file in + let expected = match checksum with + | Some c -> c + | None -> "" in + invalid_checksum remote_file ~actual ~expected ) in let result = B.download_file ?checksum nv remote_file in iter check result; diff --git a/src/core/opamRepository.mli b/src/core/opamRepository.mli index e6b03b61324..fca8ee7b2d5 100644 --- a/src/core/opamRepository.mli +++ b/src/core/opamRepository.mli @@ -113,3 +113,6 @@ val prefix: repository_root -> package -> string option (** Find an eventual prefix in a map *) val find_prefix: string name_map -> package -> string option + +(** Raise an error when a checksum is invalid. *) +val invalid_checksum: filename -> actual:string -> expected:string -> 'a diff --git a/src/repositories/opamHTTP.ml b/src/repositories/opamHTTP.ml index 5070ae77d01..b09fa4c7fe9 100644 --- a/src/repositories/opamHTTP.ml +++ b/src/repositories/opamHTTP.ml @@ -94,6 +94,16 @@ let is_up_to_date state local_file = && not (Sys.is_directory (OpamFilename.to_string local_file)) && List.assoc local_file state.file_digests = OpamFilename.digest local_file +let get_checksum state local_file = + if List.mem_assoc local_file state.file_digests + && OpamFilename.exists local_file + && not (Sys.is_directory (OpamFilename.to_string local_file)) + then + let expected = List.assoc local_file state.file_digests in + let actual = OpamFilename.digest local_file in + Some (actual, expected) + else None + module B = struct let init ~address = @@ -190,9 +200,12 @@ module B = struct with Not_found -> () end; - if not !OpamGlobals.no_checksums && not (is_up_to_date state local_file) then - OpamSystem.internal_error "Wrong checksum for %s" (OpamFilename.to_string remote_file); - Result local_file + if not !OpamGlobals.no_checksums && not (is_up_to_date state local_file) then ( + match get_checksum state local_file with + | None -> OpamSystem.internal_error "%s is not up-to-date" (OpamFilename.to_string remote_file) + | Some (actual, expected) -> OpamRepository.invalid_checksum remote_file ~actual ~expected + ) else + Result local_file end end From 4c111a9829e3d328b28e6270d782650218a55399 Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Mon, 11 Mar 2013 16:10:40 +0100 Subject: [PATCH 3/8] Update doc API --- doc/html/OpamClient.API.CONFIG.html | 9 ++ doc/html/OpamClient.API.SWITCH.html | 4 +- doc/html/OpamClient.API.html | 6 +- doc/html/OpamCompiler.html | 5 +- doc/html/OpamConfigCommand.html | 9 ++ doc/html/OpamFile.Filenames.html | 4 +- doc/html/OpamFile.OPAM.html | 3 + doc/html/OpamFile.Prefix.html | 79 ++++++++++ doc/html/OpamFile.html | 3 + doc/html/OpamFilename.html | 22 ++- doc/html/OpamFormat.html | 3 + doc/html/OpamMisc.html | 11 +- doc/html/OpamPackage.html | 10 +- doc/html/OpamPath.Repository.html | 28 ++-- doc/html/OpamPath.html | 3 + doc/html/OpamRepository.html | 18 ++- doc/html/OpamRepositoryCommand.html | 5 +- doc/html/OpamState.html | 22 ++- doc/html/OpamSwitchCommand.html | 4 +- doc/html/OpamSystem.html | 6 +- doc/html/OpamTypes.html | 54 +++++++ doc/html/index_modules.html | 5 + doc/html/index_types.html | 15 ++ doc/html/index_values.html | 176 ++++++++++++++++++----- doc/html/type_OpamClient.API.CONFIG.html | 4 + doc/html/type_OpamClient.API.SWITCH.html | 6 +- doc/html/type_OpamClient.API.html | 19 ++- doc/html/type_OpamClient.SafeAPI.html | 19 ++- doc/html/type_OpamClient.html | 38 +++-- doc/html/type_OpamCompiler.html | 3 +- doc/html/type_OpamConfigCommand.html | 4 + doc/html/type_OpamFile.OPAM.html | 1 + doc/html/type_OpamFile.Prefix.html | 52 +++++++ doc/html/type_OpamFile.html | 11 ++ doc/html/type_OpamFilename.html | 10 +- doc/html/type_OpamFormat.html | 1 + doc/html/type_OpamMisc.html | 5 +- doc/html/type_OpamPackage.html | 3 +- doc/html/type_OpamPath.Repository.html | 21 +-- doc/html/type_OpamPath.html | 22 +-- doc/html/type_OpamRepository.html | 16 ++- doc/html/type_OpamRepositoryCommand.html | 3 +- doc/html/type_OpamState.html | 14 +- doc/html/type_OpamSwitchCommand.html | 6 +- doc/html/type_OpamSystem.html | 1 + doc/html/type_OpamTypes.html | 7 + 46 files changed, 642 insertions(+), 128 deletions(-) create mode 100644 doc/html/OpamFile.Prefix.html create mode 100644 doc/html/type_OpamFile.Prefix.html diff --git a/doc/html/OpamClient.API.CONFIG.html b/doc/html/OpamClient.API.CONFIG.html index dd2fd4b309c..a3c4814bea8 100644 --- a/doc/html/OpamClient.API.CONFIG.html +++ b/doc/html/OpamClient.API.CONFIG.html @@ -59,6 +59,15 @@

Module OpamClient.API.CONFIGval env : csh:bool -> unit
Display environment.
+
val setup : OpamTypes.user_config option -> OpamTypes.global_config option -> unit
+Global and user setup of OPAM.
+
+
val setup_list : OpamTypes.shell -> OpamTypes.filename -> unit
+Display global and user informations about OPAM setup.
+
+
val exec : string -> unit
+Execute a command in a subshell with the right environment variables.
+
val includes : is_rec:bool -> OpamTypes.name list -> unit
Display includes files.
diff --git a/doc/html/OpamClient.API.SWITCH.html b/doc/html/OpamClient.API.SWITCH.html index 1a6cd860165..a248a51496a 100644 --- a/doc/html/OpamClient.API.SWITCH.html +++ b/doc/html/OpamClient.API.SWITCH.html @@ -55,10 +55,10 @@

Module OpamClient.API.SWITCH
-
val switch : quiet:bool -> OpamTypes.switch -> unit
+
val switch : quiet:bool -> warning:bool -> OpamTypes.switch -> unit
Switch to the given compiler. Take the global file lock.
-
val install : quiet:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
+
val install : quiet:bool -> warning:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
Install the given compiler.
val import : OpamTypes.filename option -> unit
diff --git a/doc/html/OpamClient.API.html b/doc/html/OpamClient.API.html index 8d361ff561e..cc1d3f055fb 100644 --- a/doc/html/OpamClient.API.html +++ b/doc/html/OpamClient.API.html @@ -53,10 +53,10 @@

Module OpamClient.API

OPAM API.

-
val init : OpamTypes.repository -> OpamTypes.compiler -> jobs:int -> unit
+
val init : OpamTypes.repository ->
OpamTypes.compiler ->
jobs:int ->
OpamTypes.shell -> OpamTypes.filename -> [ `ask | `no | `yes ] -> unit
Initialize the client a consistent state.
-
val list : print_short:bool ->
installed_only:bool ->
?name_only:bool -> ?case_sensitive:bool -> string list -> unit
+
val list : print_short:bool ->
installed_only:bool ->
installed_roots:bool ->
?name_only:bool -> ?case_sensitive:bool -> string list -> unit
Display all available packages that matches any of the regexps.
@@ -80,7 +80,7 @@

Module OpamClient.API

val upload : OpamTypes.upload -> OpamTypes.repository_name -> unit
Upload a package to a remote repository.
-
val remove : OpamTypes.name_set -> unit
+
val remove : autoremove:bool -> OpamTypes.name_set -> unit
Remove the given set of packages.
module CONFIG: sig .. end
diff --git a/doc/html/OpamCompiler.html b/doc/html/OpamCompiler.html index c8d26f04a9d..658133d2569 100644 --- a/doc/html/OpamCompiler.html +++ b/doc/html/OpamCompiler.html @@ -65,8 +65,9 @@

Module OpamCompiler

val of_filename : OpamFilename.t -> t
Convert a filename into a compiler name
-
val list : OpamFilename.Dir.t -> Set.t
-List the compiler available in a directory
+
val list : OpamFilename.Dir.t -> (OpamFilename.t * OpamFilename.t option) Map.t
+List the compiler available in a directory (and their eventual + descrition file)
val system : t
System compiler
diff --git a/doc/html/OpamConfigCommand.html b/doc/html/OpamConfigCommand.html index 51157733667..acc9106590a 100644 --- a/doc/html/OpamConfigCommand.html +++ b/doc/html/OpamConfigCommand.html @@ -73,4 +73,13 @@

Module OpamConfigCommand

val subst : OpamTypes.basename list -> unit
Substitute files
+
val setup : OpamTypes.user_config option -> OpamTypes.global_config option -> unit
+Update the global and user configuration to use OPAM.
+
+
val setup_list : OpamTypes.shell -> OpamTypes.filename -> unit
+Display the global and user configuration for OPAM.
+
+
val exec : string -> unit
+Execute a command in a subshell
+
\ No newline at end of file diff --git a/doc/html/OpamFile.Filenames.html b/doc/html/OpamFile.Filenames.html index 4788e6d8423..0a896334694 100644 --- a/doc/html/OpamFile.Filenames.html +++ b/doc/html/OpamFile.Filenames.html @@ -5,6 +5,7 @@ + @@ -47,7 +48,8 @@ Next +

Module OpamFile.Filenames

module Filenames: IO_FILE  with type t = filename_set
List of filenames
diff --git a/doc/html/OpamFile.OPAM.html b/doc/html/OpamFile.OPAM.html index 54e8a6dbe28..7383ddffe90 100644 --- a/doc/html/OpamFile.OPAM.html +++ b/doc/html/OpamFile.OPAM.html @@ -119,6 +119,9 @@

Module OpamFile.OPAM

val doc : t -> string option
API documentation
+
val tags : t -> string list
+Classification tags
+
val build_test : t -> OpamTypes.command list
Commands to build and run the tests
diff --git a/doc/html/OpamFile.Prefix.html b/doc/html/OpamFile.Prefix.html new file mode 100644 index 00000000000..89f07e5c776 --- /dev/null +++ b/doc/html/OpamFile.Prefix.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +OpamFile.Prefix + + + +

Module OpamFile.Prefix

+
module Prefix: IO_FILE  with type t = string name_map
+Prefix of package directories
+
+
+
type t 
+
+File contents
+
+ +
val empty : t
+Empty file
+
+
val write : OpamTypes.filename -> t -> unit
+Write some contents to a file
+
+
val read : OpamTypes.filename -> t
+Read file contents. Raise an error if the file does not exist.
+
+
val safe_read : OpamTypes.filename -> t
+Read file contents. Return empty if the file does not exist.
+
+
val read_from_channel : Pervasives.in_channel -> t
+Read from channel.
+
+
val write_to_channel : Pervasives.out_channel -> t -> unit
+Write to channel.
+
+ \ No newline at end of file diff --git a/doc/html/OpamFile.html b/doc/html/OpamFile.html index 3ad84b96a7f..8c1915ef335 100644 --- a/doc/html/OpamFile.html +++ b/doc/html/OpamFile.html @@ -130,6 +130,9 @@

Substitution files


module Filenames: IO_FILE  with type t = filename_set
List of filenames
+
module Prefix: IO_FILE  with type t = string name_map
+Prefix of package directories +
val print_stats : unit -> unit
Display statistics about file access.
diff --git a/doc/html/OpamFilename.html b/doc/html/OpamFilename.html index 85f53506e8f..b9f19cf5d61 100644 --- a/doc/html/OpamFilename.html +++ b/doc/html/OpamFilename.html @@ -70,7 +70,10 @@

Module OpamFilename

val mkdir : Dir.t -> unit
Create a directory
-
val list_dirs : Dir.t -> Dir.t list
+
val rec_dirs : Dir.t -> Dir.t list
+List the sub-directory recursively
+
+
val sub_dirs : Dir.t -> Dir.t list
List the sub-directory
val in_dir : Dir.t -> (unit -> 'a) -> 'a
@@ -117,6 +120,16 @@

Module OpamFilename

val raw_file : string -> t
Creation from a raw string (as http://<path>)
+
val prettify : t -> string
+Prettify a filename:
    +
  • replace /path/to/opam/foo by <opam>/foo
  • +
  • replace /path/to/home/foo by ~/foo
  • +
+
+
+
val prettify_dir : Dir.t -> string
+Prettify a dirname.
+
val dirname : t -> Dir.t
Return the directory name
@@ -144,7 +157,7 @@

Module OpamFilename

val chop_extension : t -> t
Remove the file extension
-
val list_files : Dir.t -> t list
+
val rec_files : Dir.t -> t list
List all the filenames, recursively
val with_contents : (string -> 'a) -> t -> 'a
@@ -175,9 +188,12 @@

Module OpamFilename

val starts_with : Dir.t -> t -> bool
Check wether a filename starts by a given Dir.t
-
val remove_prefix : prefix:Dir.t -> t -> string
+
val remove_prefix : Dir.t -> t -> string
Remove a prefix from a file name
+
val remove_suffix : Base.t -> t -> string
+Remove a suffix from a filename
+
val download : overwrite:bool -> t -> Dir.t -> t
download a remote file in a given directory. Return the location of the downloaded file if the download is successful.
diff --git a/doc/html/OpamFormat.html b/doc/html/OpamFormat.html index b6b142b6fd4..01bbd806e26 100644 --- a/doc/html/OpamFormat.html +++ b/doc/html/OpamFormat.html @@ -152,6 +152,9 @@

Creation functions


val make_list : ('a -> OpamTypes.value) -> 'a list -> OpamTypes.value
Create a list of 'things'
+
val make_string_list : string list -> OpamTypes.value
+Create a list of strings
+
val make_group : ('a -> OpamTypes.value) -> 'a list -> OpamTypes.value
Create a group of 'things'
diff --git a/doc/html/OpamMisc.html b/doc/html/OpamMisc.html index cab55d64060..a6f8ab210d0 100644 --- a/doc/html/OpamMisc.html +++ b/doc/html/OpamMisc.html @@ -93,6 +93,9 @@

Integer manipulation


val string_of_list : ('a -> string) -> 'a list -> string
Display a list of strings
+
val pretty_list : string list -> string
+Display a pretty list: "x";"y";"z" -> "x, y and z"
+

String manipulation


module StringMap: MAP  with type key = string
@@ -116,9 +119,12 @@

String manipulation


val ends_with : suffix:string -> string -> bool
Does a string ends with the given suffix ?
-
val remove_prefix : prefix:string -> string -> string option
+
val remove_prefix : prefix:string -> string -> string
Remove a prefix
+
val remove_suffix : suffix:string -> string -> string
+Remove a suffix
+
val cut_at : string -> char -> (string * string) option
Cut a string at the first occurence of the given char
@@ -176,4 +182,7 @@

Misc


val uname_s : unit -> string option
Get the output of uname -s
+
val guess_shell_compat : unit -> [ `csh | `sh | `zsh ]
+Guess the shell compat-mode
+
\ No newline at end of file diff --git a/doc/html/OpamPackage.html b/doc/html/OpamPackage.html index 0181f099377..0b82ae0134d 100644 --- a/doc/html/OpamPackage.html +++ b/doc/html/OpamPackage.html @@ -78,9 +78,10 @@

Package name and versions


val create : Name.t -> Version.t -> t
Create a new pair (name x version)
-
val of_filename : OpamFilename.t -> t option
-Create a new pair from a filename. This function extracts $name and $version from /path/to/$name.$version.XXX - with various heuristics.
+
val of_filename : all:bool -> OpamFilename.t -> t option
+Create a new pair from a filename. This function extracts $name and $version from /path/to/$name.$version.XXX with + various heuristics. If all is unset, discard "opam" and "url" + files.
val of_dirname : OpamFilename.Dir.t -> t option
Create a new pair from a directory name. This function extracts $name and $version from /path/to/$name.$version/
@@ -100,9 +101,6 @@

Package name and versions


val packages_of_name : Set.t -> Name.t -> Set.t
Return all the packages with the given names
-
val opam_files : OpamFilename.Dir.t -> Set.t
-Look for all .opam files in directory
-
val compare : t -> t -> int
Compare two packages
diff --git a/doc/html/OpamPath.Repository.html b/doc/html/OpamPath.Repository.html index 8a3c8916c56..f4089192900 100644 --- a/doc/html/OpamPath.Repository.html +++ b/doc/html/OpamPath.Repository.html @@ -56,8 +56,8 @@

Module OpamPath.Repository

val root : OpamTypes.repository_root -> OpamTypes.dirname
Get the directory root
-
val lock : OpamTypes.repository_root -> OpamTypes.filename
-lock file
+
val prefix : OpamTypes.repository_root -> OpamTypes.filename
+Prefix file $opam/repo/prefix
val create : OpamTypes.repository_root ->
OpamTypes.repository_name -> OpamTypes.repository_root
Return the repository folder: $opam/repo/$repo
@@ -71,16 +71,22 @@

Module OpamPath.Repository

val packages_dir : OpamTypes.repository_root -> OpamTypes.dirname
Packages folder: $opam/repo/$repo/packages
-
val package : OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.dirname
-Package folder: $opam/repo/$repo/packages/$NAME.$VERSION
+
val package : OpamTypes.repository_root ->
string option -> OpamTypes.package -> OpamTypes.dirname
+Package folder: $opam/repo/$repo/packages/XXX/$NAME.$VERSION
-
val opam : OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.filename
+
val opam : OpamTypes.repository_root ->
string option -> OpamTypes.package -> OpamTypes.filename
Return the OPAM file for a given package: - $opam/repo/$repo/packages/$NAME.$VERSION/opam
+ $opam/repo/$repo/packages/XXX/$NAME.$VERSION/opam
-
val descr : OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.filename
+
val descr : OpamTypes.repository_root ->
string option -> OpamTypes.package -> OpamTypes.filename
Return the description file for a given package: - $opam/repo/$repo/packages/$NAME.VERSION/descr
+ $opam/repo/$repo/packages/XXX/$NAME.VERSION/descr
+
+
val url : OpamTypes.repository_root ->
string option -> OpamTypes.package -> OpamTypes.filename
+urls $opma/repo/$repo/package/XXX/$NAME.$VERSION/url
+
+
val files : OpamTypes.repository_root ->
string option -> OpamTypes.package -> OpamTypes.dirname
+files $opam/repo/$repo/packages/XXX/$NAME.$VERSION/files
val archive : OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.filename
Return the archive for a given package: @@ -106,12 +112,6 @@

Module OpamPath.Repository

val compilers_dir : OpamTypes.repository_root -> OpamTypes.dirname
Compiler files: $opam/repo/$repo/compilers/
-
val url : OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.filename
-urls $opma/repo/$repo/package/$NAME.$VERSION/url
-
-
val files : OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.dirname
-files $opam/repo/$repo/packages/$NAME.$VERSION/files
-
val tmp : OpamTypes.repository_root -> OpamTypes.dirname
Tempory folder $opam/repo/$repo/tmp
diff --git a/doc/html/OpamPath.html b/doc/html/OpamPath.html index a55291d5619..4915c789719 100644 --- a/doc/html/OpamPath.html +++ b/doc/html/OpamPath.html @@ -111,6 +111,9 @@

Global paths


val repo_index : t -> OpamTypes.filename
Return the repository index: $opam/repo/index
+
val init : t -> OpamTypes.dirname
+Init scripts
+
module Switch: sig .. end
Switch related paths
diff --git a/doc/html/OpamRepository.html b/doc/html/OpamRepository.html index b55dc669308..aeb194c52b2 100644 --- a/doc/html/OpamRepository.html +++ b/doc/html/OpamRepository.html @@ -109,16 +109,22 @@

Repository backends


$NAME.$VERSION/url is not modified, unless gener_digest = true is given.
-
val packages : OpamTypes.repository_root -> OpamTypes.package_set
+
val packages : OpamTypes.repository_root ->
string OpamTypes.name_map * OpamTypes.package_set
Get the list of packages
-
val compilers : OpamTypes.repository_root -> OpamTypes.compiler_set
-Get the list of compilers
-
-
val versions : OpamTypes.repository_root -> OpamTypes.name -> OpamTypes.version_set
-Get the available versions for a given compiler
+
val compilers : OpamTypes.repository_root ->
(OpamTypes.filename * OpamTypes.filename option) OpamTypes.compiler_map
+Get the list of compilers (and their eventual description file)
val files : OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.filename_set
Get the external files associated to a package
+
val prefix : OpamTypes.repository_root -> OpamTypes.package -> string option
+Check if a package has a given prefix in the repository
+
+
val find_prefix : string OpamTypes.name_map -> OpamTypes.package -> string option
+Find an eventual prefix in a map
+
+
val invalid_checksum : OpamTypes.filename -> actual:string -> expected:string -> 'a
+Raise an error when a checksum is invalid.
+
\ No newline at end of file diff --git a/doc/html/OpamRepositoryCommand.html b/doc/html/OpamRepositoryCommand.html index 04f9a925a61..39dc4b737bd 100644 --- a/doc/html/OpamRepositoryCommand.html +++ b/doc/html/OpamRepositoryCommand.html @@ -55,8 +55,9 @@

Module OpamRepositoryCommand


-
val update_index : OpamState.Types.t -> unit
-Update the repository index.
+
val update_index : OpamState.Types.t -> OpamTypes.repository OpamTypes.package_map
+Update the repository index. Return the new (package -> repo) + map.
val list : short:bool -> unit
List the available repositories.
diff --git a/doc/html/OpamState.html b/doc/html/OpamState.html index 2baa0a81aa1..a3a386eb12e 100644 --- a/doc/html/OpamState.html +++ b/doc/html/OpamState.html @@ -44,6 +44,7 @@ + @@ -225,10 +226,24 @@

Environment


val add_to_env : state ->
OpamTypes.env -> (string * string * string) list -> OpamTypes.env
Update an environment.
-
val print_env_warning : ?add_profile:bool -> state -> unit
+
val print_env_warning : state -> OpamTypes.user_config option -> unit
Print a warning if the environment is not set-up properly.

+

Initialisation


+
val update_setup_interactive : state -> OpamTypes.shell -> OpamTypes.filename -> unit
+Update the global and user configuration by asking some questions.
+
+
val display_setup : state -> OpamTypes.shell -> OpamTypes.filename -> unit
+Display the global and user configuration for OPAM.
+
+
val update_setup : state ->
OpamTypes.user_config option -> OpamTypes.global_config option -> unit
+Update the user configuration.
+
+
val update_env_variables : state -> unit
+Update the global environment variables.
+
+

Substitutions


val contents_of_variable : state -> OpamTypes.full_variable -> OpamTypes.variable_contents
Compute the value of a variable
@@ -270,9 +285,10 @@

Repositories


val package_repository_map : state -> OpamTypes.repository OpamTypes.package_map
Build a map which says in which repository the latest metadata for - a given package is.
+ a given package is. This function is *very* costly (need to scan all the + files in the repositories, so don't abuse).
-
val compiler_repository_map : state -> OpamTypes.repository OpamTypes.compiler_map
+
val compiler_repository_map : state ->
(OpamTypes.filename * OpamTypes.filename option) OpamTypes.compiler_map
Build a map which says in which repository the latest metadata for a given compiler is.
diff --git a/doc/html/OpamSwitchCommand.html b/doc/html/OpamSwitchCommand.html index 9b30bfd7130..ce6bcd9f54e 100644 --- a/doc/html/OpamSwitchCommand.html +++ b/doc/html/OpamSwitchCommand.html @@ -55,7 +55,7 @@

Module OpamSwitchCommand

Switch commands.

-
val install : quiet:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
+
val install : quiet:bool -> warning:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
Install a new switch.
val import : OpamTypes.filename option -> unit
@@ -67,7 +67,7 @@

Module OpamSwitchCommand

val remove : OpamTypes.switch -> unit
Remove the given compiler switch.
-
val switch : quiet:bool -> OpamTypes.switch -> unit
+
val switch : quiet:bool -> warning:bool -> OpamTypes.switch -> unit
Switch to the given compiler switch.
val reinstall : OpamTypes.switch -> unit
diff --git a/doc/html/OpamSystem.html b/doc/html/OpamSystem.html index 82c104471ff..f1d949f27da 100644 --- a/doc/html/OpamSystem.html +++ b/doc/html/OpamSystem.html @@ -121,9 +121,13 @@

Module OpamSystem

recursively. Links behaving like directory are crossed.
+
val rec_dirs : string -> string list
+rec_dirs dir return the list list of all directories recursively + (going through symbolink links).
+
val ocaml_version : string option Lazy.t
Return the version of the current OCaml compiler. If no OCaml - compiler is present in the path, then it returns None.
+ compiler is present in the path, then it returns None.
val system_ocamlc_where : string option Lazy.t
Return the path where the system ocamlc library is installed
diff --git a/doc/html/OpamTypes.html b/doc/html/OpamTypes.html index 6cce94630cb..f91b1dd1ac2 100644 --- a/doc/html/OpamTypes.html +++ b/doc/html/OpamTypes.html @@ -860,6 +860,60 @@

Command line arguments


Configuration requests
+
type shell = [ `csh | `sh | `zsh ] 
+
+Shell compatibility modes
+
+ +
type global_config = {
+ + + + + + + + + +
+   +complete :bool;
+   +switch_eval :bool;
+} + +
+Global configuration option
+
+ +
type user_config = {
+ + + + + + + + + + + + + + +
+   +shell :shell;
+   +ocamlinit :bool;
+   +dot_profile :filename option;
+} + +
+User configuration option
+
+

Filtered commands


type symbol = 
diff --git a/doc/html/index_modules.html b/doc/html/index_modules.html index 49614c2ab15..23ac4dec3fd 100644 --- a/doc/html/index_modules.html +++ b/doc/html/index_modules.html @@ -419,6 +419,11 @@

Index of modules

Pinned package files + + + + + + + + @@ -738,7 +738,7 @@

Index of values

@@ -776,6 +776,11 @@

Index of values

Return the parent directory + + + + + + @@ -1028,6 +1043,11 @@

Index of values

Return all the packages with the given name + + + + @@ -1180,6 +1205,11 @@

Index of values

Initialize $opam/repo/$repo + + + + @@ -1417,16 +1453,6 @@

Index of values

regexps. - - - - - - + + @@ -1770,11 +1796,6 @@

Index of values

OPAM files folder: $opam/opam/ - - @@ -2035,16 +2056,41 @@

Index of values

Preprocessing options + + + + + + + + + + + + + + + + @@ -2263,6 +2325,16 @@

Index of values

Remove the state cache + + + + + + + + + + + + + + + + + + + + + + @@ -3027,11 +3144,6 @@

Index of values

Package version - -
Prefix [OpamFile]
+Prefix of package directories +
+

R
REPOSITORY [OpamClient.API]
diff --git a/doc/html/index_types.html b/doc/html/index_types.html index bf419a73623..f2ebab5ad03 100644 --- a/doc/html/index_types.html +++ b/doc/html/index_types.html @@ -260,6 +260,11 @@

Index of types

A generic formula
global_config [OpamTypes]
+Global configuration option +
+

I
indent_variable [OpamFormat]
@@ -401,6 +406,11 @@

Index of types

Section names
shell [OpamTypes]
+Shell compatibility modes +
+
simple_arg [OpamTypes]
A command argument @@ -512,6 +522,11 @@

Index of types

user request action
user_config [OpamTypes]
+User configuration option +
+

V
value [OpamTypes]
diff --git a/doc/html/index_values.html b/doc/html/index_values.html index 6a8c085bbe6..ea684c0d533 100644 --- a/doc/html/index_values.html +++ b/doc/html/index_values.html @@ -482,7 +482,7 @@

Index of values

compilers [OpamRepository]
-Get the list of compilers +Get the list of compilers (and their eventual description file)
compilers [OpamState]
descr [OpamPath.Repository]
Return the description file for a given package: - $opam/repo/$repo/packages/$NAME.VERSION/descr + $opam/repo/$repo/packages/XXX/$NAME.VERSION/descr
descr [OpamPath]
display_setup [OpamState]
+Display the global and user configuration for OPAM. +
+
dnf_of_formula [OpamFormula]
Convert a formula to DNF @@ -922,6 +927,16 @@

Index of values

Execute a list of commands in a given directory
exec [OpamConfigCommand]
+Execute a command in a subshell +
+
exec [OpamClient.API.CONFIG]
+Execute a command in a subshell with the right environment variables. +
+
exists [OpamFilename]
see Sys.file_exists @@ -978,7 +993,7 @@

Index of values

files [OpamPath.Repository]
-files $opam/repo/$repo/packages/$NAME.$VERSION/files +files $opam/repo/$repo/packages/XXX/$NAME.$VERSION/files
files_with_links [OpamSystem]
find_prefix [OpamRepository]
+Find an eventual prefix in a map +
+
find_repository_name [OpamState]
Find a repository state, given its name @@ -1111,6 +1131,11 @@

Index of values

Iteration in topological order
guess_shell_compat [OpamMisc]
+Guess the shell compat-mode +
+

H
has_cycle [OpamParallel.G]
init [OpamPath]
+Init scripts +
+
init [OpamClient.API]
Initialize the client a consistent state. @@ -1252,6 +1282,11 @@

Index of values

Raise Internal_error
invalid_checksum [OpamRepository]
+Raise an error when a checksum is invalid. +
+
invalid_fields [OpamFormat]
Find all the invalid fields @@ -1368,7 +1403,8 @@

Index of values

list [OpamCompiler]
-List the compiler available in a directory +List the compiler available in a directory (and their eventual + descrition file)
list [OpamSwitchCommand]
list_dirs [OpamFilename]
-List the sub-directory -
-
list_files [OpamFilename]
-List all the filenames, recursively -
-
load_env_state [OpamState]
Load state associated to env variables. @@ -1447,11 +1473,6 @@

Index of values

Create a dummy local repository
lock [OpamPath.Repository]
-lock file -
-
lock [OpamPath.Switch]
lock file @@ -1561,6 +1582,11 @@

Index of values

Create a string
make_string_list [OpamFormat]
+Create a list of strings +
+
make_string_pair [OpamFormat]
Create a pair of strings @@ -1752,7 +1778,7 @@

Index of values

opam [OpamPath.Repository]
Return the OPAM file for a given package: - $opam/repo/$repo/packages/$NAME.$VERSION/opam + $opam/repo/$repo/packages/XXX/$NAME.$VERSION/opam
opam [OpamPath]
opam_files [OpamPackage]
-Look for all .opam files in directory -
-
opam_version [OpamFile.Config]
Return the OPAM version @@ -1803,7 +1824,7 @@

Index of values

package [OpamPath.Repository]
-Package folder: $opam/repo/$repo/packages/$NAME.$VERSION +Package folder: $opam/repo/$repo/packages/XXX/$NAME.$VERSION
package_repository_map [OpamState]
prefix [OpamRepository]
+Check if a package has a given prefix in the repository +
+
prefix [OpamPath.Repository]
+Prefix file $opam/repo/prefix +
+
preinstalled [OpamFile.Comp]
Is it a pre-installed compiler description file
prettify [OpamFilename]
+Prettify a filename: replace /path/to/opam/foo by <opam>/foo, replace /path/to/home/foo by ~/foo +
+
prettify_dir [OpamFilename]
+Prettify a dirname. +
+
pretty_backtrace [OpamMisc]
Return a pretty-printed backtrace
pretty_list [OpamMisc]
+Display a pretty list: "x";"y";"z" -> "x, y and z" +
+
print_env_warning [OpamState]
Print a warning if the environment is not set-up properly. @@ -2143,12 +2189,28 @@

Index of values

Rebuild the state cache.
rec_dirs [OpamSystem]
+rec_dirs dir return the list list of all directories recursively + (going through symbolink links). +
+
rec_dirs [OpamFilename]
+List the sub-directory recursively +
+
rec_files [OpamSystem]
rec_files dir returns the list of all files in dir, recursively.
rec_files [OpamFilename]
+List all the filenames, recursively +
+
register [OpamLocal]
register [OpamHTTP]
remove_suffix [OpamMisc]
+Remove a suffix +
+
remove_suffix [OpamFilename]
+Remove a suffix from a filename +
+
replace [OpamFile.Subst]
Substitute the variables appearing in a file @@ -2416,6 +2488,26 @@

Index of values

Create a sequential solution from a list of actions
setup [OpamConfigCommand]
+Update the global and user configuration to use OPAM. +
+
setup [OpamClient.API.CONFIG]
+Global and user setup of OPAM. +
+
setup_list [OpamConfigCommand]
+Display the global and user configuration for OPAM. +
+
setup_list [OpamClient.API.CONFIG]
+Display global and user informations about OPAM setup. +
+
share [OpamPath.Switch]
Share directory for a given package: $opam/$OVERSION/share/$package @@ -2651,6 +2743,11 @@

Index of values

Cut a string
sub_dirs [OpamFilename]
+List the sub-directory +
+
subst [OpamConfigCommand]
Substitute files @@ -2737,6 +2834,11 @@

Index of values


T
tags [OpamFile.OPAM]
+Classification tags +
+
temp_file [OpamSystem]
Create a tempory file in ~/.opam/logs/<name>XXX @@ -2896,6 +2998,11 @@

Index of values

Refresh the available packages.
update_env_variables [OpamState]
+Update the global environment variables. +
+
update_hook [OpamState]
Update hook. @@ -2916,6 +3023,16 @@

Index of values

Update pinned package
update_setup [OpamState]
+Update the user configuration. +
+
update_setup_interactive [OpamState]
+Update the global and user configuration by asking some questions. +
+
updated [OpamPath.Repository]
Return the list of updated packages: @@ -2953,7 +3070,7 @@

Index of values

url [OpamPath.Repository]
-urls $opma/repo/$repo/package/$NAME.$VERSION/url +urls $opma/repo/$repo/package/XXX/$NAME.$VERSION/url
url [OpamFile.URL]
versions [OpamRepository]
-Get the available versions for a given compiler -
-
versions_of_name [OpamPackage]
Return the list of versions for a given package diff --git a/doc/html/type_OpamClient.API.CONFIG.html b/doc/html/type_OpamClient.API.CONFIG.html index 3be7ea19ff2..c8ebbc3d0f3 100644 --- a/doc/html/type_OpamClient.API.CONFIG.html +++ b/doc/html/type_OpamClient.API.CONFIG.html @@ -44,6 +44,10 @@ sig
  val config : OpamTypes.config -> unit
  val env : csh:bool -> unit
+  val setup :
+    OpamTypes.user_config option -> OpamTypes.global_config option -> unit
+  val setup_list : OpamTypes.shell -> OpamTypes.filename -> unit
+  val exec : string -> unit
  val includes : is_rec:bool -> OpamTypes.name list -> unit
  val list : OpamTypes.name list -> unit
  val variable : OpamTypes.full_variable -> unit
diff --git a/doc/html/type_OpamClient.API.SWITCH.html b/doc/html/type_OpamClient.API.SWITCH.html index da17d9be0de..93dc4d94ebf 100644 --- a/doc/html/type_OpamClient.API.SWITCH.html +++ b/doc/html/type_OpamClient.API.SWITCH.html @@ -42,8 +42,10 @@ sig
-  val switch : quiet:bool -> OpamTypes.switch -> unit
-  val install : quiet:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
+  val switch : quiet:bool -> warning:bool -> OpamTypes.switch -> unit
+  val install :
+    quiet:bool ->
+    warning:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
  val import : OpamTypes.filename option -> unit
  val export : OpamTypes.filename option -> unit
  val remove : OpamTypes.switch -> unit
diff --git a/doc/html/type_OpamClient.API.html b/doc/html/type_OpamClient.API.html index b76384a7fce..588aa1c8709 100644 --- a/doc/html/type_OpamClient.API.html +++ b/doc/html/type_OpamClient.API.html @@ -42,10 +42,15 @@ sig
-  val init : OpamTypes.repository -> OpamTypes.compiler -> jobs:int -> unit
+  val init :
+    OpamTypes.repository ->
+    OpamTypes.compiler ->
+    jobs:int ->
+    OpamTypes.shell -> OpamTypes.filename -> [ `ask | `no | `yes ] -> unit
  val list :
    print_short:bool ->
    installed_only:bool ->
+    installed_roots:bool ->
    ?name_only:bool -> ?case_sensitive:bool -> string list -> unit
  val info : fields:string list -> string list -> unit
  val install : OpamTypes.name_set -> unit
@@ -53,11 +58,16 @@   val update : OpamTypes.repository_name list -> unit
  val upgrade : OpamTypes.name_set option -> unit
  val upload : OpamTypes.upload -> OpamTypes.repository_name -> unit
-  val remove : OpamTypes.name_set -> unit
+  val remove : autoremove:bool -> OpamTypes.name_set -> unit
  module CONFIG :
    sig
      val config : OpamTypes.config -> unit
      val env : csh:bool -> unit
+      val setup :
+        OpamTypes.user_config option ->
+        OpamTypes.global_config option -> unit
+      val setup_list : OpamTypes.shell -> OpamTypes.filename -> unit
+      val exec : string -> unit
      val includes : is_rec:bool -> OpamTypes.name list -> unit
      val list : OpamTypes.name list -> unit
      val variable : OpamTypes.full_variable -> unit
@@ -75,9 +85,10 @@     end
  module SWITCH :
    sig
-      val switch : quiet:bool -> OpamTypes.switch -> unit
+      val switch : quiet:bool -> warning:bool -> OpamTypes.switch -> unit
      val install :
-        quiet:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
+        quiet:bool ->
+        warning:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
      val import : OpamTypes.filename option -> unit
      val export : OpamTypes.filename option -> unit
      val remove : OpamTypes.switch -> unit
diff --git a/doc/html/type_OpamClient.SafeAPI.html b/doc/html/type_OpamClient.SafeAPI.html index 27d8c823c2d..1fb19529c95 100644 --- a/doc/html/type_OpamClient.SafeAPI.html +++ b/doc/html/type_OpamClient.SafeAPI.html @@ -42,10 +42,15 @@ sig
-  val init : OpamTypes.repository -> OpamTypes.compiler -> jobs:int -> unit
+  val init :
+    OpamTypes.repository ->
+    OpamTypes.compiler ->
+    jobs:int ->
+    OpamTypes.shell -> OpamTypes.filename -> [ `ask | `no | `yes ] -> unit
  val list :
    print_short:bool ->
    installed_only:bool ->
+    installed_roots:bool ->
    ?name_only:bool -> ?case_sensitive:bool -> string list -> unit
  val info : fields:string list -> string list -> unit
  val install : OpamTypes.name_set -> unit
@@ -53,11 +58,16 @@   val update : OpamTypes.repository_name list -> unit
  val upgrade : OpamTypes.name_set option -> unit
  val upload : OpamTypes.upload -> OpamTypes.repository_name -> unit
-  val remove : OpamTypes.name_set -> unit
+  val remove : autoremove:bool -> OpamTypes.name_set -> unit
  module CONFIG :
    sig
      val config : OpamTypes.config -> unit
      val env : csh:bool -> unit
+      val setup :
+        OpamTypes.user_config option ->
+        OpamTypes.global_config option -> unit
+      val setup_list : OpamTypes.shell -> OpamTypes.filename -> unit
+      val exec : string -> unit
      val includes : is_rec:bool -> OpamTypes.name list -> unit
      val list : OpamTypes.name list -> unit
      val variable : OpamTypes.full_variable -> unit
@@ -75,9 +85,10 @@     end
  module SWITCH :
    sig
-      val switch : quiet:bool -> OpamTypes.switch -> unit
+      val switch : quiet:bool -> warning:bool -> OpamTypes.switch -> unit
      val install :
-        quiet:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
+        quiet:bool ->
+        warning:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
      val import : OpamTypes.filename option -> unit
      val export : OpamTypes.filename option -> unit
      val remove : OpamTypes.switch -> unit
diff --git a/doc/html/type_OpamClient.html b/doc/html/type_OpamClient.html index 34f883e30a9..5bdb2041726 100644 --- a/doc/html/type_OpamClient.html +++ b/doc/html/type_OpamClient.html @@ -45,10 +45,15 @@   module API :
    sig
      val init :
-        OpamTypes.repository -> OpamTypes.compiler -> jobs:int -> unit
+        OpamTypes.repository ->
+        OpamTypes.compiler ->
+        jobs:int ->
+        OpamTypes.shell ->
+        OpamTypes.filename -> [ `ask | `no | `yes ] -> unit
      val list :
        print_short:bool ->
        installed_only:bool ->
+        installed_roots:bool ->
        ?name_only:bool -> ?case_sensitive:bool -> string list -> unit
      val info : fields:string list -> string list -> unit
      val install : OpamTypes.name_set -> unit
@@ -56,11 +61,16 @@       val update : OpamTypes.repository_name list -> unit
      val upgrade : OpamTypes.name_set option -> unit
      val upload : OpamTypes.upload -> OpamTypes.repository_name -> unit
-      val remove : OpamTypes.name_set -> unit
+      val remove : autoremove:bool -> OpamTypes.name_set -> unit
      module CONFIG :
        sig
          val config : OpamTypes.config -> unit
          val env : csh:bool -> unit
+          val setup :
+            OpamTypes.user_config option ->
+            OpamTypes.global_config option -> unit
+          val setup_list : OpamTypes.shell -> OpamTypes.filename -> unit
+          val exec : string -> unit
          val includes : is_rec:bool -> OpamTypes.name list -> unit
          val list : OpamTypes.name list -> unit
          val variable : OpamTypes.full_variable -> unit
@@ -78,9 +88,10 @@         end
      module SWITCH :
        sig
-          val switch : quiet:bool -> OpamTypes.switch -> unit
+          val switch : quiet:bool -> warning:bool -> OpamTypes.switch -> unit
          val install :
-            quiet:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
+            quiet:bool ->
+            warning:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
          val import : OpamTypes.filename option -> unit
          val export : OpamTypes.filename option -> unit
          val remove : OpamTypes.switch -> unit
@@ -100,10 +111,15 @@   module SafeAPI :
    sig
      val init :
-        OpamTypes.repository -> OpamTypes.compiler -> jobs:int -> unit
+        OpamTypes.repository ->
+        OpamTypes.compiler ->
+        jobs:int ->
+        OpamTypes.shell ->
+        OpamTypes.filename -> [ `ask | `no | `yes ] -> unit
      val list :
        print_short:bool ->
        installed_only:bool ->
+        installed_roots:bool ->
        ?name_only:bool -> ?case_sensitive:bool -> string list -> unit
      val info : fields:string list -> string list -> unit
      val install : OpamTypes.name_set -> unit
@@ -111,11 +127,16 @@       val update : OpamTypes.repository_name list -> unit
      val upgrade : OpamTypes.name_set option -> unit
      val upload : OpamTypes.upload -> OpamTypes.repository_name -> unit
-      val remove : OpamTypes.name_set -> unit
+      val remove : autoremove:bool -> OpamTypes.name_set -> unit
      module CONFIG :
        sig
          val config : OpamTypes.config -> unit
          val env : csh:bool -> unit
+          val setup :
+            OpamTypes.user_config option ->
+            OpamTypes.global_config option -> unit
+          val setup_list : OpamTypes.shell -> OpamTypes.filename -> unit
+          val exec : string -> unit
          val includes : is_rec:bool -> OpamTypes.name list -> unit
          val list : OpamTypes.name list -> unit
          val variable : OpamTypes.full_variable -> unit
@@ -133,9 +154,10 @@         end
      module SWITCH :
        sig
-          val switch : quiet:bool -> OpamTypes.switch -> unit
+          val switch : quiet:bool -> warning:bool -> OpamTypes.switch -> unit
          val install :
-            quiet:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
+            quiet:bool ->
+            warning:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
          val import : OpamTypes.filename option -> unit
          val export : OpamTypes.filename option -> unit
          val remove : OpamTypes.switch -> unit
diff --git a/doc/html/type_OpamCompiler.html b/doc/html/type_OpamCompiler.html index 9199a320581..e944563af43 100644 --- a/doc/html/type_OpamCompiler.html +++ b/doc/html/type_OpamCompiler.html @@ -195,7 +195,8 @@       val of_list : (key * 'a) list -> 'a t
    end
  val of_filename : OpamFilename.t -> t
-  val list : OpamFilename.Dir.t -> Set.t
+  val list :
+    OpamFilename.Dir.t -> (OpamFilename.t * OpamFilename.t option) Map.t
  val system : t
  val unknown : t -> 'a
end
\ No newline at end of file diff --git a/doc/html/type_OpamConfigCommand.html b/doc/html/type_OpamConfigCommand.html index 285e617e453..fe74d78184d 100644 --- a/doc/html/type_OpamConfigCommand.html +++ b/doc/html/type_OpamConfigCommand.html @@ -48,4 +48,8 @@   val includes : is_rec:bool -> OpamTypes.name list -> unit
  val config : OpamTypes.config -> unit
  val subst : OpamTypes.basename list -> unit
+  val setup :
+    OpamTypes.user_config option -> OpamTypes.global_config option -> unit
+  val setup_list : OpamTypes.shell -> OpamTypes.filename -> unit
+  val exec : string -> unit
end
\ No newline at end of file diff --git a/doc/html/type_OpamFile.OPAM.html b/doc/html/type_OpamFile.OPAM.html index e8bdab93b80..6de64eb4376 100644 --- a/doc/html/type_OpamFile.OPAM.html +++ b/doc/html/type_OpamFile.OPAM.html @@ -70,6 +70,7 @@   val authors : t -> string list
  val license : t -> string option
  val doc : t -> string option
+  val tags : t -> string list
  val build_test : t -> OpamTypes.command list
  val build_doc : t -> OpamTypes.command list
  val with_depends : t -> OpamTypes.formula -> t
diff --git a/doc/html/type_OpamFile.Prefix.html b/doc/html/type_OpamFile.Prefix.html new file mode 100644 index 00000000000..1a619446a11 --- /dev/null +++ b/doc/html/type_OpamFile.Prefix.html @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +OpamFile.Prefix + + +sig
+  type t = string OpamTypes.name_map
+  val empty : t
+  val write : OpamTypes.filename -> t -> unit
+  val read : OpamTypes.filename -> t
+  val safe_read : OpamTypes.filename -> t
+  val read_from_channel : in_channel -> t
+  val write_to_channel : out_channel -> t -> unit
+end
\ No newline at end of file diff --git a/doc/html/type_OpamFile.html b/doc/html/type_OpamFile.html index 96174950e98..3cd85b79fa6 100644 --- a/doc/html/type_OpamFile.html +++ b/doc/html/type_OpamFile.html @@ -103,6 +103,7 @@       val authors : t -> string list
      val license : t -> string option
      val doc : t -> string option
+      val tags : t -> string list
      val build_test : t -> OpamTypes.command list
      val build_doc : t -> OpamTypes.command list
      val with_depends : t -> OpamTypes.formula -> t
@@ -360,5 +361,15 @@       val read_from_channel : in_channel -> t
      val write_to_channel : out_channel -> t -> unit
    end
+  module Prefix :
+    sig
+      type t = string OpamTypes.name_map
+      val empty : t
+      val write : OpamTypes.filename -> t -> unit
+      val read : OpamTypes.filename -> t
+      val safe_read : OpamTypes.filename -> t
+      val read_from_channel : in_channel -> t
+      val write_to_channel : out_channel -> t -> unit
+    end
  val print_stats : unit -> unit
end
\ No newline at end of file diff --git a/doc/html/type_OpamFilename.html b/doc/html/type_OpamFilename.html index 506f0bfe884..2a53b35471d 100644 --- a/doc/html/type_OpamFilename.html +++ b/doc/html/type_OpamFilename.html @@ -47,7 +47,8 @@   val cwd : unit -> Dir.t
  val rmdir : Dir.t -> unit
  val mkdir : Dir.t -> unit
-  val list_dirs : Dir.t -> Dir.t list
+  val rec_dirs : Dir.t -> Dir.t list
+  val sub_dirs : Dir.t -> Dir.t list
  val in_dir : Dir.t -> (unit -> 'a) -> 'a
  val exec :
    Dir.t ->
@@ -136,6 +137,8 @@   val create : Dir.t -> Base.t -> t
  val of_basename : Base.t -> t
  val raw_file : string -> t
+  val prettify : t -> string
+  val prettify_dir : Dir.t -> string
  val dirname : t -> Dir.t
  val basename : t -> Base.t
  val read : t -> string
@@ -145,7 +148,7 @@   val check_suffix : t -> string -> bool
  val add_extension : t -> string -> t
  val chop_extension : t -> t
-  val list_files : Dir.t -> t list
+  val rec_files : Dir.t -> t list
  val with_contents : (string -> 'a) -> t -> 'a
  val copy_in : t -> Dir.t -> unit
  val move : src:t -> dst:t -> unit
@@ -155,7 +158,8 @@   val extract : t -> Dir.t -> unit
  val extract_in : t -> Dir.t -> unit
  val starts_with : Dir.t -> t -> bool
-  val remove_prefix : prefix:Dir.t -> t -> string
+  val remove_prefix : Dir.t -> t -> string
+  val remove_suffix : Base.t -> t -> string
  val download : overwrite:bool -> t -> Dir.t -> t
  val download_iter : overwrite:bool -> t list -> Dir.t -> t
  val patch : t -> Dir.t -> unit
diff --git a/doc/html/type_OpamFormat.html b/doc/html/type_OpamFormat.html index a281b4f6391..fb309307aad 100644 --- a/doc/html/type_OpamFormat.html +++ b/doc/html/type_OpamFormat.html @@ -79,6 +79,7 @@   val make_symbol : string -> OpamTypes.value
  val make_string : string -> OpamTypes.value
  val make_list : ('-> OpamTypes.value) -> 'a list -> OpamTypes.value
+  val make_string_list : string list -> OpamTypes.value
  val make_group : ('-> OpamTypes.value) -> 'a list -> OpamTypes.value
  val make_option :
    ('-> OpamTypes.value) ->
diff --git a/doc/html/type_OpamMisc.html b/doc/html/type_OpamMisc.html index 287add69aa7..3408d8460c6 100644 --- a/doc/html/type_OpamMisc.html +++ b/doc/html/type_OpamMisc.html @@ -413,6 +413,7 @@       val find : (elt -> bool) -> t -> elt
    end
  val string_of_list : ('-> string) -> 'a list -> string
+  val pretty_list : string list -> string
  module StringMap :
    sig
      type key = string
@@ -554,7 +555,8 @@   val strip : string -> string
  val starts_with : prefix:string -> string -> bool
  val ends_with : suffix:string -> string -> bool
-  val remove_prefix : prefix:string -> string -> string option
+  val remove_prefix : prefix:string -> string -> string
+  val remove_suffix : suffix:string -> string -> string
  val cut_at : string -> char -> (string * string) option
  val rcut_at : string -> char -> (string * string) option
  val contains : string -> char -> bool
@@ -578,4 +580,5 @@     end
  val terminal_columns : unit -> int
  val uname_s : unit -> string option
+  val guess_shell_compat : unit -> [ `csh | `sh | `zsh ]
end
\ No newline at end of file diff --git a/doc/html/type_OpamPackage.html b/doc/html/type_OpamPackage.html index 0a03befce8d..d37ad8ea439 100644 --- a/doc/html/type_OpamPackage.html +++ b/doc/html/type_OpamPackage.html @@ -272,7 +272,7 @@   val of_string_opt : string -> t option
  val version : t -> OpamPackage.Version.t
  val create : OpamPackage.Name.t -> OpamPackage.Version.t -> t
-  val of_filename : OpamFilename.t -> t option
+  val of_filename : all:bool -> OpamFilename.t -> t option
  val of_dirname : OpamFilename.Dir.t -> t option
  val to_map : Set.t -> OpamPackage.Version.Set.t OpamPackage.Name.Map.t
  val versions_of_packages : Set.t -> OpamPackage.Version.Set.t
@@ -280,7 +280,6 @@     Set.t -> OpamPackage.Name.t -> OpamPackage.Version.Set.t
  val names_of_packages : Set.t -> OpamPackage.Name.Set.t
  val packages_of_name : Set.t -> OpamPackage.Name.t -> Set.t
-  val opam_files : OpamFilename.Dir.t -> Set.t
  val compare : t -> t -> int
  val equal : t -> t -> bool
  val hash : t -> int
diff --git a/doc/html/type_OpamPath.Repository.html b/doc/html/type_OpamPath.Repository.html index 998d970cb55..e079c80b363 100644 --- a/doc/html/type_OpamPath.Repository.html +++ b/doc/html/type_OpamPath.Repository.html @@ -43,7 +43,7 @@ sig
  val root : OpamTypes.repository_root -> OpamTypes.dirname
-  val lock : OpamTypes.repository_root -> OpamTypes.filename
+  val prefix : OpamTypes.repository_root -> OpamTypes.filename
  val create :
    OpamTypes.repository_root ->
    OpamTypes.repository_name -> OpamTypes.repository_root
@@ -51,11 +51,20 @@   val config : OpamTypes.repository_root -> OpamTypes.filename
  val packages_dir : OpamTypes.repository_root -> OpamTypes.dirname
  val package :
-    OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.dirname
+    OpamTypes.repository_root ->
+    string option -> OpamTypes.package -> OpamTypes.dirname
  val opam :
-    OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.filename
+    OpamTypes.repository_root ->
+    string option -> OpamTypes.package -> OpamTypes.filename
  val descr :
-    OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.filename
+    OpamTypes.repository_root ->
+    string option -> OpamTypes.package -> OpamTypes.filename
+  val url :
+    OpamTypes.repository_root ->
+    string option -> OpamTypes.package -> OpamTypes.filename
+  val files :
+    OpamTypes.repository_root ->
+    string option -> OpamTypes.package -> OpamTypes.dirname
  val archive :
    OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.filename
  val archives_dir : OpamTypes.repository_root -> OpamTypes.dirname
@@ -66,10 +75,6 @@   val compiler_descr :
    OpamTypes.repository_root -> OpamTypes.compiler -> OpamTypes.filename
  val compilers_dir : OpamTypes.repository_root -> OpamTypes.dirname
-  val url :
-    OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.filename
-  val files :
-    OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.dirname
  val tmp : OpamTypes.repository_root -> OpamTypes.dirname
  val tmp_dir :
    OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.dirname
diff --git a/doc/html/type_OpamPath.html b/doc/html/type_OpamPath.html index c70fef39f60..7a691c009c9 100644 --- a/doc/html/type_OpamPath.html +++ b/doc/html/type_OpamPath.html @@ -59,6 +59,7 @@   val descr_dir : OpamPath.t -> OpamTypes.dirname
  val archives_dir : OpamPath.t -> OpamTypes.dirname
  val repo_index : OpamPath.t -> OpamTypes.filename
+  val init : OpamPath.t -> OpamTypes.dirname
  module Switch :
    sig
      val root : OpamPath.t -> OpamTypes.switch -> OpamTypes.dirname
@@ -108,7 +109,7 @@   module Repository :
    sig
      val root : OpamTypes.repository_root -> OpamTypes.dirname
-      val lock : OpamTypes.repository_root -> OpamTypes.filename
+      val prefix : OpamTypes.repository_root -> OpamTypes.filename
      val create :
        OpamTypes.repository_root ->
        OpamTypes.repository_name -> OpamTypes.repository_root
@@ -116,11 +117,20 @@       val config : OpamTypes.repository_root -> OpamTypes.filename
      val packages_dir : OpamTypes.repository_root -> OpamTypes.dirname
      val package :
-        OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.dirname
+        OpamTypes.repository_root ->
+        string option -> OpamTypes.package -> OpamTypes.dirname
      val opam :
-        OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.filename
+        OpamTypes.repository_root ->
+        string option -> OpamTypes.package -> OpamTypes.filename
      val descr :
-        OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.filename
+        OpamTypes.repository_root ->
+        string option -> OpamTypes.package -> OpamTypes.filename
+      val url :
+        OpamTypes.repository_root ->
+        string option -> OpamTypes.package -> OpamTypes.filename
+      val files :
+        OpamTypes.repository_root ->
+        string option -> OpamTypes.package -> OpamTypes.dirname
      val archive :
        OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.filename
      val archives_dir : OpamTypes.repository_root -> OpamTypes.dirname
@@ -131,10 +141,6 @@       val compiler_descr :
        OpamTypes.repository_root -> OpamTypes.compiler -> OpamTypes.filename
      val compilers_dir : OpamTypes.repository_root -> OpamTypes.dirname
-      val url :
-        OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.filename
-      val files :
-        OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.dirname
      val tmp : OpamTypes.repository_root -> OpamTypes.dirname
      val tmp_dir :
        OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.dirname
diff --git a/doc/html/type_OpamRepository.html b/doc/html/type_OpamRepository.html index 2e0173bffbc..d9f500a32e3 100644 --- a/doc/html/type_OpamRepository.html +++ b/doc/html/type_OpamRepository.html @@ -80,10 +80,18 @@   val make_archive :
    ?gener_digest:bool ->
    ?local_path:OpamTypes.dirname -> OpamTypes.package -> unit
-  val packages : OpamTypes.repository_root -> OpamTypes.package_set
-  val compilers : OpamTypes.repository_root -> OpamTypes.compiler_set
-  val versions :
-    OpamTypes.repository_root -> OpamTypes.name -> OpamTypes.version_set
+  val packages :
+    OpamTypes.repository_root ->
+    string OpamTypes.name_map * OpamTypes.package_set
+  val compilers :
+    OpamTypes.repository_root ->
+    (OpamTypes.filename * OpamTypes.filename option) OpamTypes.compiler_map
  val files :
    OpamTypes.repository_root -> OpamTypes.package -> OpamTypes.filename_set
+  val prefix :
+    OpamTypes.repository_root -> OpamTypes.package -> string option
+  val find_prefix :
+    string OpamTypes.name_map -> OpamTypes.package -> string option
+  val invalid_checksum :
+    OpamTypes.filename -> actual:string -> expected:string -> 'a
end
\ No newline at end of file diff --git a/doc/html/type_OpamRepositoryCommand.html b/doc/html/type_OpamRepositoryCommand.html index f32e8fdd25e..1cd37548e40 100644 --- a/doc/html/type_OpamRepositoryCommand.html +++ b/doc/html/type_OpamRepositoryCommand.html @@ -42,7 +42,8 @@ sig
-  val update_index : OpamState.Types.t -> unit
+  val update_index :
+    OpamState.Types.t -> OpamTypes.repository OpamTypes.package_map
  val list : short:bool -> unit
  val add :
    OpamTypes.repository_name ->
diff --git a/doc/html/type_OpamState.html b/doc/html/type_OpamState.html index 52dc56365c6..1f5b8e224fe 100644 --- a/doc/html/type_OpamState.html +++ b/doc/html/type_OpamState.html @@ -74,7 +74,16 @@   val add_to_env :
    OpamState.state ->
    OpamTypes.env -> (string * string * string) list -> OpamTypes.env
-  val print_env_warning : ?add_profile:bool -> OpamState.state -> unit
+  val print_env_warning :
+    OpamState.state -> OpamTypes.user_config option -> unit
+  val update_setup_interactive :
+    OpamState.state -> OpamTypes.shell -> OpamTypes.filename -> unit
+  val display_setup :
+    OpamState.state -> OpamTypes.shell -> OpamTypes.filename -> unit
+  val update_setup :
+    OpamState.state ->
+    OpamTypes.user_config option -> OpamTypes.global_config option -> unit
+  val update_env_variables : OpamState.state -> unit
  val contents_of_variable :
    OpamState.state -> OpamTypes.full_variable -> OpamTypes.variable_contents
  val substitute_string : OpamState.state -> string -> string
@@ -96,7 +105,8 @@   val package_repository_map :
    OpamState.state -> OpamTypes.repository OpamTypes.package_map
  val compiler_repository_map :
-    OpamState.state -> OpamTypes.repository OpamTypes.compiler_map
+    OpamState.state ->
+    (OpamTypes.filename * OpamTypes.filename option) OpamTypes.compiler_map
  val sorted_repositories : OpamState.state -> OpamTypes.repository list
  val compilers : root:OpamTypes.dirname -> OpamTypes.compiler_set
  val install_compiler :
diff --git a/doc/html/type_OpamSwitchCommand.html b/doc/html/type_OpamSwitchCommand.html index 150414c1bd4..4fa26c32907 100644 --- a/doc/html/type_OpamSwitchCommand.html +++ b/doc/html/type_OpamSwitchCommand.html @@ -42,11 +42,13 @@ sig
-  val install : quiet:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
+  val install :
+    quiet:bool ->
+    warning:bool -> OpamTypes.switch -> OpamTypes.compiler -> unit
  val import : OpamTypes.filename option -> unit
  val export : OpamTypes.filename option -> unit
  val remove : OpamTypes.switch -> unit
-  val switch : quiet:bool -> OpamTypes.switch -> unit
+  val switch : quiet:bool -> warning:bool -> OpamTypes.switch -> unit
  val reinstall : OpamTypes.switch -> unit
  val show : unit -> unit
  val list : print_short:bool -> installed_only:bool -> unit
diff --git a/doc/html/type_OpamSystem.html b/doc/html/type_OpamSystem.html index 2dd61228d21..9faa90ff246 100644 --- a/doc/html/type_OpamSystem.html +++ b/doc/html/type_OpamSystem.html @@ -60,6 +60,7 @@   val in_dir : string -> (unit -> 'a) -> 'a
  val files_with_links : string -> string list
  val rec_files : string -> string list
+  val rec_dirs : string -> string list
  val ocaml_version : string option Lazy.t
  val system_ocamlc_where : string option Lazy.t
  val system_ocamlc_version : string option Lazy.t
diff --git a/doc/html/type_OpamTypes.html b/doc/html/type_OpamTypes.html index 27755fb09b3..52535881881 100644 --- a/doc/html/type_OpamTypes.html +++ b/doc/html/type_OpamTypes.html @@ -665,6 +665,13 @@     conf_is_link : bool;
    conf_options : OpamVariable.Section.Full.t list;
  }
+  type shell = [ `csh | `sh | `zsh ]
+  type global_config = { complete : bool; switch_eval : bool; }
+  type user_config = {
+    shell : OpamTypes.shell;
+    ocamlinit : bool;
+    dot_profile : OpamTypes.filename option;
+  }
  type symbol = Eq | Neq | Le | Ge | Lt | Gt
  type filter =
      FBool of bool
From 9c99b459a1d1f13cab0ca0f2a2ba5ad8877b31a4 Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Mon, 11 Mar 2013 16:11:01 +0100 Subject: [PATCH 4/8] Update man pages --- doc/man/opam-config.1 | 56 ++++++++++++++++++++++++++++++++++----- doc/man/opam-help.1 | 2 +- doc/man/opam-info.1 | 5 +++- doc/man/opam-init.1 | 29 ++++++++++++++++++-- doc/man/opam-install.1 | 5 +++- doc/man/opam-list.1 | 8 +++++- doc/man/opam-pin.1 | 5 +++- doc/man/opam-reinstall.1 | 5 +++- doc/man/opam-remote.1 | 5 +++- doc/man/opam-remove.1 | 8 +++++- doc/man/opam-repository.1 | 5 +++- doc/man/opam-search.1 | 8 +++++- doc/man/opam-switch.1 | 8 +++++- doc/man/opam-update.1 | 5 +++- doc/man/opam-upgrade.1 | 5 +++- doc/man/opam-upload.1 | 5 +++- doc/man/opam.1 | 5 +++- 17 files changed, 145 insertions(+), 24 deletions(-) diff --git a/doc/man/opam-config.1 b/doc/man/opam-config.1 index ad00fc3a236..c834c296681 100644 --- a/doc/man/opam-config.1 +++ b/doc/man/opam-config.1 @@ -1,6 +1,6 @@ .\" Pipe this output to groff -man -Tutf8 | less .\" -.TH "OPAM-CONFIG" 1 "" "Opam 0.9.3" "Opam Manual" +.TH "OPAM-CONFIG" 1 "" "Opam 0.9.5" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l @@ -21,27 +21,66 @@ Apart from \fBopam config env\fR, most of these commands are used by opam intern Name of the sub\-command. See the \fBDOMAINS\fR section for more info. .SH OPTIONS .TP 4 -\fB\-c\fR, \fB\-\-csh\fR -Use csh\-compatible output mode. +\fB\-a\fR, \fB\-\-all\fR +Enable all the global and user configuration options. +.TP 4 +\fB\-\-csh\fR +Use sh\-compatible mode for configuring OPAM. +.TP 4 +\fB\-\-csh\fR +Use csh\-compatible mode for configuring OPAM. +.TP 4 +\fB\-\-dot\-profile\fR=\fIFILENAME\fR (absent=/Users/tgazagna/.profile) +Name of the configuration file to update (if necessary). .TP 4 \fB\-e\fR \fIVAL\fR Backward\-compatible option, equivalent to \fBopam config env\fR. .TP 4 +\fB\-g\fR, \fB\-\-global\fR +Enbale all the global configuration options. +.TP 4 +\fB\-l\fR, \fB\-\-list\fR +List the current configuration. +.TP 4 +\fB\-\-no\-complete\fR +Do not load the auto\-completion scripts in the environment. +.TP 4 +\fB\-\-no\-switch\-eval\fR +Do not install `opam\-switch\-eval` to switch & eval using a single command. +.TP 4 +\fB\-\-ocamlinit\fR +Modify ~/.ocamlinit to make `#use "topfind"` works in the toplevel. +.TP 4 +\fB\-\-profile\fR +Modify ~/.profile to setup an OPAM\-friendly environment when starting a new shell. +.TP 4 \fB\-R\fR, \fB\-\-rec\fR Recursive query. +.TP 4 +\fB\-u\fR, \fB\-\-user\fR +Enable all the user configuration options. +.TP 4 +\fB\-\-zsh\fR +Use zsh\-compatible mode for configuring OPAM. .SH DOMAINS .TP 4 \fBenv\fR -returns the environment variables PATH, MANPATH, OCAML_TOPLEVEL_PATH and CAML_LD_LIBRARY_PATH according to the current selected compiler. The output of this command is meant to be evaluated by a shell, for example by doing \fBeval `opam config env`\fR. +Return the environment variables PATH, MANPATH, OCAML_TOPLEVEL_PATH and CAML_LD_LIBRARY_PATH according to the current selected compiler. The output of this command is meant to be evaluated by a shell, for example by doing \fBeval `opam config env`\fR. +.TP 4 +\fBsetup\fR +Configure global and user parameters for OPAM. Use \fB opam config setup\fR to display more options. Use \fB\-\-list\fR to display the current configuration options. You can use this command to automatically update: (i) user\-configuration files such as ~/.profile and ~/.ocamlinit; and (ii) global\-configaration files controlling which shell scripts are loaded on startup, such as auto\-completion. These configuration options can be updated using: \fBopam config setup \-\-global\fR to setup the global configuration files stored in \fB~/.opam/opam\-init/\fR and \fBopam config setup \-\-user\fR to setup the user ones. To modify both the global and user configuration, use \fBopam config setup \-\-all\fR. +.TP 4 +\fBexec\fR +Execute the shell script given in parameter with the correct environment variables. This option can be used to cross\-compile between switches using \fBopam config exec "CMD ARG1 ... ARGn" \-\-switch=SWITCH\fR .TP 4 \fBvar\fR -returns the value associated with the given variable. If the variable contains a colon such as \fIpkg:var\fR, then the left element will be understood as the package in which the variable is defined. The variable resolution is done as follows: first, OPAM will check whether \fB$var\fR exists; for package variables, it will look for \fB$pkg_var\fR. If the variable is not found, OPAM will then check whether the variable is implicit. There are two global implicit variables: \fIocaml\-version\fR and \fIpreinstalled\fR and two implicit variables per package: \fIpkg:installed\fR which is either \fB"true"\fR or \fB"false"\fR, and \fIpkg:enable\fR which is either \fB"enable"\fR or \fB"disable"\fR. Finally, OPAM will look into its global and package config files to find whether these variables exist. +Return the value associated with the given variable. If the variable contains a colon such as \fIpkg:var\fR, then the left element will be understood as the package in which the variable is defined. The variable resolution is done as follows: first, OPAM will check whether \fB$var\fR exists; for package variables, it will look for \fB$pkg_var\fR. If the variable is not found, OPAM will then check whether the variable is implicit. There are two global implicit variables: \fIocaml\-version\fR and \fIpreinstalled\fR and two implicit variables per package: \fIpkg:installed\fR which is either \fB"true"\fR or \fB"false"\fR, and \fIpkg:enable\fR which is either \fB"enable"\fR or \fB"disable"\fR. Finally, OPAM will look into its global and package config files to find whether these variables exist. .TP 4 \fBlist\fR -returns the list of all variables defined in the listed packages. It is possible to filter the list of variables by giving package names (use \fBglobals\fR to get the list of global variables). No parameter means displaying all the variables. +Return the list of all variables defined in the listed packages. It is possible to filter the list of variables by giving package names (use \fBglobals\fR to get the list of global variables). No parameter means displaying all the variables. .TP 4 \fBsubst\fR -substitutes variables in the given files. The strings \fI%{var}%\fR are replaced by the value of the variable \fIvar\fR (see the documentation associated to \fBopam config var\fR). +Substitute variables in the given files. The strings \fI%{var}%\fR are replaced by the value of the variable \fIvar\fR (see the documentation associated to \fBopam config var\fR). .TP 4 \fBincludes\fR returns include options. @@ -64,6 +103,9 @@ These options are common to all commands. \fB\-\-debug\fR Print debug message on stdout. This is equivalent to setting \fB$OPAMDEBUG\fR to a value greater or equal to 2. .TP 4 +\fB\-\-git\-version\fR +Print the git version if it exists and exit. +.TP 4 \fB\-\-help\fR[=\fIFMT\fR] (default=pager) Show this help in format \fIFMT\fR (pager, plain or groff). .TP 4 diff --git a/doc/man/opam-help.1 b/doc/man/opam-help.1 index f693d134a9f..312b1c9cb06 100644 --- a/doc/man/opam-help.1 +++ b/doc/man/opam-help.1 @@ -1,6 +1,6 @@ .\" Pipe this output to groff -man -Tutf8 | less .\" -.TH "OPAM-HELP" 1 "" "Opam 0.9.3" "Opam Manual" +.TH "OPAM-HELP" 1 "" "Opam 0.9.5" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l diff --git a/doc/man/opam-info.1 b/doc/man/opam-info.1 index 2e5a9a61e52..a92c5888ae0 100644 --- a/doc/man/opam-info.1 +++ b/doc/man/opam-info.1 @@ -1,6 +1,6 @@ .\" Pipe this output to groff -man -Tutf8 | less .\" -.TH "OPAM-INFO" 1 "" "Opam 0.9.3" "Opam Manual" +.TH "OPAM-INFO" 1 "" "Opam 0.9.5" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l @@ -32,6 +32,9 @@ These options are common to all commands. \fB\-\-debug\fR Print debug message on stdout. This is equivalent to setting \fB$OPAMDEBUG\fR to a value greater or equal to 2. .TP 4 +\fB\-\-git\-version\fR +Print the git version if it exists and exit. +.TP 4 \fB\-\-help\fR[=\fIFMT\fR] (default=pager) Show this help in format \fIFMT\fR (pager, plain or groff). .TP 4 diff --git a/doc/man/opam-init.1 b/doc/man/opam-init.1 index cb0f78bc11f..60bf0f4504d 100644 --- a/doc/man/opam-init.1 +++ b/doc/man/opam-init.1 @@ -1,6 +1,6 @@ .\" Pipe this output to groff -man -Tutf8 | less .\" -.TH "OPAM-INIT" 1 "" "Opam 0.9.3" "Opam Manual" +.TH "OPAM-INIT" 1 "" "Opam 0.9.5" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l @@ -14,9 +14,13 @@ opam\-init \- Initialize OPAM state. .P The \fBinit\fR command creates a fresh client state. This initializes OPAM configuration in \fI~/.opam\fR and configures a default package repository. .P +Once the fresh client has been created, OPAM will ask the user if he wants \fI~/.profile\fR and \fI~/.ocamlinit\fR to be updated. If \fB\-\-auto\-setup\fR is used, OPAM will modify the configuration files automatically, without asking the user. If \fB\-\-no\-setup\fR is used, OPAM will *NOT* modify anything outside of \fI~/.opam\fR. +.P Additional repositories can be added later by using the \fBopam repository\fR command. .P -The local cache of a repository state can be updated by using \fBopam update\fR. +The state of repositories can be synchronized by using \fBopam update\fR. +.P +The user and global configuration files can be setup later by using \fBopam config setup\fR. .SH ARGUMENTS .TP 4 \fIADDRESS\fR (absent=http://opam.ocamlpro.com) @@ -26,18 +30,30 @@ Address of the repository. Name of the repository. .SH OPTIONS .TP 4 +\fB\-a\fR, \fB\-\-auto\-setup\fR +Automatically setup all the global and user configuration options for OPAM. +.TP 4 \fB\-b\fR, \fB\-\-keep\-build\-dir\fR Keep the build directory. This is equivalent to setting \fB$OPAMKEEPBUILDIR\fR to a non\-empty string. .TP 4 \fB\-\-comp\fR=\fIVERSION\fR (absent=system) Which compiler version to use. .TP 4 +\fB\-\-csh\fR +Use csh\-compatible mode for configuring OPAM. +.TP 4 +\fB\-\-csh\fR +Use sh\-compatible mode for configuring OPAM. +.TP 4 \fB\-\-cudf\fR=\fIFILENAME\fR Save the CUDF request sent to the solver to \fIFILENAME\fR\-.cudf. .TP 4 \fB\-d\fR, \fB\-\-build\-doc\fR Build the package documentation. This is equivalent to setting \fB$OPAMBUILDDOC\fR to a non\-empty string. .TP 4 +\fB\-\-dot\-profile\fR=\fIFILENAME\fR (absent=/Users/tgazagna/.profile) +Name of the configuration file to update (if necessary). +.TP 4 \fB\-\-dry\-run\fR Simply call the solver without actually performing any build/install operations. .TP 4 @@ -59,8 +75,14 @@ Use \fIMAKE\fR as the default 'make' command. \fB\-n\fR, \fB\-\-no\-checksums\fR Do not verify the checksum of downloaded archives.This is equivalent to setting \fB$OPAMNOCHECKSUMS\fR to a non\-empty string. .TP 4 +\fB\-n\fR, \fB\-\-no\-setup\fR +Do not update the global and user configuration options to setup OPAM. +.TP 4 \fB\-t\fR, \fB\-\-build\-test\fR Build and \fBrun\fR the package unit\-tests. This is equivalent to setting \fB$OPAMBUILDTEST\fR to a non\-empty string. +.TP 4 +\fB\-\-zsh\fR +Use zsh\-compatible mode for configuring OPAM. .SH COMMON OPTIONS .P These options are common to all commands. @@ -68,6 +90,9 @@ These options are common to all commands. \fB\-\-debug\fR Print debug message on stdout. This is equivalent to setting \fB$OPAMDEBUG\fR to a value greater or equal to 2. .TP 4 +\fB\-\-git\-version\fR +Print the git version if it exists and exit. +.TP 4 \fB\-\-help\fR[=\fIFMT\fR] (default=pager) Show this help in format \fIFMT\fR (pager, plain or groff). .TP 4 diff --git a/doc/man/opam-install.1 b/doc/man/opam-install.1 index ef6c6f70ef2..419e49cac76 100644 --- a/doc/man/opam-install.1 +++ b/doc/man/opam-install.1 @@ -1,6 +1,6 @@ .\" Pipe this output to groff -man -Tutf8 | less .\" -.TH "OPAM-INSTALL" 1 "" "Opam 0.9.3" "Opam Manual" +.TH "OPAM-INSTALL" 1 "" "Opam 0.9.5" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l @@ -54,6 +54,9 @@ These options are common to all commands. \fB\-\-debug\fR Print debug message on stdout. This is equivalent to setting \fB$OPAMDEBUG\fR to a value greater or equal to 2. .TP 4 +\fB\-\-git\-version\fR +Print the git version if it exists and exit. +.TP 4 \fB\-\-help\fR[=\fIFMT\fR] (default=pager) Show this help in format \fIFMT\fR (pager, plain or groff). .TP 4 diff --git a/doc/man/opam-list.1 b/doc/man/opam-list.1 index 1ca883d9e1e..05ba20b9ae3 100644 --- a/doc/man/opam-list.1 +++ b/doc/man/opam-list.1 @@ -1,6 +1,6 @@ .\" Pipe this output to groff -man -Tutf8 | less .\" -.TH "OPAM-LIST" 1 "" "Opam 0.9.3" "Opam Manual" +.TH "OPAM-LIST" 1 "" "Opam 0.9.5" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l @@ -26,6 +26,9 @@ List of package patterns. \fB\-i\fR, \fB\-\-installed\fR List installed packages only. .TP 4 +\fB\-\-installed\-roots\fR +Display only the installed roots. +.TP 4 \fB\-s\fR, \fB\-\-short\fR Output the names separated by one whitespace instead of using the usual formatting. .SH COMMON OPTIONS @@ -35,6 +38,9 @@ These options are common to all commands. \fB\-\-debug\fR Print debug message on stdout. This is equivalent to setting \fB$OPAMDEBUG\fR to a value greater or equal to 2. .TP 4 +\fB\-\-git\-version\fR +Print the git version if it exists and exit. +.TP 4 \fB\-\-help\fR[=\fIFMT\fR] (default=pager) Show this help in format \fIFMT\fR (pager, plain or groff). .TP 4 diff --git a/doc/man/opam-pin.1 b/doc/man/opam-pin.1 index 2e3301ec325..a1fcd9abd40 100644 --- a/doc/man/opam-pin.1 +++ b/doc/man/opam-pin.1 @@ -1,6 +1,6 @@ .\" Pipe this output to groff -man -Tutf8 | less .\" -.TH "OPAM-PIN" 1 "" "Opam 0.9.3" "Opam Manual" +.TH "OPAM-PIN" 1 "" "Opam 0.9.5" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l @@ -41,6 +41,9 @@ These options are common to all commands. \fB\-\-debug\fR Print debug message on stdout. This is equivalent to setting \fB$OPAMDEBUG\fR to a value greater or equal to 2. .TP 4 +\fB\-\-git\-version\fR +Print the git version if it exists and exit. +.TP 4 \fB\-\-help\fR[=\fIFMT\fR] (default=pager) Show this help in format \fIFMT\fR (pager, plain or groff). .TP 4 diff --git a/doc/man/opam-reinstall.1 b/doc/man/opam-reinstall.1 index 98124f356ed..fd4877d09ba 100644 --- a/doc/man/opam-reinstall.1 +++ b/doc/man/opam-reinstall.1 @@ -1,6 +1,6 @@ .\" Pipe this output to groff -man -Tutf8 | less .\" -.TH "OPAM-REINSTALL" 1 "" "Opam 0.9.3" "Opam Manual" +.TH "OPAM-REINSTALL" 1 "" "Opam 0.9.5" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l @@ -52,6 +52,9 @@ These options are common to all commands. \fB\-\-debug\fR Print debug message on stdout. This is equivalent to setting \fB$OPAMDEBUG\fR to a value greater or equal to 2. .TP 4 +\fB\-\-git\-version\fR +Print the git version if it exists and exit. +.TP 4 \fB\-\-help\fR[=\fIFMT\fR] (default=pager) Show this help in format \fIFMT\fR (pager, plain or groff). .TP 4 diff --git a/doc/man/opam-remote.1 b/doc/man/opam-remote.1 index 988eb38ebf9..ae1fa78bc9a 100644 --- a/doc/man/opam-remote.1 +++ b/doc/man/opam-remote.1 @@ -1,6 +1,6 @@ .\" Pipe this output to groff -man -Tutf8 | less .\" -.TH "OPAM-REMOTE" 1 "" "Opam 0.9.3" "Opam Manual" +.TH "OPAM-REMOTE" 1 "" "Opam 0.9.5" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l @@ -47,6 +47,9 @@ These options are common to all commands. \fB\-\-debug\fR Print debug message on stdout. This is equivalent to setting \fB$OPAMDEBUG\fR to a value greater or equal to 2. .TP 4 +\fB\-\-git\-version\fR +Print the git version if it exists and exit. +.TP 4 \fB\-\-help\fR[=\fIFMT\fR] (default=pager) Show this help in format \fIFMT\fR (pager, plain or groff). .TP 4 diff --git a/doc/man/opam-remove.1 b/doc/man/opam-remove.1 index f3f0aa07910..b23ee370158 100644 --- a/doc/man/opam-remove.1 +++ b/doc/man/opam-remove.1 @@ -1,6 +1,6 @@ .\" Pipe this output to groff -man -Tutf8 | less .\" -.TH "OPAM-REMOVE" 1 "" "Opam 0.9.3" "Opam Manual" +.TH "OPAM-REMOVE" 1 "" "Opam 0.9.5" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l @@ -19,6 +19,9 @@ This command removes (i.e. uninstall) one or more packages currently installed i List of package names. .SH OPTIONS .TP 4 +\fB\-a\fR, \fB\-\-auto\-remove\fR +Remove all the packages which have not been explicitely installed and which are not necessary anymore. It is possible to enforce keeping an already installed package by running \fBopam install \fR. This flag can also be set using the \fB$OPAMAUTOREMOVE\fR configuration variable. +.TP 4 \fB\-b\fR, \fB\-\-keep\-build\-dir\fR Keep the build directory. This is equivalent to setting \fB$OPAMKEEPBUILDIR\fR to a non\-empty string. .TP 4 @@ -52,6 +55,9 @@ These options are common to all commands. \fB\-\-debug\fR Print debug message on stdout. This is equivalent to setting \fB$OPAMDEBUG\fR to a value greater or equal to 2. .TP 4 +\fB\-\-git\-version\fR +Print the git version if it exists and exit. +.TP 4 \fB\-\-help\fR[=\fIFMT\fR] (default=pager) Show this help in format \fIFMT\fR (pager, plain or groff). .TP 4 diff --git a/doc/man/opam-repository.1 b/doc/man/opam-repository.1 index 19ba0c30e08..6ee20baa422 100644 --- a/doc/man/opam-repository.1 +++ b/doc/man/opam-repository.1 @@ -1,6 +1,6 @@ .\" Pipe this output to groff -man -Tutf8 | less .\" -.TH "OPAM-REPOSITORY" 1 "" "Opam 0.9.3" "Opam Manual" +.TH "OPAM-REPOSITORY" 1 "" "Opam 0.9.5" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l @@ -47,6 +47,9 @@ These options are common to all commands. \fB\-\-debug\fR Print debug message on stdout. This is equivalent to setting \fB$OPAMDEBUG\fR to a value greater or equal to 2. .TP 4 +\fB\-\-git\-version\fR +Print the git version if it exists and exit. +.TP 4 \fB\-\-help\fR[=\fIFMT\fR] (default=pager) Show this help in format \fIFMT\fR (pager, plain or groff). .TP 4 diff --git a/doc/man/opam-search.1 b/doc/man/opam-search.1 index 66e3e9a318d..8f5dd92f21a 100644 --- a/doc/man/opam-search.1 +++ b/doc/man/opam-search.1 @@ -1,6 +1,6 @@ .\" Pipe this output to groff -man -Tutf8 | less .\" -.TH "OPAM-SEARCH" 1 "" "Opam 0.9.3" "Opam Manual" +.TH "OPAM-SEARCH" 1 "" "Opam 0.9.5" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l @@ -29,6 +29,9 @@ Force the search in case sensitive mode. \fB\-i\fR, \fB\-\-installed\fR List installed packages only. .TP 4 +\fB\-\-installed\-roots\fR +Display only the installed roots. +.TP 4 \fB\-s\fR, \fB\-\-short\fR Output the names separated by one whitespace instead of using the usual formatting. .SH COMMON OPTIONS @@ -38,6 +41,9 @@ These options are common to all commands. \fB\-\-debug\fR Print debug message on stdout. This is equivalent to setting \fB$OPAMDEBUG\fR to a value greater or equal to 2. .TP 4 +\fB\-\-git\-version\fR +Print the git version if it exists and exit. +.TP 4 \fB\-\-help\fR[=\fIFMT\fR] (default=pager) Show this help in format \fIFMT\fR (pager, plain or groff). .TP 4 diff --git a/doc/man/opam-switch.1 b/doc/man/opam-switch.1 index 2f5df45ee06..4cfa68e9f6a 100644 --- a/doc/man/opam-switch.1 +++ b/doc/man/opam-switch.1 @@ -1,6 +1,6 @@ .\" Pipe this output to groff -man -Tutf8 | less .\" -.TH "OPAM-SWITCH" 1 "" "Opam 0.9.3" "Opam Manual" +.TH "OPAM-SWITCH" 1 "" "Opam 0.9.5" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l @@ -54,6 +54,9 @@ Use \fIMAKE\fR as the default 'make' command. \fB\-n\fR, \fB\-\-no\-checksums\fR Do not verify the checksum of downloaded archives.This is equivalent to setting \fB$OPAMNOCHECKSUMS\fR to a non\-empty string. .TP 4 +\fB\-\-no\-warning\fR +Do not display any warning related to environment variables. +.TP 4 \fB\-s\fR, \fB\-\-short\fR Output the names separated by one whitespace instead of using the usual formatting. .TP 4 @@ -88,6 +91,9 @@ These options are common to all commands. \fB\-\-debug\fR Print debug message on stdout. This is equivalent to setting \fB$OPAMDEBUG\fR to a value greater or equal to 2. .TP 4 +\fB\-\-git\-version\fR +Print the git version if it exists and exit. +.TP 4 \fB\-\-help\fR[=\fIFMT\fR] (default=pager) Show this help in format \fIFMT\fR (pager, plain or groff). .TP 4 diff --git a/doc/man/opam-update.1 b/doc/man/opam-update.1 index 1c8ded987a6..97132fcb285 100644 --- a/doc/man/opam-update.1 +++ b/doc/man/opam-update.1 @@ -1,6 +1,6 @@ .\" Pipe this output to groff -man -Tutf8 | less .\" -.TH "OPAM-UPDATE" 1 "" "Opam 0.9.3" "Opam Manual" +.TH "OPAM-UPDATE" 1 "" "Opam 0.9.5" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l @@ -24,6 +24,9 @@ These options are common to all commands. \fB\-\-debug\fR Print debug message on stdout. This is equivalent to setting \fB$OPAMDEBUG\fR to a value greater or equal to 2. .TP 4 +\fB\-\-git\-version\fR +Print the git version if it exists and exit. +.TP 4 \fB\-\-help\fR[=\fIFMT\fR] (default=pager) Show this help in format \fIFMT\fR (pager, plain or groff). .TP 4 diff --git a/doc/man/opam-upgrade.1 b/doc/man/opam-upgrade.1 index d62e1eaf5f7..35eb8317725 100644 --- a/doc/man/opam-upgrade.1 +++ b/doc/man/opam-upgrade.1 @@ -1,6 +1,6 @@ .\" Pipe this output to groff -man -Tutf8 | less .\" -.TH "OPAM-UPGRADE" 1 "" "Opam 0.9.3" "Opam Manual" +.TH "OPAM-UPGRADE" 1 "" "Opam 0.9.5" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l @@ -52,6 +52,9 @@ These options are common to all commands. \fB\-\-debug\fR Print debug message on stdout. This is equivalent to setting \fB$OPAMDEBUG\fR to a value greater or equal to 2. .TP 4 +\fB\-\-git\-version\fR +Print the git version if it exists and exit. +.TP 4 \fB\-\-help\fR[=\fIFMT\fR] (default=pager) Show this help in format \fIFMT\fR (pager, plain or groff). .TP 4 diff --git a/doc/man/opam-upload.1 b/doc/man/opam-upload.1 index 0824f3929c0..fe64ffc2c8d 100644 --- a/doc/man/opam-upload.1 +++ b/doc/man/opam-upload.1 @@ -1,6 +1,6 @@ .\" Pipe this output to groff -man -Tutf8 | less .\" -.TH "OPAM-UPLOAD" 1 "" "Opam 0.9.3" "Opam Manual" +.TH "OPAM-UPLOAD" 1 "" "Opam 0.9.5" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l @@ -34,6 +34,9 @@ These options are common to all commands. \fB\-\-debug\fR Print debug message on stdout. This is equivalent to setting \fB$OPAMDEBUG\fR to a value greater or equal to 2. .TP 4 +\fB\-\-git\-version\fR +Print the git version if it exists and exit. +.TP 4 \fB\-\-help\fR[=\fIFMT\fR] (default=pager) Show this help in format \fIFMT\fR (pager, plain or groff). .TP 4 diff --git a/doc/man/opam.1 b/doc/man/opam.1 index 016d5846cd7..39d8ccbeddf 100644 --- a/doc/man/opam.1 +++ b/doc/man/opam.1 @@ -1,6 +1,6 @@ .\" Pipe this output to groff -man -Tutf8 | less .\" -.TH "OPAM" 1 "" "Opam 0.9.3" "Opam Manual" +.TH "OPAM" 1 "" "Opam 0.9.5" "Opam Manual" .\" Disable hyphenantion and ragged-right .nh .ad l @@ -73,6 +73,9 @@ These options are common to all commands. \fB\-\-debug\fR Print debug message on stdout. This is equivalent to setting \fB$OPAMDEBUG\fR to a value greater or equal to 2. .TP 4 +\fB\-\-git\-version\fR +Print the git version if it exists and exit. +.TP 4 \fB\-\-help\fR[=\fIFMT\fR] (default=pager) Show this help in format \fIFMT\fR (pager, plain or groff). .TP 4 From 6324e18e24c2f58feea6cf555d59206780b4fe1c Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Mon, 11 Mar 2013 16:24:35 +0100 Subject: [PATCH 5/8] Fix silly regression introduced in de774165518c9c2abdeaf63a68081738fce1e774 --- src/core/opamFilename.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/opamFilename.ml b/src/core/opamFilename.ml index 5c1bc43f1b1..1f07c0ae6cf 100644 --- a/src/core/opamFilename.ml +++ b/src/core/opamFilename.ml @@ -30,7 +30,7 @@ module Dir = struct let prefix = Filename.concat "~" "" in let suffix = OpamMisc.remove_prefix ~prefix dirname in Filename.concat home suffix - else if not (Filename.is_relative dirname) then + else if Filename.is_relative dirname then OpamSystem.real_path dirname else dirname From c1d1c0850f97c7778b730316152d6333e418320d Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Mon, 11 Mar 2013 16:25:19 +0100 Subject: [PATCH 6/8] Add a 'release' target to facilitate releases --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 561f7b8a453..182e7f6c854 100644 --- a/Makefile +++ b/Makefile @@ -195,3 +195,9 @@ upload: archive configure: configure.ac m4/*.m4 aclocal -I m4 autoconf + +release: + git tag -d latest + git tag -a latest -m "Latest release" + git tag -a $(version) -m "Release $(version)" + $(MAKE) upload From 4f3faee0b1daa908a24602cd0aa0fbd53ab9cef5 Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Mon, 11 Mar 2013 16:27:49 +0100 Subject: [PATCH 7/8] Fix release target --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 182e7f6c854..ce518c0ae11 100644 --- a/Makefile +++ b/Makefile @@ -197,7 +197,7 @@ configure: configure.ac m4/*.m4 autoconf release: - git tag -d latest + git tag -d latest || true git tag -a latest -m "Latest release" git tag -a $(version) -m "Release $(version)" $(MAKE) upload From ddf25e2e9926aaca1e0478a3d1b567432f947d2d Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Mon, 11 Mar 2013 16:39:28 +0100 Subject: [PATCH 8/8] Update the release/upload targets --- Makefile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index ce518c0ae11..68f74b70a94 100644 --- a/Makefile +++ b/Makefile @@ -172,7 +172,9 @@ doc: compile src/**/*.mli -html -d doc/html/ $(MAKE) -C doc -OPAM_FULL = opam-full-$(version) +OPAM_FULL = opam-full-$(version) +OPAM_FULL_TARGZ = $(OPAM_FULL).tar.gz + OPAM_FILES = $(wildcard src_ext/*.tar.gz)\ $(wildcard src_ext/*.tbz)\ $(shell git ls-tree --name-only -r HEAD) @@ -185,12 +187,8 @@ archive: tar cz $(addprefix $(OPAM_FULL)/,$(OPAM_FILES)) > $(OPAM_FULL).tar.gz rm -f $(OPAM_FULL) -upload: archive - read -p "Upload $(OPAM_FULL_TARGZ) [Y/n]?" choice;\ - case x"$$choice" in \ - x|xy|xY ) scp $(OPAM_FULL).tar.gz webmaster@ocamlpro.com:pub/;;\ - * ) echo "Cancelled.";;\ - esac +upload: $(OPAM_FULL_TARGZ) + scp $(OPAM_FULL_TARGZ) webmaster@ocamlpro.com:pub/ configure: configure.ac m4/*.m4 aclocal -I m4