Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce `--confirm-level' option #4582

Merged
merged 11 commits into from
May 26, 2021
Prev Previous commit
Next Next commit
remove OPAMDEPEXTYES
rjbou committed May 25, 2021

Verified

This commit was signed with the committer’s verified signature.
pradyunsg Pradyun Gedam
commit 19f650287609240abcee3a0df0b0f289ebaa378c
2 changes: 0 additions & 2 deletions src/client/opamArg.ml
Original file line number Diff line number Diff line change
@@ -220,8 +220,6 @@ let environment_variables =
(fun v -> BUILDDOC (env_bool v)), "see option `--build-doc'.";
"BUILDTEST", cli_between cli2_0 cli2_1,
(fun v -> BUILDTEST (env_bool v)), "see option `--build-test'.";
"DEPEXTYES", cli_from cli2_1, (fun v -> DEPEXTYES (env_bool v)),
"launch system package managers in non-interactive mode.";
"DOWNLOADJOBS", cli_original, (fun v -> DOWNLOADJOBS (env_int v)),
"sets the maximum number of simultaneous downloads.";
"DRYRUN", cli_original, (fun v -> DRYRUN (env_bool v)),
1 change: 0 additions & 1 deletion src/client/opamClientConfig.mli
Original file line number Diff line number Diff line change
@@ -133,7 +133,6 @@ val opam_init:
?no_env_notice:bool ->
?locked:string option ->
?no_depexts:bool ->
?depext_yes:bool ->
?cudf_file:string option ->
?best_effort:bool ->
?solver_preferences_default:string option Lazy.t ->
10 changes: 0 additions & 10 deletions src/state/opamStateConfig.ml
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ module E = struct
type OpamStd.Config.E.t +=
| BUILDDOC of bool option
| BUILDTEST of bool option
| DEPEXTYES of bool option
| DOWNLOADJOBS of int option
| DRYRUN of bool option
| IGNORECONSTRAINTS of string option
@@ -34,7 +33,6 @@ module E = struct
open OpamStd.Config.E
let builddoc = value (function BUILDDOC b -> b | _ -> None)
let buildtest = value (function BUILDTEST b -> b | _ -> None)
let depextyes = value (function DEPEXTYES b -> b | _ -> None)
let downloadjobs = value (function DOWNLOADJOBS i -> i | _ -> None)
let dryrun = value (function DRYRUN b -> b | _ -> None)
let ignoreconstraints = value (function IGNORECONSTRAINTS s -> s | _ -> None)
@@ -66,7 +64,6 @@ type t = {
no_env_notice: bool;
locked: string option;
no_depexts: bool;
depext_yes: bool;
}

let default = {
@@ -90,7 +87,6 @@ let default = {
no_env_notice = false;
locked = None;
no_depexts = false;
depext_yes = false;
}

type 'a options_fun =
@@ -108,7 +104,6 @@ type 'a options_fun =
?no_env_notice:bool ->
?locked:string option ->
?no_depexts: bool ->
?depext_yes: bool ->
'a

let setk k t
@@ -126,7 +121,6 @@ let setk k t
?no_env_notice
?locked
?no_depexts
?depext_yes
=
let (+) x opt = match opt with Some x -> x | None -> x in
k {
@@ -145,7 +139,6 @@ let setk k t
no_env_notice = t.no_env_notice + no_env_notice;
locked = t.locked + locked;
no_depexts = t.no_depexts + no_depexts;
depext_yes = t.depext_yes + depext_yes;
}

let set t = setk (fun x () -> x) t
@@ -180,9 +173,6 @@ let initk k =
?no_env_notice:(E.noenvnotice ())
?locked:(E.locked () >>| function "" -> None | s -> Some s)
?no_depexts:(E.nodepexts ())
?depext_yes:(E.depextyes () ++
if OpamCoreConfig.(!r.answer) = `Unsafe_yes then
Some true else None)

let init ?noop:_ = initk (fun () -> ())

3 changes: 0 additions & 3 deletions src/state/opamStateConfig.mli
Original file line number Diff line number Diff line change
@@ -18,7 +18,6 @@ module E : sig
type OpamStd.Config.E.t +=
| BUILDDOC of bool option
| BUILDTEST of bool option
| DEPEXTYES of bool option
| DOWNLOADJOBS of int option
| DRYRUN of bool option
| IGNORECONSTRAINTS of string option
@@ -51,7 +50,6 @@ type t = private {
no_env_notice: bool;
locked: string option;
no_depexts : bool;
depext_yes: bool;
}

type 'a options_fun =
@@ -69,7 +67,6 @@ type 'a options_fun =
?no_env_notice:bool ->
?locked:string option ->
?no_depexts: bool ->
?depext_yes: bool ->
'a

include OpamStd.Config.Sig
2 changes: 1 addition & 1 deletion src/state/opamSysInteract.ml
Original file line number Diff line number Diff line change
@@ -519,7 +519,7 @@ let packages_status packages =

let install_packages_commands_t sys_packages =
let yes ?(no=[]) yes r =
if OpamStateConfig.(!r.depext_yes) then
if OpamCoreConfig.(!r.answer) = `unsafe_yes then
yes @ r else no @ r
in
let packages =