From ad4578db29cc4bccff0ef48b49adaf2edd2c6cab Mon Sep 17 00:00:00 2001 From: Raja Boujbel Date: Mon, 17 Feb 2025 17:17:59 +0100 Subject: [PATCH 1/7] reftest: set some version in opam root version --- tests/reftests/opamroot-versions.test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/reftests/opamroot-versions.test b/tests/reftests/opamroot-versions.test index 059becf1a75..4481e6c3009 100644 --- a/tests/reftests/opamroot-versions.test +++ b/tests/reftests/opamroot-versions.test @@ -3213,7 +3213,7 @@ i-am-package 2 One-line description i-am-sys-compiler 2 One-line description ### rm -rf _opam ### :V:8:a: From 2.2 root, global -### ocaml generate.ml $OPAMROOTVERSION +### ocaml generate.ml 2.2 ### # ro global state ### opam option jobs GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM @@ -3287,7 +3287,7 @@ installed: ["i-am-another-package.2" "i-am-compiler.2" "i-am-package.2"] opam-version: "2.0" roots: ["i-am-another-package.2" "i-am-compiler.2" "i-am-package.2"] ### :V:8:b: From 2.2 root, local -### ocaml generate.ml $OPAMROOTVERSION local +### ocaml generate.ml 2.2 local ### opam list | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM @@ -3348,7 +3348,7 @@ installed: ["i-am-package.2" "i-am-sys-compiler.2"] opam-version: "2.0" roots: ["i-am-package.2" "i-am-sys-compiler.2"] ### :V:8:c: From 2.2 root, local unknown from config -### ocaml generate.ml $OPAMROOTVERSION local +### ocaml generate.ml 2.2 local ### opam list | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM @@ -3408,7 +3408,7 @@ installed: ["i-am-package.2" "i-am-sys-compiler.2"] opam-version: "2.0" roots: ["i-am-package.2" "i-am-sys-compiler.2"] ### :V:8:d: Upgraded root and local 2.2 switch not recorded -### ocaml generate.ml $OPAMROOTVERSION orphaned 2.2 +### ocaml generate.ml 2.2 orphaned 2.2 ### # ro global state, ro repo state, ro switch state ### opam list GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM From 4900a203ff475bd7bfe6f43b1ea60475573227c0 Mon Sep 17 00:00:00 2001 From: Raja Boujbel Date: Wed, 12 Mar 2025 17:47:56 +0100 Subject: [PATCH 2/7] format upgrade: add a note about trying to no more update hard upgrade version --- src/state/opamFormatUpgrade.ml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/state/opamFormatUpgrade.ml b/src/state/opamFormatUpgrade.ml index f488f661fb9..fa22563e4f4 100644 --- a/src/state/opamFormatUpgrade.ml +++ b/src/state/opamFormatUpgrade.ml @@ -1150,12 +1150,26 @@ let from_2_2_beta_to_2_2 ~on_the_fly:_ _ conf = conf, gtc_none (* To add an upgrade layer * If it is a light upgrade, returns as second element if the repo or switch need an light upgrade with `gtc_*` values. - * If it is an hard upgrade, performs repo & switch upgrade in upgrade - function. + * [Should not happen] If it is an hard upgrade, performs repo & switch + upgrade in upgrade function. *) let latest_version = OpamFile.Config.root_version +(* Development notes: + opam differentiates two kinds of format upgrade - "Hard" upgrades, which + must be written straight to disk, and "Light" upgrades, which can be + performed in-memory, and don't have to be written immediately. + This distinction was added in opam 2.1, as it allows users of a _newer_ + version of opam-state to _read_ an opam root which is still being maintained + by an _older_ version of opam (for example, it allows a program compiled with + opam-state 2.1.0 to load the global configuration of an opam 2.0 user's root + without forcing the upgrade of that root to 2.1). + + Essentially, a "Hard" upgrade is used where the change is difficult (or even + impossible) to perform in-memory. We try our hardest to keep all format + upgrades "Light" - i.e. the aim is that this version below should never + change. *) let latest_hard_upgrade = (* to *) v2_0_beta5 (* intermediate roots that need a hard upgrade when upgrading from them *) From 026d4629149a8422fb66afd79eaf83a903ba7b1f Mon Sep 17 00:00:00 2001 From: Raja Boujbel Date: Wed, 12 Mar 2025 17:50:24 +0100 Subject: [PATCH 3/7] format upgrade: externalise hard and light upgrade definition as they are needed from repo/switch driven upgrades --- src/state/opamFormatUpgrade.ml | 74 +++++++++++++++++----------------- 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/src/state/opamFormatUpgrade.ml b/src/state/opamFormatUpgrade.ml index fa22563e4f4..bfe4db3f044 100644 --- a/src/state/opamFormatUpgrade.ml +++ b/src/state/opamFormatUpgrade.ml @@ -1210,6 +1210,43 @@ let flock_root = OpamConsole.error_and_exit `Locked "Could not acquire lock for performing format upgrade." +(* returns hard upgrades * light upgrades lists *) +let upgrades root_version = + let is_2_1_intermediate_root = + List.exists (OpamVersion.equal root_version) v2_1_intermediate_roots + in + let latest_hard_upgrade = + if is_2_1_intermediate_root then v2_1_rc else latest_hard_upgrade + in + (if is_2_1_intermediate_root then [ + v2_1_alpha, from_2_0_to_2_1_alpha; + v2_1_alpha2, from_2_1_alpha_to_2_1_alpha2; + v2_1_rc, from_2_1_alpha2_to_2_1_rc; + v2_1, from_2_1_rc_to_2_1; + ] else [ + v1_1, from_1_0_to_1_1; + v1_2, from_1_1_to_1_2; + v1_3_dev2, from_1_2_to_1_3_dev2; + v1_3_dev5, from_1_3_dev2_to_1_3_dev5; + v1_3_dev6, from_1_3_dev5_to_1_3_dev6; + v1_3_dev7, from_1_3_dev6_to_1_3_dev7; + v2_0_alpha, from_1_3_dev7_to_2_0_alpha; + v2_0_alpha2, from_2_0_alpha_to_2_0_alpha2; + v2_0_alpha3, from_2_0_alpha2_to_2_0_alpha3; + v2_0_beta, from_2_0_alpha3_to_2_0_beta; + v2_0_beta5, from_2_0_beta_to_2_0_beta5; + v2_0, from_2_0_beta5_to_2_0; + v2_1, from_2_0_to_2_1; + ]) @ [ + v2_2_alpha, from_2_1_to_2_2_alpha; + v2_2_beta, from_2_2_alpha_to_2_2_beta; + v2_2, from_2_2_beta_to_2_2; + ] + |> List.filter (fun (v,_) -> + OpamVersion.compare root_version v < 0) + |> List.partition (fun (v,_) -> + OpamVersion.compare v latest_hard_upgrade <= 0) + let as_necessary ?reinit requested_lock global_lock root config = let root_version = match OpamFile.Config.opam_root_version_opt config with @@ -1228,42 +1265,7 @@ let as_necessary ?reinit requested_lock global_lock root config = in let cmp = OpamVersion.(compare OpamFile.Config.root_version root_version) in if cmp <= 0 then config, gtc_none (* newer or same *) else - let hard_upg, light_upg = - let is_2_1_intermediate_root = - List.exists (OpamVersion.equal root_version) v2_1_intermediate_roots - in - let latest_hard_upgrade = - if is_2_1_intermediate_root then v2_1_rc else latest_hard_upgrade - in - (if is_2_1_intermediate_root then [ - v2_1_alpha, from_2_0_to_2_1_alpha; - v2_1_alpha2, from_2_1_alpha_to_2_1_alpha2; - v2_1_rc, from_2_1_alpha2_to_2_1_rc; - v2_1, from_2_1_rc_to_2_1; - ] else [ - v1_1, from_1_0_to_1_1; - v1_2, from_1_1_to_1_2; - v1_3_dev2, from_1_2_to_1_3_dev2; - v1_3_dev5, from_1_3_dev2_to_1_3_dev5; - v1_3_dev6, from_1_3_dev5_to_1_3_dev6; - v1_3_dev7, from_1_3_dev6_to_1_3_dev7; - v2_0_alpha, from_1_3_dev7_to_2_0_alpha; - v2_0_alpha2, from_2_0_alpha_to_2_0_alpha2; - v2_0_alpha3, from_2_0_alpha2_to_2_0_alpha3; - v2_0_beta, from_2_0_alpha3_to_2_0_beta; - v2_0_beta5, from_2_0_beta_to_2_0_beta5; - v2_0, from_2_0_beta5_to_2_0; - v2_1, from_2_0_to_2_1; - ]) @ [ - v2_2_alpha, from_2_1_to_2_2_alpha; - v2_2_beta, from_2_2_alpha_to_2_2_beta; - v2_2, from_2_2_beta_to_2_2; - ] - |> List.filter (fun (v,_) -> - OpamVersion.compare root_version v < 0) - |> List.partition (fun (v,_) -> - OpamVersion.compare v latest_hard_upgrade <= 0) - in + let hard_upg, light_upg = upgrades root_version in let need_hard_upg = hard_upg <> [] in let on_the_fly, global_lock_kind = if not need_hard_upg && requested_lock <> `Lock_write then From ca2e4a4cd13cbbd68055af37c88e70cda5176fd3 Mon Sep 17 00:00:00 2001 From: Raja Boujbel Date: Fri, 18 Apr 2025 18:34:50 +0200 Subject: [PATCH 4/7] format upgrade: externalise root version computation --- src/state/opamFormatUpgrade.ml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/state/opamFormatUpgrade.ml b/src/state/opamFormatUpgrade.ml index bfe4db3f044..521ba3e5e47 100644 --- a/src/state/opamFormatUpgrade.ml +++ b/src/state/opamFormatUpgrade.ml @@ -1247,13 +1247,14 @@ let upgrades root_version = |> List.partition (fun (v,_) -> OpamVersion.compare v latest_hard_upgrade <= 0) -let as_necessary ?reinit requested_lock global_lock root config = - let root_version = - match OpamFile.Config.opam_root_version_opt config with - | Some v -> v - | None -> - let v = OpamFile.Config.opam_version config in - if OpamVersion.compare v v2_0 <> 0 then v else +let default_opam_root_version = v2_1_alpha + +let get_root_version root config = + match OpamFile.Config.opam_root_version_opt config with + | Some v -> v + | None -> + let v = OpamFile.Config.opam_version config in + if OpamVersion.compare v v2_0 <> 0 then v else try List.iter (fun switch -> ignore @@ @@ -1261,8 +1262,11 @@ let as_necessary ?reinit requested_lock global_lock root config = (OpamPath.Switch.switch_config root switch)) (OpamFile.Config.installed_switches config); v - with Sys_error _ | OpamPp.Bad_version _ -> v2_1_alpha - in + with Sys_error _ | OpamPp.Bad_version _ -> + default_opam_root_version + +let as_necessary ?reinit requested_lock global_lock root config = + let root_version = get_root_version root config in let cmp = OpamVersion.(compare OpamFile.Config.root_version root_version) in if cmp <= 0 then config, gtc_none (* newer or same *) else let hard_upg, light_upg = upgrades root_version in From 65b69cd91bc9974cdc6a53831abe90fc23d2a33f Mon Sep 17 00:00:00 2001 From: Raja Boujbel Date: Wed, 12 Mar 2025 17:59:14 +0100 Subject: [PATCH 5/7] format upgrade: add mechanism to upgrade on the fly and with writing from repo or switch change --- master_changes.md | 1 + src/state/opamFormatUpgrade.ml | 119 +++++++++++++++++++++++-------- src/state/opamFormatUpgrade.mli | 27 ++++--- src/state/opamRepositoryState.ml | 7 +- src/state/opamSwitchState.ml | 7 +- 5 files changed, 116 insertions(+), 45 deletions(-) diff --git a/master_changes.md b/master_changes.md index 7b343ca5ecf..76e5d2e6872 100644 --- a/master_changes.md +++ b/master_changes.md @@ -65,6 +65,7 @@ users) ## External dependencies ## Format upgrade + * Complete upgrade mechanism to permit on the fly upgrade and write upgrade from repo and switch level [#6416 @rjbou] ## Sandbox diff --git a/src/state/opamFormatUpgrade.ml b/src/state/opamFormatUpgrade.ml index 521ba3e5e47..5917f5dd028 100644 --- a/src/state/opamFormatUpgrade.ml +++ b/src/state/opamFormatUpgrade.ml @@ -1367,38 +1367,97 @@ let as_necessary ?reinit requested_lock global_lock root config = log "Format upgrade done"; config, changes) -let as_necessary_repo_switch_light_upgrade lock_kind kind gt = - let { gtc_repo; gtc_switch } = gt.global_state_to_upgrade in - (* No upgrade to do *) - if not gtc_repo && not gtc_switch then () else +let as_necessary_repo_switch_t updates read_f lock_kind gt = + let root = gt.root in + let config = gt.config in let config_f = OpamPath.config gt.root in - let written_root_version = OpamFile.Config.raw_root_version config_f in + let written_config = OpamFile.Config.BestEffort.read_opt config_f in + (* If we don't have a written opam root version in a config file, + we are unable to determine if there is an upgrade to do. This can happen in + case there is only on the fly upgrades from 2.0. Should we fail ? *) + let written_root_version = + OpamStd.Option.map_default + (get_root_version root) default_opam_root_version + written_config + in (* Config already upgraded *) - if OpamStd.Option.equal OpamVersion.equal - written_root_version - (Some OpamFile.Config.root_version) then () else - match lock_kind, kind with - (* ro repo & rw switch & only repo changes case *) - | `Lock_write, `Switch when not gtc_switch && gtc_repo -> () - | `Lock_write, _ -> - let is_dev = OpamVersion.is_dev_version () in - OpamConsole.errmsg "%s" @@ - OpamStd.Format.reformat @@ - Printf.sprintf - "This %sversion of opam requires an update to the layout of %s \ - from version %s to version %s, which can't be reverted.\n\ - You may want to back it up before going further.\n" - (if is_dev then "development " else "") - (OpamFilename.Dir.to_string gt.root) - OpamStd.Option.Op.((written_root_version >>| OpamVersion.to_string) +! "2.0") - (OpamVersion.to_string (OpamFile.Config.opam_root_version gt.config)); - if OpamConsole.confirm "Continue?" then - flock_root `Lock_write gt.root @@ fun _ -> - OpamFile.Config.write config_f gt.config; - erase_plugin_links gt.root - else - OpamStd.Sys.exit_because `Aborted - | _, _ -> () + if OpamVersion.equal OpamFile.Config.root_version written_root_version then + None + else + let updates = + List.filter (fun (v,_) -> + OpamVersion.compare written_root_version v < 0) + updates + in + match lock_kind with + | `Lock_none | `Lock_read -> + (* apply repo or state config updates *) + List.fold_left (fun rs_config (_v,from) -> + from ?config:rs_config root config) + None updates + | `Lock_write -> + (* If a write lock is required, we need to run through the upgrade + mechanism from the beginning to enforce a write at each step if + needed *) + let is_dev = OpamVersion.is_dev_version () in + OpamConsole.errmsg "%s" @@ + OpamStd.Format.reformat @@ + Printf.sprintf + "This %sversion of opam requires an update to the layout of %s \ + from version %s to version %s, which can't be reverted.\n\ + You may want to back it up before going further.\n" + (if is_dev then "development " else "") + (OpamFilename.Dir.to_string gt.root) + (OpamVersion.to_string written_root_version) + (OpamVersion.to_string (OpamFile.Config.opam_root_version config)); + if OpamConsole.confirm "Continue?" then + flock_root `Lock_write root @@ fun _ -> + (* we keep only light upgrades as hard upgrade is already handled by + global state loading, so we must not have to handle hard upgrades + as this point. *) + let _, upgrades = upgrades written_root_version in + let config = + OpamStd.Option.default config + (OpamFile.Config.BestEffort.read_opt config_f) + in + let config = + List.fold_left (fun config (v, from) -> + let config, _change = from ~on_the_fly:false root config in + config |> OpamFile.Config.with_opam_root_version v) + config upgrades + in + OpamFile.Config.write (OpamPath.config root) config; + erase_plugin_links root; + read_f root + else + OpamStd.Sys.exit_because `Aborted + +let as_necessary_repo lock_kind gt = + (* No upgrade to do *) + if not gt.global_state_to_upgrade.gtc_repo then None else + let updates = [ + ] in + as_necessary_repo_switch_t + updates + (fun root -> + OpamFile.Repos_config.read_opt (OpamPath.repos_config root)) + lock_kind + gt + +let as_necessary_switch lock_kind switch gt = + (* No upgrade to do *) + if not gt.global_state_to_upgrade.gtc_switch then None else + let updates = [ + ] |> List.map (fun (v,f) -> + v, fun ?config root conf -> f ?config switch root conf) + in + as_necessary_repo_switch_t + updates + (fun root -> + OpamFile.Switch_config.read_opt + (OpamPath.Switch.switch_config root switch)) + lock_kind + gt let hard_upgrade_from_2_1_intermediates ?reinit ?global_lock root = let config_f = OpamPath.config root in diff --git a/src/state/opamFormatUpgrade.mli b/src/state/opamFormatUpgrade.mli index 05e469e589f..d2fe52516f3 100644 --- a/src/state/opamFormatUpgrade.mli +++ b/src/state/opamFormatUpgrade.mli @@ -38,17 +38,22 @@ val as_necessary: OpamFile.Config.t -> OpamFile.Config.t * gt_changes -(* [as_necessary_repo_switch_light_upgrade lock kind gt] write upgraded global - config file with the root bump if an on-the-fly upgrade of global state - was performed there is remaining upgrade on repository or switch layers, and - there is a write lock required. It only writes global config file, repo & - switch config are written when needed during opam operations. [lock] is the - current global lock, [kind] is [`Repo | `Switch], from where the function is - called (repo or switch state load), [gt] the on-the-fly upgraded global - state. - *) -val as_necessary_repo_switch_light_upgrade: - 'a lock -> [`Repo | `Switch] -> 'b global_state -> unit +(* [as_necessary_repo lock gt] does the upgrades at repo level. [lock] is the + required lock for repo state and gt the on-the-fly upgraded global lock. If + [lock] is none or read, it will perform an on-the-fly upgrade of repos-config + and return it. if [lock] is a write lock, it locks opam root and perform and + apply all needed upgrades (write global, repo & state config if needed). + At global state loading, [as_necessary] is called, so this function will do + the upgrades only if there is a known on-the-fly upgrade done by + [as_necessary]. Otherwise, it is an no-op and returns None. *) +val as_necessary_repo: + 'a lock -> 'b global_state -> OpamFile.Repos_config.t option + +(* As [as_necessay_repo] but acts on a given [switch]. In case of write [lock] + and upgrade that need to be done, it applies modification to all switches + (as well as global and repo config). *) +val as_necessary_switch: + 'a lock -> switch -> 'b global_state -> OpamFile.Switch_config.t option (* Try to launch a hard upgrade from 2;1 alpha's & beta's root to 2.1~rc one. Raises [Upgrade_done] (catched by main diff --git a/src/state/opamRepositoryState.ml b/src/state/opamRepositoryState.ml index ce1fb2dd140..f7cbff7ac88 100644 --- a/src/state/opamRepositoryState.ml +++ b/src/state/opamRepositoryState.ml @@ -155,10 +155,13 @@ let get_repo_root rt repo = get_root_raw rt.repos_global.root rt.repos_tmp repo.repo_name let load lock_kind gt = - OpamFormatUpgrade.as_necessary_repo_switch_light_upgrade lock_kind `Repo gt; log "LOAD-REPOSITORY-STATE %@ %a" (slog OpamFilename.Dir.to_string) gt.root; let lock = OpamFilename.flock lock_kind (OpamPath.repos_lock gt.root) in - let repos_map = OpamStateConfig.Repos.safe_read ~lock_kind gt in + let repos_map = + match OpamFormatUpgrade.as_necessary_repo lock_kind gt with + | Some repos_map -> repos_map + | None -> OpamStateConfig.Repos.safe_read ~lock_kind gt + in if OpamStateConfig.is_newer_than_self ~lock_kind gt then log "root version (%s) is greater than running binary's (%s); \ load with best-effort (read-only)" diff --git a/src/state/opamSwitchState.ml b/src/state/opamSwitchState.ml index 1665899e1ea..167011a82cc 100644 --- a/src/state/opamSwitchState.ml +++ b/src/state/opamSwitchState.ml @@ -233,7 +233,6 @@ let depexts_unavailable_raw sys_packages nv = | _ -> None let load lock_kind gt rt switch = - OpamFormatUpgrade.as_necessary_repo_switch_light_upgrade lock_kind `Switch gt; let chrono = OpamConsole.timer () in log "LOAD-SWITCH-STATE %@ %a" (slog OpamSwitch.to_string) switch; if not (OpamGlobalState.switch_exists gt switch) then @@ -259,7 +258,11 @@ let load lock_kind gt rt switch = let lock = OpamFilename.flock lock_kind (OpamPath.Switch.lock gt.root switch) in - let switch_config = load_switch_config ~lock_kind gt switch in + let switch_config = + match OpamFormatUpgrade.as_necessary_switch lock_kind switch gt with + | Some switch_config -> switch_config + | None -> load_switch_config ~lock_kind gt switch + in if OpamStateConfig.is_newer_than_self ~lock_kind gt then log "root version (%s) is greater than running binary's (%s); \ load with best-effort (read-only)" From 09eca33830ebeadb415474f2c1faf8fdf011c69a Mon Sep 17 00:00:00 2001 From: Raja Boujbel Date: Wed, 12 Mar 2025 18:02:17 +0100 Subject: [PATCH 6/7] test new upgrade mechanism --- src/state/opamFormatUpgrade.ml | 47 ++- tests/reftests/opamroot-versions.test | 440 +++++++++++++------------- 2 files changed, 266 insertions(+), 221 deletions(-) diff --git a/src/state/opamFormatUpgrade.ml b/src/state/opamFormatUpgrade.ml index 5917f5dd028..b9c180617ea 100644 --- a/src/state/opamFormatUpgrade.ml +++ b/src/state/opamFormatUpgrade.ml @@ -352,8 +352,8 @@ let opam_file_from_1_2_to_2_0 ?filename opam = (* Global state changes that need to be propagated *) let gtc_none = { gtc_repo = false; gtc_switch = false } -let _gtc_repo = { gtc_repo = true; gtc_switch = false } -let _gtc_switch = { gtc_repo = false; gtc_switch = true } +let gtc_repo = { gtc_repo = true; gtc_switch = false } +let gtc_switch = { gtc_repo = false; gtc_switch = true } let _gtc_both = { gtc_repo = true; gtc_switch = true } (* - Progressive version update functions - *) @@ -1121,7 +1121,18 @@ let from_2_1_to_2_2_alpha ~on_the_fly:_ _ conf = let v2_2_beta = OpamVersion.of_string "2.2~beta" -let from_2_2_alpha_to_2_2_beta ~on_the_fly _ conf = +let from_2_2_alpha_to_2_2_beta_repo ?config:_ root _conf = + let f = OpamPath.repos_config root in + let config = OpamFile.Repos_config.read f in + let config = + OpamRepositoryName.Map.add + (OpamRepositoryName.of_string "added-repo") + (OpamUrl.of_string "file://a/path", None) + config + in + Some config + +let from_2_2_alpha_to_2_2_beta ~on_the_fly root conf = (* In opam < 2.1 "jobs" was set during initialisation This creates problems when upgrading from opam 2.0 as it sets the job count for good even if the CPU is replaced. @@ -1141,11 +1152,35 @@ let from_2_2_alpha_to_2_2_beta ~on_the_fly _ conf = | Some prev_jobs when prev_jobs = max 1 (OpamSysPoll.cores () - 1) -> () | Some prev_jobs -> info_jobs_changed ~prev_jobs | None -> info_jobs_changed ~prev_jobs:1); - OpamFile.Config.with_jobs_opt None conf, gtc_none + if not on_the_fly then + (let f = OpamPath.repos_config root in + OpamStd.Option.iter (fun repos -> + OpamFile.Repos_config.write f repos) + (from_2_2_alpha_to_2_2_beta_repo root conf)); + OpamFile.Config.with_jobs_opt None conf, gtc_repo let v2_2 = OpamVersion.of_string "2.2" -let from_2_2_beta_to_2_2 ~on_the_fly:_ _ conf = conf, gtc_none +let from_2_2_beta_to_2_2_switch ?config:_ switch root _conf = + let f = OpamPath.Switch.switch_config root switch in + OpamStd.Option.map (fun config -> + let synopsis = + let syn = config.OpamFile.Switch_config.synopsis in + if String.equal "" syn then "I ADD SOMETHING" else + String.uppercase_ascii syn + in + {config with OpamFile.Switch_config.synopsis = synopsis}) + (OpamFile.Switch_config.read_opt f) + +let from_2_2_beta_to_2_2 ~on_the_fly root conf = + if not on_the_fly then + (List.iter (fun switch -> + let f = OpamPath.Switch.switch_config root switch in + OpamStd.Option.iter (fun sc -> + OpamFile.Switch_config.write f sc) + (from_2_2_beta_to_2_2_switch switch root conf)) + (OpamFile.Config.installed_switches conf)); + conf, gtc_switch (* To add an upgrade layer * If it is a light upgrade, returns as second element if the repo or switch @@ -1436,6 +1471,7 @@ let as_necessary_repo lock_kind gt = (* No upgrade to do *) if not gt.global_state_to_upgrade.gtc_repo then None else let updates = [ + v2_2_beta, from_2_2_alpha_to_2_2_beta_repo; ] in as_necessary_repo_switch_t updates @@ -1448,6 +1484,7 @@ let as_necessary_switch lock_kind switch gt = (* No upgrade to do *) if not gt.global_state_to_upgrade.gtc_switch then None else let updates = [ + v2_2, from_2_2_beta_to_2_2_switch; ] |> List.map (fun (v,f) -> v, fun ?config root conf -> f ?config switch root conf) in diff --git a/tests/reftests/opamroot-versions.test b/tests/reftests/opamroot-versions.test index 4481e6c3009..f3f6f653d08 100644 --- a/tests/reftests/opamroot-versions.test +++ b/tests/reftests/opamroot-versions.test @@ -698,6 +698,7 @@ FMT_UPG On-the-fly config upgrade, from 2.0 to current FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ sw-sys-comp STATE Inferred invariant: from base packages { i-am-sys-compiler.1 }, (roots { i-am-sys-compiler.1 }) => ["i-am-sys-compiler"] @@ -715,6 +716,11 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ sw-comp +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.0 to version 2.2, which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global STATE Definition missing for installed package i-am-compiler.2, copying from repo STATE Definition missing for installed package i-am-package.2, copying from repo STATE Inferred invariant: from base packages { i-am-compiler.2 }, (roots { i-am-compiler.2 }) => ["i-am-compiler" {>= "2"}] @@ -731,15 +737,6 @@ Done. ### # rw global state ### opam switch sw-comp | " ${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.0 tocurrent -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.0 to versioncurrent which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global -Format upgrade done. RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ sw-comp @@ -750,7 +747,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-comp" "sw-sys-comp" "default"] +installed-switches: ["sw-comp" "sw-sys-comp" "default" "this-internal-error"] opam-root-version: current opam-version: "2.0" repositories: "default" @@ -758,11 +755,11 @@ swh-fallback: false switch: "sw-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-config invariant: ["i-am-compiler" {>= "2"}] opam-version: "2.0" -synopsis: "switch with compiler" +synopsis: "SWITCH WITH COMPILER" paths { } variables { @@ -781,6 +778,7 @@ FMT_UPG On-the-fly config upgrade, from 2.0 to current FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Inferred invariant: from base packages { i-am-sys-compiler.2 }, (roots { i-am-sys-compiler.2 }) => ["i-am-sys-compiler"] @@ -797,6 +795,11 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.0 to version 2.2, which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global STATE Definition missing for installed package i-am-sys-compiler.2, copying from repo STATE Inferred invariant: from base packages { i-am-sys-compiler.2 }, (roots { i-am-sys-compiler.2 }) => ["i-am-sys-compiler"] STATE Switch state loaded in 0.000s @@ -812,15 +815,6 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.0 to current -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.0 to version current which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global -Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -828,7 +822,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -837,12 +831,12 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "local switch" +synopsis: "LOCAL SWITCH" paths { } variables { @@ -862,6 +856,7 @@ FMT_UPG On-the-fly config upgrade, from 2.0 to current FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Inferred invariant: from base packages { i-am-sys-compiler.2 }, (roots { i-am-sys-compiler.2 }) => ["i-am-sys-compiler"] @@ -877,6 +872,11 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.0 to version 2.2, which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global STATE Definition missing for installed package i-am-sys-compiler.2, copying from repo STATE Inferred invariant: from base packages { i-am-sys-compiler.2 }, (roots { i-am-sys-compiler.2 }) => ["i-am-sys-compiler"] STATE Switch state loaded in 0.000s @@ -892,15 +892,6 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.0 to current -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.0 to version current which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global -Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -908,7 +899,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "default"] +installed-switches: ["sw-sys-comp" "sw-comp" "default" "this-internal-error"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -917,7 +908,7 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler"] opam-root: "${BASEDIR}/OPAM" @@ -1015,9 +1006,11 @@ Continue? [Y/n] y Format upgrade done. RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> +[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default ### opam switch --short GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM @@ -1070,9 +1063,11 @@ Format upgrade done. GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> +[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default Update done, please now retry your command. # Return code 10 # @@ -1129,11 +1124,11 @@ wrap-install-commands: ["%{hooks}%/sandbox.sh" "install"] {os = "linux" | os = " wrap-remove-commands: ["%{hooks}%/sandbox.sh" "remove"] {os = "linux" | os = "macos"} ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-config invariant: ["i-am-compiler"] opam-version: "2.0" -synopsis: "switch with compiler" +synopsis: "SWITCH WITH COMPILER" paths { } variables { @@ -1161,9 +1156,11 @@ Format upgrade done. GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> +[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default Update done, please now retry your command. # Return code 10 # @@ -1202,12 +1199,12 @@ wrap-install-commands: ["%{hooks}%/sandbox.sh" "install"] {os = "linux" | os = " wrap-remove-commands: ["%{hooks}%/sandbox.sh" "remove"] {os = "linux" | os = "macos"} ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "local switch" +synopsis: "LOCAL SWITCH" paths { } variables { @@ -1236,9 +1233,11 @@ Format upgrade done. GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> +[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default Update done, please now retry your command. # Return code 10 # @@ -1278,7 +1277,7 @@ wrap-install-commands: ["%{hooks}%/sandbox.sh" "install"] {os = "linux" | os = " wrap-remove-commands: ["%{hooks}%/sandbox.sh" "remove"] {os = "linux" | os = "macos"} ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" @@ -1378,9 +1377,11 @@ Format upgrade done. GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> +[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default Update done, please now retry your command. # Return code 10 # @@ -1438,9 +1439,11 @@ Format upgrade done. GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> +[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default Update done, please now retry your command. # Return code 10 # @@ -1497,11 +1500,11 @@ wrap-install-commands: ["%{hooks}%/sandbox.sh" "install"] {os = "linux" | os = " wrap-remove-commands: ["%{hooks}%/sandbox.sh" "remove"] {os = "linux" | os = "macos"} ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-config invariant: ["i-am-compiler"] opam-version: "2.0" -synopsis: "switch with compiler" +synopsis: "SWITCH WITH COMPILER" paths { } variables { @@ -1531,9 +1534,11 @@ Format upgrade done. GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> +[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default Update done, please now retry your command. # Return code 10 # @@ -1572,12 +1577,12 @@ wrap-install-commands: ["%{hooks}%/sandbox.sh" "install"] {os = "linux" | os = " wrap-remove-commands: ["%{hooks}%/sandbox.sh" "remove"] {os = "linux" | os = "macos"} ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "local switch" +synopsis: "LOCAL SWITCH" paths { } variables { @@ -1608,9 +1613,11 @@ Format upgrade done. GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> +[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default Update done, please now retry your command. # Return code 10 # @@ -1650,7 +1657,7 @@ wrap-install-commands: ["%{hooks}%/sandbox.sh" "install"] {os = "linux" | os = " wrap-remove-commands: ["%{hooks}%/sandbox.sh" "remove"] {os = "linux" | os = "macos"} ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" @@ -1751,9 +1758,11 @@ Format upgrade done. GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> +[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default Update done. ### opam switch --short @@ -1803,6 +1812,7 @@ FMT_UPG On-the-fly config upgrade, from 2.1~rc to curren FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ sw-sys-comp STATE Switch state loaded in 0.000s @@ -1819,6 +1829,11 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ sw-comp +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1~rc to version current which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -1832,15 +1847,6 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.1~rc to current -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1~rc to version current which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global -Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -1849,7 +1855,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "default"] +installed-switches: ["sw-sys-comp" "sw-comp" "default" "this-internal-error"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -1858,11 +1864,15 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-config invariant: ["i-am-compiler"] opam-version: "2.0" -synopsis: "switch with compiler" +synopsis: "SWITCH WITH COMPILER" +paths { +} +variables { +} ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-state compiler: ["i-am-compiler.2"] installed: ["i-am-another-package.2" "i-am-compiler.2" "i-am-package.2"] @@ -1876,6 +1886,7 @@ FMT_UPG On-the-fly config upgrade, from 2.1~rc to curren FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Switch state loaded in 0.000s @@ -1890,6 +1901,11 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1~rc to version current which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global STATE Definition missing for installed package i-am-sys-compiler.2, copying from repo STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} @@ -1904,15 +1920,6 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.1~rc to current -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1~rc to version current which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global -Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -1921,7 +1928,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -1930,12 +1937,16 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "local switch" +synopsis: "LOCAL SWITCH" +paths { +} +variables { +} ### opam-cat _opam/.opam-switch/switch-state compiler: ["i-am-sys-compiler.2"] installed: ["i-am-package.2" "i-am-sys-compiler.2"] @@ -1950,6 +1961,7 @@ FMT_UPG On-the-fly config upgrade, from 2.1~rc to curren FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Switch state loaded in 0.000s @@ -1964,6 +1976,11 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1~rc to version current which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global STATE Definition missing for installed package i-am-sys-compiler.2, copying from repo STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} @@ -1978,15 +1995,6 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.1~rc to current -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1~rc to version current which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global -Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -1995,7 +2003,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2004,12 +2012,16 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "local switch" +synopsis: "LOCAL SWITCH" +paths { +} +variables { +} ### opam-cat _opam/.opam-switch/switch-state compiler: ["i-am-sys-compiler.2"] installed: ["i-am-package.2" "i-am-sys-compiler.2"] @@ -2092,9 +2104,11 @@ Continue? [Y/n] y Format upgrade done. RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> +[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default ### opam switch --short GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM @@ -2143,6 +2157,7 @@ FMT_UPG On-the-fly config upgrade, from 2.1 to current FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ sw-sys-comp STATE Switch state loaded in 0.000s @@ -2159,6 +2174,11 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ sw-comp +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1 to version 2.2, which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -2172,8 +2192,6 @@ Done. ### # ro global state, rw repo state ### opam repo add root-config ./root-config | "${OPAMROOTVERSION}$" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -FMT_UPG On-the-fly config upgrade, from 2.1 to current -FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found [root-config] Initialised @@ -2183,15 +2201,6 @@ RSTATE Cache found ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.1 to current -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1 to version current which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global -Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2200,7 +2209,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "default"] +installed-switches: ["sw-sys-comp" "sw-comp" "default" "this-internal-error"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2209,11 +2218,15 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["default" {"file://${BASEDIR}/default"} "root-config" {"file://${BASEDIR}/root-config"}] +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"} "root-config" {"file://${BASEDIR}/root-config"}] ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-config invariant: ["i-am-compiler"] opam-version: "2.0" -synopsis: "switch with compiler" +synopsis: "SWITCH WITH COMPILER" +paths { +} +variables { +} ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-state compiler: ["i-am-compiler.2"] installed: ["i-am-another-package.2" "i-am-compiler.2" "i-am-package.2"] @@ -2227,6 +2240,7 @@ FMT_UPG On-the-fly config upgrade, from 2.1 to current FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Switch state loaded in 0.000s @@ -2240,6 +2254,11 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1 to version 2.2, which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global STATE Definition missing for installed package i-am-sys-compiler.2, copying from repo STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} @@ -2254,15 +2273,6 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.1 to current -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1 to version current which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global -Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2271,7 +2281,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2280,12 +2290,16 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "local switch" +synopsis: "LOCAL SWITCH" +paths { +} +variables { +} ### opam-cat _opam/.opam-switch/switch-state compiler: ["i-am-sys-compiler.2"] installed: ["i-am-package.2" "i-am-sys-compiler.2"] @@ -2300,6 +2314,7 @@ FMT_UPG On-the-fly config upgrade, from 2.1 to current FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Switch state loaded in 0.000s @@ -2314,6 +2329,11 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1 to version current which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -2327,15 +2347,6 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.1 to current -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1 to version current which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global -Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2344,7 +2355,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2353,12 +2364,16 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "local switch" +synopsis: "LOCAL SWITCH" +paths { +} +variables { +} ### opam-cat _opam/.opam-switch/switch-state compiler: ["i-am-sys-compiler.2"] installed: ["i-am-package.2" "i-am-sys-compiler.2"] @@ -2373,6 +2388,7 @@ FMT_UPG On-the-fly config upgrade, from 2.1 to current FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Switch state loaded in 0.000s @@ -2387,6 +2403,11 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1 to version 2.2, which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -2400,15 +2421,6 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.1 to current -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1 to version current which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global -Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2417,7 +2429,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "default"] +installed-switches: ["sw-sys-comp" "sw-comp" "default" "this-internal-error"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2426,7 +2438,7 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" @@ -2453,9 +2465,11 @@ Continue? [Y/n] y Format upgrade done. RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> +[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2504,6 +2518,7 @@ FMT_UPG On-the-fly config upgrade, from 2.2~alpha to cur FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ sw-sys-comp STATE Switch state loaded in 0.000s @@ -2520,6 +2535,11 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ sw-comp +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version 2.2, which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -2533,8 +2553,6 @@ Done. ### # ro global state, rw repo state ### opam repo add root-config ./root-config | "${OPAMROOTVERSION}$" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -FMT_UPG On-the-fly config upgrade, from 2.2~alpha to current -FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found [root-config] Initialised @@ -2544,15 +2562,6 @@ RSTATE Cache found ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.2~alpha to current -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version current which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global -Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2562,7 +2571,7 @@ depext-cannot-install: false depext-run-installs: true download-jobs: 1 eval-variables: [sys-comp-version ["sh" "-c" "echo $OPAMSYSCOMP"] "comp version"] -installed-switches: ["sw-sys-comp" "sw-comp" "default"] +installed-switches: ["sw-sys-comp" "sw-comp" "default" "this-internal-error"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2571,11 +2580,15 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["default" {"file://${BASEDIR}/default"} "root-config" {"file://${BASEDIR}/root-config"}] +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"} "root-config" {"file://${BASEDIR}/root-config"}] ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-config invariant: ["i-am-compiler"] opam-version: "2.0" -synopsis: "switch with compiler" +synopsis: "SWITCH WITH COMPILER" +paths { +} +variables { +} ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-state compiler: ["i-am-compiler.2"] installed: ["i-am-another-package.2" "i-am-compiler.2" "i-am-package.2"] @@ -2589,6 +2602,7 @@ FMT_UPG On-the-fly config upgrade, from 2.2~alpha to cur FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Switch state loaded in 0.000s @@ -2603,6 +2617,11 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version 2.2, which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global STATE Definition missing for installed package i-am-sys-compiler.2, copying from repo STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} @@ -2617,15 +2636,6 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.2~alpha to current -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version current which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global -Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2635,7 +2645,7 @@ depext-cannot-install: false depext-run-installs: true download-jobs: 1 eval-variables: [sys-comp-version ["sh" "-c" "echo $OPAMSYSCOMP"] "comp version"] -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2644,12 +2654,16 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "local switch" +synopsis: "LOCAL SWITCH" +paths { +} +variables { +} ### opam-cat _opam/.opam-switch/switch-state compiler: ["i-am-sys-compiler.2"] installed: ["i-am-package.2" "i-am-sys-compiler.2"] @@ -2663,6 +2677,7 @@ FMT_UPG On-the-fly config upgrade, from 2.2~alpha to cur FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Switch state loaded in 0.000s @@ -2677,6 +2692,11 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version current which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -2690,15 +2710,6 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.2~alpha to current -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version current which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global -Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2708,7 +2719,7 @@ depext-cannot-install: false depext-run-installs: true download-jobs: 1 eval-variables: [sys-comp-version ["sh" "-c" "echo $OPAMSYSCOMP"] "comp version"] -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2717,12 +2728,16 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "local switch" +synopsis: "LOCAL SWITCH" +paths { +} +variables { +} ### opam-cat _opam/.opam-switch/switch-state compiler: ["i-am-sys-compiler.2"] installed: ["i-am-package.2" "i-am-sys-compiler.2"] @@ -2737,6 +2752,7 @@ FMT_UPG On-the-fly config upgrade, from 2.2~alpha to cur FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Switch state loaded in 0.000s @@ -2751,6 +2767,11 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version 2.2, which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -2764,15 +2785,6 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.2~alpha to current -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version current which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global -Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2782,7 +2794,7 @@ depext-cannot-install: false depext-run-installs: true download-jobs: 1 eval-variables: [sys-comp-version ["sh" "-c" "echo $OPAMSYSCOMP"] "comp version"] -installed-switches: ["sw-sys-comp" "sw-comp" "default"] +installed-switches: ["sw-sys-comp" "sw-comp" "default" "this-internal-error"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2791,7 +2803,7 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: "default" {"file://${BASEDIR}/default"} +repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" @@ -2818,9 +2830,11 @@ Continue? [Y/n] y Format upgrade done. RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found +RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> +[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2886,6 +2900,9 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ sw-comp +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~beta to version 2.2, which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -2899,8 +2916,6 @@ Done. ### # ro global state, rw repo state ### opam repo add root-config ./root-config | "${OPAMROOTVERSION}$" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -FMT_UPG On-the-fly config upgrade, from 2.2~beta to current -FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found [root-config] Initialised @@ -2910,13 +2925,6 @@ RSTATE Cache found ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}$" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.2~beta to current -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~beta to version 2.2, which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2926,7 +2934,7 @@ depext-cannot-install: false depext-run-installs: true download-jobs: 1 eval-variables: [sys-comp-version ["sh" "-c" "echo $OPAMSYSCOMP"] "comp version"] -installed-switches: ["sw-sys-comp" "sw-comp" "default"] +installed-switches: ["sw-sys-comp" "sw-comp" "default" "this-internal-error"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2939,7 +2947,11 @@ repositories: ["default" {"file://${BASEDIR}/default"} "root-config" {"file://${ ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-config invariant: ["i-am-compiler"] opam-version: "2.0" -synopsis: "switch with compiler" +synopsis: "SWITCH WITH COMPILER" +paths { +} +variables { +} ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-state compiler: ["i-am-compiler.2"] installed: ["i-am-another-package.2" "i-am-compiler.2" "i-am-package.2"] @@ -2967,6 +2979,9 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~beta to version 2.2, which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y STATE Definition missing for installed package i-am-sys-compiler.2, copying from repo STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} @@ -2981,13 +2996,6 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}$" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.2~beta to current -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~beta to version 2.2, which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2997,7 +3005,7 @@ depext-cannot-install: false depext-run-installs: true download-jobs: 1 eval-variables: [sys-comp-version ["sh" "-c" "echo $OPAMSYSCOMP"] "comp version"] -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -3011,7 +3019,11 @@ repositories: "default" {"file://${BASEDIR}/default"} invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "local switch" +synopsis: "LOCAL SWITCH" +paths { +} +variables { +} ### opam-cat _opam/.opam-switch/switch-state compiler: ["i-am-sys-compiler.2"] installed: ["i-am-package.2" "i-am-sys-compiler.2"] @@ -3039,6 +3051,9 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~beta to version current which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -3052,13 +3067,6 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}$" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.2~beta to current -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~beta to version 2.2, which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -3068,7 +3076,7 @@ depext-cannot-install: false depext-run-installs: true download-jobs: 1 eval-variables: [sys-comp-version ["sh" "-c" "echo $OPAMSYSCOMP"] "comp version"] -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -3082,7 +3090,11 @@ repositories: "default" {"file://${BASEDIR}/default"} invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "local switch" +synopsis: "LOCAL SWITCH" +paths { +} +variables { +} ### opam-cat _opam/.opam-switch/switch-state compiler: ["i-am-sys-compiler.2"] installed: ["i-am-package.2" "i-am-sys-compiler.2"] @@ -3111,6 +3123,9 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~beta to version 2.2, which can't be reverted. +You may want to back it up before going further. +Continue? [Y/n] y STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -3124,13 +3139,6 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}$" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -[WARNING] Removing global switch 'this-internal-error' as it no longer exists -FMT_UPG Light config upgrade, from 2.2~beta to current -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~beta to version 2.2, which can't be reverted. -You may want to back it up before going further. - -Continue? [Y/n] y -Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -3140,7 +3148,7 @@ depext-cannot-install: false depext-run-installs: true download-jobs: 1 eval-variables: [sys-comp-version ["sh" "-c" "echo $OPAMSYSCOMP"] "comp version"] -installed-switches: ["sw-sys-comp" "sw-comp" "default"] +installed-switches: ["sw-sys-comp" "sw-comp" "default" "this-internal-error"] jobs: 4 opam-root-version: current opam-version: "2.0" From 645a39475c8a3bbc298c3ffcac245c3f5cbd8b36 Mon Sep 17 00:00:00 2001 From: Raja Boujbel Date: Fri, 18 Apr 2025 18:55:55 +0200 Subject: [PATCH 7/7] Revert "test new upgrade mechanism" This reverts commit edf052aea05e235c843c33aee7504176b946c1ba. --- src/state/opamFormatUpgrade.ml | 47 +-- tests/reftests/opamroot-versions.test | 440 +++++++++++++------------- 2 files changed, 221 insertions(+), 266 deletions(-) diff --git a/src/state/opamFormatUpgrade.ml b/src/state/opamFormatUpgrade.ml index b9c180617ea..5917f5dd028 100644 --- a/src/state/opamFormatUpgrade.ml +++ b/src/state/opamFormatUpgrade.ml @@ -352,8 +352,8 @@ let opam_file_from_1_2_to_2_0 ?filename opam = (* Global state changes that need to be propagated *) let gtc_none = { gtc_repo = false; gtc_switch = false } -let gtc_repo = { gtc_repo = true; gtc_switch = false } -let gtc_switch = { gtc_repo = false; gtc_switch = true } +let _gtc_repo = { gtc_repo = true; gtc_switch = false } +let _gtc_switch = { gtc_repo = false; gtc_switch = true } let _gtc_both = { gtc_repo = true; gtc_switch = true } (* - Progressive version update functions - *) @@ -1121,18 +1121,7 @@ let from_2_1_to_2_2_alpha ~on_the_fly:_ _ conf = let v2_2_beta = OpamVersion.of_string "2.2~beta" -let from_2_2_alpha_to_2_2_beta_repo ?config:_ root _conf = - let f = OpamPath.repos_config root in - let config = OpamFile.Repos_config.read f in - let config = - OpamRepositoryName.Map.add - (OpamRepositoryName.of_string "added-repo") - (OpamUrl.of_string "file://a/path", None) - config - in - Some config - -let from_2_2_alpha_to_2_2_beta ~on_the_fly root conf = +let from_2_2_alpha_to_2_2_beta ~on_the_fly _ conf = (* In opam < 2.1 "jobs" was set during initialisation This creates problems when upgrading from opam 2.0 as it sets the job count for good even if the CPU is replaced. @@ -1152,35 +1141,11 @@ let from_2_2_alpha_to_2_2_beta ~on_the_fly root conf = | Some prev_jobs when prev_jobs = max 1 (OpamSysPoll.cores () - 1) -> () | Some prev_jobs -> info_jobs_changed ~prev_jobs | None -> info_jobs_changed ~prev_jobs:1); - if not on_the_fly then - (let f = OpamPath.repos_config root in - OpamStd.Option.iter (fun repos -> - OpamFile.Repos_config.write f repos) - (from_2_2_alpha_to_2_2_beta_repo root conf)); - OpamFile.Config.with_jobs_opt None conf, gtc_repo + OpamFile.Config.with_jobs_opt None conf, gtc_none let v2_2 = OpamVersion.of_string "2.2" -let from_2_2_beta_to_2_2_switch ?config:_ switch root _conf = - let f = OpamPath.Switch.switch_config root switch in - OpamStd.Option.map (fun config -> - let synopsis = - let syn = config.OpamFile.Switch_config.synopsis in - if String.equal "" syn then "I ADD SOMETHING" else - String.uppercase_ascii syn - in - {config with OpamFile.Switch_config.synopsis = synopsis}) - (OpamFile.Switch_config.read_opt f) - -let from_2_2_beta_to_2_2 ~on_the_fly root conf = - if not on_the_fly then - (List.iter (fun switch -> - let f = OpamPath.Switch.switch_config root switch in - OpamStd.Option.iter (fun sc -> - OpamFile.Switch_config.write f sc) - (from_2_2_beta_to_2_2_switch switch root conf)) - (OpamFile.Config.installed_switches conf)); - conf, gtc_switch +let from_2_2_beta_to_2_2 ~on_the_fly:_ _ conf = conf, gtc_none (* To add an upgrade layer * If it is a light upgrade, returns as second element if the repo or switch @@ -1471,7 +1436,6 @@ let as_necessary_repo lock_kind gt = (* No upgrade to do *) if not gt.global_state_to_upgrade.gtc_repo then None else let updates = [ - v2_2_beta, from_2_2_alpha_to_2_2_beta_repo; ] in as_necessary_repo_switch_t updates @@ -1484,7 +1448,6 @@ let as_necessary_switch lock_kind switch gt = (* No upgrade to do *) if not gt.global_state_to_upgrade.gtc_switch then None else let updates = [ - v2_2, from_2_2_beta_to_2_2_switch; ] |> List.map (fun (v,f) -> v, fun ?config root conf -> f ?config switch root conf) in diff --git a/tests/reftests/opamroot-versions.test b/tests/reftests/opamroot-versions.test index f3f6f653d08..4481e6c3009 100644 --- a/tests/reftests/opamroot-versions.test +++ b/tests/reftests/opamroot-versions.test @@ -698,7 +698,6 @@ FMT_UPG On-the-fly config upgrade, from 2.0 to current FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ sw-sys-comp STATE Inferred invariant: from base packages { i-am-sys-compiler.1 }, (roots { i-am-sys-compiler.1 }) => ["i-am-sys-compiler"] @@ -716,11 +715,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ sw-comp -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.0 to version 2.2, which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global STATE Definition missing for installed package i-am-compiler.2, copying from repo STATE Definition missing for installed package i-am-package.2, copying from repo STATE Inferred invariant: from base packages { i-am-compiler.2 }, (roots { i-am-compiler.2 }) => ["i-am-compiler" {>= "2"}] @@ -737,6 +731,15 @@ Done. ### # rw global state ### opam switch sw-comp | " ${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.0 tocurrent +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.0 to versioncurrent which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global +Format upgrade done. RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ sw-comp @@ -747,7 +750,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-comp" "sw-sys-comp" "default" "this-internal-error"] +installed-switches: ["sw-comp" "sw-sys-comp" "default"] opam-root-version: current opam-version: "2.0" repositories: "default" @@ -755,11 +758,11 @@ swh-fallback: false switch: "sw-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-config invariant: ["i-am-compiler" {>= "2"}] opam-version: "2.0" -synopsis: "SWITCH WITH COMPILER" +synopsis: "switch with compiler" paths { } variables { @@ -778,7 +781,6 @@ FMT_UPG On-the-fly config upgrade, from 2.0 to current FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Inferred invariant: from base packages { i-am-sys-compiler.2 }, (roots { i-am-sys-compiler.2 }) => ["i-am-sys-compiler"] @@ -795,11 +797,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.0 to version 2.2, which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global STATE Definition missing for installed package i-am-sys-compiler.2, copying from repo STATE Inferred invariant: from base packages { i-am-sys-compiler.2 }, (roots { i-am-sys-compiler.2 }) => ["i-am-sys-compiler"] STATE Switch state loaded in 0.000s @@ -815,6 +812,15 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.0 to current +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.0 to version current which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global +Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -822,7 +828,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -831,12 +837,12 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "LOCAL SWITCH" +synopsis: "local switch" paths { } variables { @@ -856,7 +862,6 @@ FMT_UPG On-the-fly config upgrade, from 2.0 to current FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Inferred invariant: from base packages { i-am-sys-compiler.2 }, (roots { i-am-sys-compiler.2 }) => ["i-am-sys-compiler"] @@ -872,11 +877,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.0 to version 2.2, which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global STATE Definition missing for installed package i-am-sys-compiler.2, copying from repo STATE Inferred invariant: from base packages { i-am-sys-compiler.2 }, (roots { i-am-sys-compiler.2 }) => ["i-am-sys-compiler"] STATE Switch state loaded in 0.000s @@ -892,6 +892,15 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.0 to current +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.0 to version current which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global +Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -899,7 +908,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "default" "this-internal-error"] +installed-switches: ["sw-sys-comp" "sw-comp" "default"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -908,7 +917,7 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler"] opam-root: "${BASEDIR}/OPAM" @@ -1006,11 +1015,9 @@ Continue? [Y/n] y Format upgrade done. RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> -[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default ### opam switch --short GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM @@ -1063,11 +1070,9 @@ Format upgrade done. GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> -[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default Update done, please now retry your command. # Return code 10 # @@ -1124,11 +1129,11 @@ wrap-install-commands: ["%{hooks}%/sandbox.sh" "install"] {os = "linux" | os = " wrap-remove-commands: ["%{hooks}%/sandbox.sh" "remove"] {os = "linux" | os = "macos"} ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-config invariant: ["i-am-compiler"] opam-version: "2.0" -synopsis: "SWITCH WITH COMPILER" +synopsis: "switch with compiler" paths { } variables { @@ -1156,11 +1161,9 @@ Format upgrade done. GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> -[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default Update done, please now retry your command. # Return code 10 # @@ -1199,12 +1202,12 @@ wrap-install-commands: ["%{hooks}%/sandbox.sh" "install"] {os = "linux" | os = " wrap-remove-commands: ["%{hooks}%/sandbox.sh" "remove"] {os = "linux" | os = "macos"} ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "LOCAL SWITCH" +synopsis: "local switch" paths { } variables { @@ -1233,11 +1236,9 @@ Format upgrade done. GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> -[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default Update done, please now retry your command. # Return code 10 # @@ -1277,7 +1278,7 @@ wrap-install-commands: ["%{hooks}%/sandbox.sh" "install"] {os = "linux" | os = " wrap-remove-commands: ["%{hooks}%/sandbox.sh" "remove"] {os = "linux" | os = "macos"} ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" @@ -1377,11 +1378,9 @@ Format upgrade done. GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> -[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default Update done, please now retry your command. # Return code 10 # @@ -1439,11 +1438,9 @@ Format upgrade done. GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> -[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default Update done, please now retry your command. # Return code 10 # @@ -1500,11 +1497,11 @@ wrap-install-commands: ["%{hooks}%/sandbox.sh" "install"] {os = "linux" | os = " wrap-remove-commands: ["%{hooks}%/sandbox.sh" "remove"] {os = "linux" | os = "macos"} ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-config invariant: ["i-am-compiler"] opam-version: "2.0" -synopsis: "SWITCH WITH COMPILER" +synopsis: "switch with compiler" paths { } variables { @@ -1534,11 +1531,9 @@ Format upgrade done. GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> -[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default Update done, please now retry your command. # Return code 10 # @@ -1577,12 +1572,12 @@ wrap-install-commands: ["%{hooks}%/sandbox.sh" "install"] {os = "linux" | os = " wrap-remove-commands: ["%{hooks}%/sandbox.sh" "remove"] {os = "linux" | os = "macos"} ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "LOCAL SWITCH" +synopsis: "local switch" paths { } variables { @@ -1613,11 +1608,9 @@ Format upgrade done. GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> -[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default Update done, please now retry your command. # Return code 10 # @@ -1657,7 +1650,7 @@ wrap-install-commands: ["%{hooks}%/sandbox.sh" "install"] {os = "linux" | os = " wrap-remove-commands: ["%{hooks}%/sandbox.sh" "remove"] {os = "linux" | os = "macos"} ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" @@ -1758,11 +1751,9 @@ Format upgrade done. GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> -[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default Update done. ### opam switch --short @@ -1812,7 +1803,6 @@ FMT_UPG On-the-fly config upgrade, from 2.1~rc to curren FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ sw-sys-comp STATE Switch state loaded in 0.000s @@ -1829,11 +1819,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ sw-comp -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1~rc to version current which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -1847,6 +1832,15 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.1~rc to current +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1~rc to version current which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global +Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -1855,7 +1849,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "default" "this-internal-error"] +installed-switches: ["sw-sys-comp" "sw-comp" "default"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -1864,15 +1858,11 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-config invariant: ["i-am-compiler"] opam-version: "2.0" -synopsis: "SWITCH WITH COMPILER" -paths { -} -variables { -} +synopsis: "switch with compiler" ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-state compiler: ["i-am-compiler.2"] installed: ["i-am-another-package.2" "i-am-compiler.2" "i-am-package.2"] @@ -1886,7 +1876,6 @@ FMT_UPG On-the-fly config upgrade, from 2.1~rc to curren FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Switch state loaded in 0.000s @@ -1901,11 +1890,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1~rc to version current which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global STATE Definition missing for installed package i-am-sys-compiler.2, copying from repo STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} @@ -1920,6 +1904,15 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.1~rc to current +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1~rc to version current which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global +Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -1928,7 +1921,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -1937,16 +1930,12 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "LOCAL SWITCH" -paths { -} -variables { -} +synopsis: "local switch" ### opam-cat _opam/.opam-switch/switch-state compiler: ["i-am-sys-compiler.2"] installed: ["i-am-package.2" "i-am-sys-compiler.2"] @@ -1961,7 +1950,6 @@ FMT_UPG On-the-fly config upgrade, from 2.1~rc to curren FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Switch state loaded in 0.000s @@ -1976,11 +1964,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1~rc to version current which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global STATE Definition missing for installed package i-am-sys-compiler.2, copying from repo STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} @@ -1995,6 +1978,15 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.1~rc to current +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1~rc to version current which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global +Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2003,7 +1995,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2012,16 +2004,12 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "LOCAL SWITCH" -paths { -} -variables { -} +synopsis: "local switch" ### opam-cat _opam/.opam-switch/switch-state compiler: ["i-am-sys-compiler.2"] installed: ["i-am-package.2" "i-am-sys-compiler.2"] @@ -2104,11 +2092,9 @@ Continue? [Y/n] y Format upgrade done. RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> -[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default ### opam switch --short GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM @@ -2157,7 +2143,6 @@ FMT_UPG On-the-fly config upgrade, from 2.1 to current FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ sw-sys-comp STATE Switch state loaded in 0.000s @@ -2174,11 +2159,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ sw-comp -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1 to version 2.2, which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -2192,6 +2172,8 @@ Done. ### # ro global state, rw repo state ### opam repo add root-config ./root-config | "${OPAMROOTVERSION}$" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +FMT_UPG On-the-fly config upgrade, from 2.1 to current +FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found [root-config] Initialised @@ -2201,6 +2183,15 @@ RSTATE Cache found ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.1 to current +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1 to version current which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global +Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2209,7 +2200,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "default" "this-internal-error"] +installed-switches: ["sw-sys-comp" "sw-comp" "default"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2218,15 +2209,11 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"} "root-config" {"file://${BASEDIR}/root-config"}] +repositories: ["default" {"file://${BASEDIR}/default"} "root-config" {"file://${BASEDIR}/root-config"}] ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-config invariant: ["i-am-compiler"] opam-version: "2.0" -synopsis: "SWITCH WITH COMPILER" -paths { -} -variables { -} +synopsis: "switch with compiler" ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-state compiler: ["i-am-compiler.2"] installed: ["i-am-another-package.2" "i-am-compiler.2" "i-am-package.2"] @@ -2240,7 +2227,6 @@ FMT_UPG On-the-fly config upgrade, from 2.1 to current FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Switch state loaded in 0.000s @@ -2254,11 +2240,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1 to version 2.2, which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global STATE Definition missing for installed package i-am-sys-compiler.2, copying from repo STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} @@ -2273,6 +2254,15 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.1 to current +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1 to version current which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global +Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2281,7 +2271,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2290,16 +2280,12 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "LOCAL SWITCH" -paths { -} -variables { -} +synopsis: "local switch" ### opam-cat _opam/.opam-switch/switch-state compiler: ["i-am-sys-compiler.2"] installed: ["i-am-package.2" "i-am-sys-compiler.2"] @@ -2314,7 +2300,6 @@ FMT_UPG On-the-fly config upgrade, from 2.1 to current FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Switch state loaded in 0.000s @@ -2329,11 +2314,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1 to version current which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -2347,6 +2327,15 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.1 to current +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1 to version current which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global +Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2355,7 +2344,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2364,16 +2353,12 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "LOCAL SWITCH" -paths { -} -variables { -} +synopsis: "local switch" ### opam-cat _opam/.opam-switch/switch-state compiler: ["i-am-sys-compiler.2"] installed: ["i-am-package.2" "i-am-sys-compiler.2"] @@ -2388,7 +2373,6 @@ FMT_UPG On-the-fly config upgrade, from 2.1 to current FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Switch state loaded in 0.000s @@ -2403,11 +2387,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1 to version 2.2, which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -2421,6 +2400,15 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.1 to current +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.1 to version current which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global +Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2429,7 +2417,7 @@ depext: true depext-cannot-install: false depext-run-installs: true download-jobs: 1 -installed-switches: ["sw-sys-comp" "sw-comp" "default" "this-internal-error"] +installed-switches: ["sw-sys-comp" "sw-comp" "default"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2438,7 +2426,7 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" @@ -2465,11 +2453,9 @@ Continue? [Y/n] y Format upgrade done. RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> -[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables | grep -v eval-variables: default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2518,7 +2504,6 @@ FMT_UPG On-the-fly config upgrade, from 2.2~alpha to cur FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ sw-sys-comp STATE Switch state loaded in 0.000s @@ -2535,11 +2520,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ sw-comp -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version 2.2, which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -2553,6 +2533,8 @@ Done. ### # ro global state, rw repo state ### opam repo add root-config ./root-config | "${OPAMROOTVERSION}$" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +FMT_UPG On-the-fly config upgrade, from 2.2~alpha to current +FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found [root-config] Initialised @@ -2562,6 +2544,15 @@ RSTATE Cache found ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.2~alpha to current +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version current which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global +Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2571,7 +2562,7 @@ depext-cannot-install: false depext-run-installs: true download-jobs: 1 eval-variables: [sys-comp-version ["sh" "-c" "echo $OPAMSYSCOMP"] "comp version"] -installed-switches: ["sw-sys-comp" "sw-comp" "default" "this-internal-error"] +installed-switches: ["sw-sys-comp" "sw-comp" "default"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2580,15 +2571,11 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"} "root-config" {"file://${BASEDIR}/root-config"}] +repositories: ["default" {"file://${BASEDIR}/default"} "root-config" {"file://${BASEDIR}/root-config"}] ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-config invariant: ["i-am-compiler"] opam-version: "2.0" -synopsis: "SWITCH WITH COMPILER" -paths { -} -variables { -} +synopsis: "switch with compiler" ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-state compiler: ["i-am-compiler.2"] installed: ["i-am-another-package.2" "i-am-compiler.2" "i-am-package.2"] @@ -2602,7 +2589,6 @@ FMT_UPG On-the-fly config upgrade, from 2.2~alpha to cur FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Switch state loaded in 0.000s @@ -2617,11 +2603,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version 2.2, which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global STATE Definition missing for installed package i-am-sys-compiler.2, copying from repo STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} @@ -2636,6 +2617,15 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.2~alpha to current +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version current which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global +Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2645,7 +2635,7 @@ depext-cannot-install: false depext-run-installs: true download-jobs: 1 eval-variables: [sys-comp-version ["sh" "-c" "echo $OPAMSYSCOMP"] "comp version"] -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2654,16 +2644,12 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "LOCAL SWITCH" -paths { -} -variables { -} +synopsis: "local switch" ### opam-cat _opam/.opam-switch/switch-state compiler: ["i-am-sys-compiler.2"] installed: ["i-am-package.2" "i-am-sys-compiler.2"] @@ -2677,7 +2663,6 @@ FMT_UPG On-the-fly config upgrade, from 2.2~alpha to cur FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Switch state loaded in 0.000s @@ -2692,11 +2677,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version current which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -2710,6 +2690,15 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.2~alpha to current +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version current which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global +Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2719,7 +2708,7 @@ depext-cannot-install: false depext-run-installs: true download-jobs: 1 eval-variables: [sys-comp-version ["sh" "-c" "echo $OPAMSYSCOMP"] "comp version"] -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2728,16 +2717,12 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "LOCAL SWITCH" -paths { -} -variables { -} +synopsis: "local switch" ### opam-cat _opam/.opam-switch/switch-state compiler: ["i-am-sys-compiler.2"] installed: ["i-am-package.2" "i-am-sys-compiler.2"] @@ -2752,7 +2737,6 @@ FMT_UPG On-the-fly config upgrade, from 2.2~alpha to cur FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s STATE LOAD-SWITCH-STATE @ ${BASEDIR} STATE Switch state loaded in 0.000s @@ -2767,11 +2751,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version 2.2, which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y -[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: - opam option jobs=1 --global STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -2785,6 +2764,15 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.2~alpha to current +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version current which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: + opam option jobs=1 --global +Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2794,7 +2782,7 @@ depext-cannot-install: false depext-run-installs: true download-jobs: 1 eval-variables: [sys-comp-version ["sh" "-c" "echo $OPAMSYSCOMP"] "comp version"] -installed-switches: ["sw-sys-comp" "sw-comp" "default" "this-internal-error"] +installed-switches: ["sw-sys-comp" "sw-comp" "default"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2803,7 +2791,7 @@ swh-fallback: false switch: "sw-sys-comp" ### opam-cat $OPAMROOT/repo/repos-config opam-version: "2.0" -repositories: ["added-repo" {"file://a/path"} "default" {"file://${BASEDIR}/default"}] +repositories: "default" {"file://${BASEDIR}/default"} ### opam-cat _opam/.opam-switch/switch-config invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" @@ -2830,11 +2818,9 @@ Continue? [Y/n] y Format upgrade done. RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE No cache found -RSTATE loaded opam files from repo added-repo in 0.000s RSTATE loaded opam files from repo default in 0.000s <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> -[ERROR] Could not update repository "added-repo": rsync error: Directory a/path/ does not exist [default] no changes from file://${BASEDIR}/default ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2900,9 +2886,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ sw-comp -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~beta to version 2.2, which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -2916,6 +2899,8 @@ Done. ### # ro global state, rw repo state ### opam repo add root-config ./root-config | "${OPAMROOTVERSION}$" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +FMT_UPG On-the-fly config upgrade, from 2.2~beta to current +FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found [root-config] Initialised @@ -2925,6 +2910,13 @@ RSTATE Cache found ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}$" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.2~beta to current +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~beta to version 2.2, which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -2934,7 +2926,7 @@ depext-cannot-install: false depext-run-installs: true download-jobs: 1 eval-variables: [sys-comp-version ["sh" "-c" "echo $OPAMSYSCOMP"] "comp version"] -installed-switches: ["sw-sys-comp" "sw-comp" "default" "this-internal-error"] +installed-switches: ["sw-sys-comp" "sw-comp" "default"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -2947,11 +2939,7 @@ repositories: ["default" {"file://${BASEDIR}/default"} "root-config" {"file://${ ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-config invariant: ["i-am-compiler"] opam-version: "2.0" -synopsis: "SWITCH WITH COMPILER" -paths { -} -variables { -} +synopsis: "switch with compiler" ### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-state compiler: ["i-am-compiler.2"] installed: ["i-am-another-package.2" "i-am-compiler.2" "i-am-package.2"] @@ -2979,9 +2967,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~beta to version 2.2, which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y STATE Definition missing for installed package i-am-sys-compiler.2, copying from repo STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} @@ -2996,6 +2981,13 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}$" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.2~beta to current +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~beta to version 2.2, which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -3005,7 +2997,7 @@ depext-cannot-install: false depext-run-installs: true download-jobs: 1 eval-variables: [sys-comp-version ["sh" "-c" "echo $OPAMSYSCOMP"] "comp version"] -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -3019,11 +3011,7 @@ repositories: "default" {"file://${BASEDIR}/default"} invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "LOCAL SWITCH" -paths { -} -variables { -} +synopsis: "local switch" ### opam-cat _opam/.opam-switch/switch-state compiler: ["i-am-sys-compiler.2"] installed: ["i-am-package.2" "i-am-sys-compiler.2"] @@ -3051,9 +3039,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~beta to version current which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -3067,6 +3052,13 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}$" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.2~beta to current +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~beta to version 2.2, which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -3076,7 +3068,7 @@ depext-cannot-install: false depext-run-installs: true download-jobs: 1 eval-variables: [sys-comp-version ["sh" "-c" "echo $OPAMSYSCOMP"] "comp version"] -installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default" "this-internal-error"] +installed-switches: ["sw-sys-comp" "sw-comp" "${BASEDIR}" "default"] jobs: 4 opam-root-version: current opam-version: "2.0" @@ -3090,11 +3082,7 @@ repositories: "default" {"file://${BASEDIR}/default"} invariant: ["i-am-sys-compiler" | "i-am-compiler"] opam-root: "${BASEDIR}/OPAM" opam-version: "2.0" -synopsis: "LOCAL SWITCH" -paths { -} -variables { -} +synopsis: "local switch" ### opam-cat _opam/.opam-switch/switch-state compiler: ["i-am-sys-compiler.2"] installed: ["i-am-package.2" "i-am-sys-compiler.2"] @@ -3123,9 +3111,6 @@ FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found STATE LOAD-SWITCH-STATE @ ${BASEDIR} -This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~beta to version 2.2, which can't be reverted. -You may want to back it up before going further. -Continue? [Y/n] y STATE Switch state loaded in 0.000s STATE Detected changed packages (marked for reinstall): {} The following actions will be performed: @@ -3139,6 +3124,13 @@ Done. ### # rw global state ### opam option jobs=4 | "${OPAMROOTVERSION}$" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +[WARNING] Removing global switch 'this-internal-error' as it no longer exists +FMT_UPG Light config upgrade, from 2.2~beta to current +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~beta to version 2.2, which can't be reverted. +You may want to back it up before going further. + +Continue? [Y/n] y +Format upgrade done. Set to '4' the field jobs in global configuration ### opam-cat $OPAMROOT/config | '"${OPAMROOTVERSION}"' -> "current" | grep -v sys-pkg-manager-cmd | grep -v global-variables default-compiler: ["i-am-sys-compiler" "i-am-compiler"] @@ -3148,7 +3140,7 @@ depext-cannot-install: false depext-run-installs: true download-jobs: 1 eval-variables: [sys-comp-version ["sh" "-c" "echo $OPAMSYSCOMP"] "comp version"] -installed-switches: ["sw-sys-comp" "sw-comp" "default" "this-internal-error"] +installed-switches: ["sw-sys-comp" "sw-comp" "default"] jobs: 4 opam-root-version: current opam-version: "2.0"