Skip to content

Commit

Permalink
Merge pull request #4143 from OCamlPro/207
Browse files Browse the repository at this point in the history
2.0.7 backported commits

* Properly escape Windows paths on manpages [#4129 @AltGr @rjbou]
* Fix opam installer opam file [#4058 @rjbou]
* Fix various warnings [#4132 @rjbou @AltGr - fix #4100]
* Fix dune 2.5.0 promote-install-files duplication [#4132 @rjbou ]
* opam exec: display command not found message [#4133 @rjbou - fix #4131]
  • Loading branch information
rjbou committed Apr 20, 2020
2 parents 4ec3c60 + f9a0601 commit 4c1704d
Show file tree
Hide file tree
Showing 26 changed files with 168 additions and 106 deletions.
7 changes: 7 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ repositories (changes that are automatically handled by the format upgrade tools
are not marked).


2.0.7:
* Properly escape Windows paths on manpages [#4129 @AltGr @rjbou]
* Fix opam installer opam file [#4058 @rjbou]
* Fix various warnings [#4132 @rjbou @AltGr - fix 4100]
* Fix dune 2.5.0 promote-install-files duplication [#4132 @rjbou ]
* opam exec: display command not found message [#4133 @rjbou - fix #4131]

2.0.6:
* Don't remove git cache objects that may be used [#3831 @AltGr]
* Don't include .gitattributes in index.tar.gz [#3873 @dra27]
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OPAMINSTALLER = ./opam-installer$(EXE)
ALWAYS:
@

DUNE_PROMOTE_ARG := $(shell dune build --help=plain 2>/dev/null | sed -ne 's/.*\(--promote-install-files\).*/ \1/p')
DUNE_PROMOTE_ARG := $(shell dune build --help=plain 2>/dev/null | sed -ne 's/^[[:space:]]*\(--promote-install-files\)[[:space:]]*$$/ \1/p')
DUNE_DEP = $(DUNE_EXE)
JBUILDER_ARGS ?=
DUNE_ARGS ?= $(JBUILDER_ARGS)
Expand Down
26 changes: 12 additions & 14 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for opam 2.0.6.
# Generated by GNU Autoconf 2.69 for opam 2.0.7.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -578,8 +578,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='opam'
PACKAGE_TARNAME='opam'
PACKAGE_VERSION='2.0.6'
PACKAGE_STRING='opam 2.0.6'
PACKAGE_VERSION='2.0.7'
PACKAGE_STRING='opam 2.0.7'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

Expand Down Expand Up @@ -1265,7 +1265,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures opam 2.0.6 to adapt to many kinds of systems.
\`configure' configures opam 2.0.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1327,7 +1327,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of opam 2.0.6:";;
short | recursive ) echo "Configuration of opam 2.0.7:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1431,7 +1431,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
opam configure 2.0.6
opam configure 2.0.7
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1526,7 +1526,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by opam $as_me 2.0.6, which was
It was created by opam $as_me 2.0.7, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -3973,13 +3973,11 @@ else
fi
if test "x${CI}" != "x"; then :
CONF_OCAMLFLAGS="-warn-error A-3"
CONF_OCAMLFLAGS="-w -67"
else
if test "x${CI}" != "x"; then :
CONF_OCAMLFLAGS=
CONF_OCAMLFLAGS="${CONF_OCAMLFLAGS} -w -67"
fi
if test "x${CI}" != "x" -o "x${enable_developer_mode}" = "xyes"; then :
Expand Down Expand Up @@ -6085,7 +6083,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by opam $as_me 2.0.6, which was
This file was extended by opam $as_me 2.0.7, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -6138,7 +6136,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
opam config.status 2.0.6
opam config.status 2.0.7
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Expand Down
10 changes: 5 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dnl The line below must be formatted AC_INIT(opam,VERSION) with no extra spaces
AC_INIT(opam,2.0.6)
AC_INIT(opam,2.0.7)
AC_COPYRIGHT(Copyright 2012-2017 OcamlPro SAS)

AC_CONFIG_MACRO_DIR([m4])
Expand Down Expand Up @@ -131,11 +131,11 @@ AS_IF([test "x${enable_developer_mode}" = "xyes"], [AC_SUBST(DEVELOPER,true)], [

AS_IF([test "x${with_mccs}" = "xno"], [AC_SUBST(MCCS_ENABLED,false)], [AC_SUBST(MCCS_ENABLED,true)])

CONF_OCAMLFLAGS="-w -67"

AS_IF([test "x${CI}" != "x"], [
CONF_OCAMLFLAGS="-warn-error A-3"
],[
CONF_OCAMLFLAGS=
])
CONF_OCAMLFLAGS="${CONF_OCAMLFLAGS} -w -67"
],[])
AS_IF([test "x${CI}" != "x" -o "x${enable_developer_mode}" = "xyes"],[
AS_IF([test "x${CCOMP_TYPE}" = "xmsvc"],[
CONF_CFLAGS="\"/WX\""
Expand Down
6 changes: 3 additions & 3 deletions opam-client.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "1.2"
version: "2.0.6"
version: "2.0.7"
maintainer: "opam-devel@lists.ocaml.org"
authors: [
"Vincent Bernardoff <vb@luminar.eu.org>"
Expand All @@ -21,8 +21,8 @@ build: [
[make "%{name}%.install"]
]
depends: [
"opam-state" {= "2.0.6"}
"opam-solver" {= "2.0.6"}
"opam-state" {= "2.0.7"}
"opam-solver" {= "2.0.7"}
"re" {>= "1.7.2"}
"cmdliner" {>= "0.9.8"}
"dune" {build & >= "1.2.1"}
Expand Down
2 changes: 1 addition & 1 deletion opam-core.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "1.2"
version: "2.0.6"
version: "2.0.7"
maintainer: "opam-devel@lists.ocaml.org"
authors: [
"Vincent Bernardoff <vb@luminar.eu.org>"
Expand Down
4 changes: 2 additions & 2 deletions opam-devel.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "1.2"
version: "2.0.6"
version: "2.0.7"
maintainer: "opam-devel@lists.ocaml.org"
authors: [
"Vincent Bernardoff <vb@luminar.eu.org>"
Expand All @@ -22,7 +22,7 @@ build: [
]
build-test: [make "tests"]
depends: [
"opam-client" {= "2.0.6"}
"opam-client" {= "2.0.7"}
"cmdliner" {>= "0.9.8"}
"dune" {build & >= "1.2.1"}
]
Expand Down
4 changes: 2 additions & 2 deletions opam-format.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "1.2"
version: "2.0.6"
version: "2.0.7"
maintainer: "opam-devel@lists.ocaml.org"
authors: [
"Vincent Bernardoff <vb@luminar.eu.org>"
Expand All @@ -21,7 +21,7 @@ build: [
[make "%{name}%.install"]
]
depends: [
"opam-core" {= "2.0.6"}
"opam-core" {= "2.0.7"}
"opam-file-format" {>= "2.0.0~rc2"}
"dune" {build & >= "1.2.1"}
]
Expand Down
6 changes: 3 additions & 3 deletions opam-installer.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "1.2"
version: "2.0.6"
version: "2.0.7"
maintainer: "opam-devel@lists.ocaml.org"
authors: [
"Vincent Bernardoff <vb@luminar.eu.org>"
Expand All @@ -18,10 +18,10 @@ bug-reports: "https://github.com/ocaml/opam/issues"
dev-repo: "https://github.com/ocaml/opam.git"
build: [
["./configure" "--disable-checks" "--prefix" prefix]
[make "DUNE_ARGS=-p %{name}%" "%{name}%.install"]
[make "%{name}%.install"]
]
depends: [
"opam-format" {= "2.0.6"}
"opam-format" {= "2.0.7"}
"cmdliner" {>= "0.9.8"}
"dune" {build & >= "1.2.1"}
]
Expand Down
4 changes: 2 additions & 2 deletions opam-repository.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "1.2"
version: "2.0.6"
version: "2.0.7"
maintainer: "opam-devel@lists.ocaml.org"
authors: [
"Vincent Bernardoff <vb@luminar.eu.org>"
Expand All @@ -21,7 +21,7 @@ build: [
[make "%{name}%.install"]
]
depends: [
"opam-format" {= "2.0.6"}
"opam-format" {= "2.0.7"}
"dune" {build & >= "1.2.1"}
]
available: ocaml-version >= "4.02.3"
4 changes: 2 additions & 2 deletions opam-solver.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "1.2"
version: "2.0.6"
version: "2.0.7"
maintainer: "opam-devel@lists.ocaml.org"
authors: [
"Vincent Bernardoff <vb@luminar.eu.org>"
Expand All @@ -21,7 +21,7 @@ build: [
[make "%{name}%.install"]
]
depends: [
"opam-format" {= "2.0.6"}
"opam-format" {= "2.0.7"}
"mccs" {>= "1.1+9"}
"dose3" {>= "5"}
"cudf" {>= "0.7"}
Expand Down
4 changes: 2 additions & 2 deletions opam-state.opam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
opam-version: "1.2"
version: "2.0.6"
version: "2.0.7"
maintainer: "opam-devel@lists.ocaml.org"
authors: [
"Vincent Bernardoff <vb@luminar.eu.org>"
Expand All @@ -21,7 +21,7 @@ build: [
[make "%{name}%.install"]
]
depends: [
"opam-repository" {= "2.0.6"}
"opam-repository" {= "2.0.7"}
"dune" {build & >= "1.2.1"}
]
available: ocaml-version >= "4.02.3"
2 changes: 1 addition & 1 deletion shell/bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -ue

OCAMLV=4.04.1
OPAMV=2.0.6
OPAMV=2.0.7
OPAM_REPO=https://opam.ocaml.org/2.0
DEBUG=
MAKESELF=
Expand Down
60 changes: 35 additions & 25 deletions src/client/opamAdminCommand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ let admin_command_doc =

let admin_command_man = [
`S "DESCRIPTION";
`P "This command can perform various actions on repositories in the opam \
format. It is expected to be run from the root of a repository, i.e. a \
directory containing a 'repo' file and a subdirectory 'packages/' \
holding package definition within subdirectories. A 'compilers/' \
subdirectory (opam repository format version < 2) will also be used by \
the $(b,upgrade-format) subcommand."
`P (Printf.sprintf
"This command can perform various actions on repositories in the opam \
format. It is expected to be run from the root of a repository, i.e. a \
directory containing a 'repo' file and a subdirectory 'packages%s' \
holding package definition within subdirectories. A 'compilers%s' \
subdirectory (opam repository format version < 2) will also be used by \
the $(b,upgrade-format) subcommand."
OpamArg.dir_sep OpamArg.dir_sep)
]

let index_command_doc =
Expand Down Expand Up @@ -189,8 +191,10 @@ let cache_command =
let link_arg =
Arg.(value & opt (some OpamArg.dirname) None &
info ["link"] ~docv:"DIR" ~doc:
"Create reverse symbolic links to the archives within $(i,DIR), in \
the form $(b,DIR/PKG.VERSION/FILENAME).")
(Printf.sprintf
"Create reverse symbolic links to the archives within $(i,DIR), in \
the form $(b,DIR%sPKG.VERSION%sFILENAME)."
OpamArg.dir_sep OpamArg.dir_sep))
in
let jobs_arg =
Arg.(value & opt OpamArg.positive_integer 8 &
Expand Down Expand Up @@ -264,7 +268,7 @@ let add_hashes_command =
"This command scans through package definitions, and add hashes as \
requested (fetching the archives if required). A cache is generated \
in %s for subsequent runs."
(OpamFilename.Dir.to_string cache_dir |> Cmdliner.Manpage.escape));
(OpamArg.escape_path (OpamFilename.Dir.to_string cache_dir)));
]
in
let hash_kinds = [`MD5; `SHA256; `SHA512] in
Expand Down Expand Up @@ -456,18 +460,21 @@ let upgrade_command =
let doc = upgrade_command_doc in
let man = [
`S "DESCRIPTION";
`P "This command reads repositories from earlier opam versions, and \
converts them to repositories suitable for the current opam version. \
Packages might be created or renamed, and any compilers defined in the \
old format ('compilers/' directory) will be turned into packages, \
using a pre-defined hierarchy that assumes OCaml compilers."
`P (Printf.sprintf
"This command reads repositories from earlier opam versions, and \
converts them to repositories suitable for the current opam version. \
Packages might be created or renamed, and any compilers defined in the \
old format ('compilers%s' directory) will be turned into packages, \
using a pre-defined hierarchy that assumes OCaml compilers."
OpamArg.dir_sep)
]
in
let clear_cache_arg =
let doc =
"Instead of running the upgrade, clear the cache of archive hashes (held \
in ~/.cache), that is used to avoid re-downloading files to obtain \
their hashes at every run."
Printf.sprintf
"Instead of running the upgrade, clear the cache of archive hashes (held \
in ~%s.cache), that is used to avoid re-downloading files to obtain \
their hashes at every run." OpamArg.dir_sep
in
Arg.(value & flag & info ["clear-cache"] ~doc)
in
Expand Down Expand Up @@ -680,14 +687,17 @@ let pattern_list_arg =
Arg.string

let env_arg =
Arg.(value & opt (list string) [] & info ["environment"] ~doc:
"Use the given opam environment, in the form of a list \
comma-separated 'var=value' bindings, when resolving variables. \
This is used e.g. when computing available packages: if undefined, \
availability of packages is not taken into account. Note that, \
unless overridden, variables like 'root' or 'opam-version' may be \
taken from the current opam installation. What is defined in \
$(i,~/.opam/config) is always ignored.")
Arg.(value & opt (list string) [] & info ["environment"] ~doc:(
Printf.sprintf
"Use the given opam environment, in the form of a list of \
comma-separated 'var=value' bindings, when resolving variables. This \
is used e.g. when computing available packages: if undefined, \
availability of packages will be assumed as soon as it can not be \
resolved purely from globally defined variables. Note that, unless \
overridden, variables like 'root' or 'opam-version' may be taken \
from the current opam installation. What is defined in \
$(i,~%s.opam%sconfig) is always ignored."
OpamArg.dir_sep OpamArg.dir_sep))

let state_selection_arg =
let docs = OpamArg.package_selection_section in
Expand Down

0 comments on commit 4c1704d

Please sign in to comment.