diff --git a/master_changes.md b/master_changes.md index f71c946fbfb..b7bce95afbe 100644 --- a/master_changes.md +++ b/master_changes.md @@ -12,6 +12,8 @@ users) ## Version * Bump version to 2.2.0~beta3~dev [#5917 @kit-ty-kate] + * Bump the version number after the release of 2.2.0~beta1 [#5785 @kit-ty-kate] + * Upgrade the opam-root-version to 2.2~beta [#5904 @kit-ty-kate] ## Global CLI @@ -65,6 +67,8 @@ users) ## External dependencies ## Format upgrade + * Handle init OCaml `sys-ocaml-*` eval variables during format upgrade from 2.0 -> 2.1 -> 2.2 [#5829 @dra27] + * Reset the "jobs" config variable when upgrading from opam 2.1 to 2.2, instead of 2.0 to 2.1 [#5904 @kit-ty-kate - fix #5816] ## Sandbox @@ -107,6 +111,7 @@ users) ### Tests * tree: add a test for packages that have variables in their transitive dependencies [#5919 @rjbou] * tree: add test for `opam tree pkg --with-test --no-switch` [#5919 @rjbou] + * Update opam root version test with root version bump [#5904 @rjbou] ### Engine diff --git a/src/format/opamFile.ml b/src/format/opamFile.ml index ffda371c947..75085db5fa5 100644 --- a/src/format/opamFile.ml +++ b/src/format/opamFile.ml @@ -1395,7 +1395,7 @@ module ConfigSyntax = struct let atomic = false let format_version = OpamVersion.of_string "2.1" let file_format_version = OpamVersion.of_string "2.0" - let root_version = OpamVersion.of_string "2.2~alpha" + let root_version = OpamVersion.of_string "2.2~beta" let default_old_root_version = OpamVersion.of_string "2.1~~previous" diff --git a/src/state/opamFormatUpgrade.ml b/src/state/opamFormatUpgrade.ml index e101364a6e7..5cab7d60ecd 100644 --- a/src/state/opamFormatUpgrade.ml +++ b/src/state/opamFormatUpgrade.ml @@ -1110,7 +1110,18 @@ let sys_config_variables_unix_2_1 = [ "Host C Runtime Library type of the OCaml compiler present on your system"; ] -let from_2_0_to_2_1 ~on_the_fly _ conf = +let from_2_0_to_2_1 ~on_the_fly:_ _ conf = + apply_eval_variables conf [] sys_config_variables_unix_2_1, gtc_none + +let v2_2_alpha = OpamVersion.of_string "2.2~alpha" + +let from_2_1_to_2_2_alpha ~on_the_fly:_ _ conf = + apply_eval_variables conf sys_config_variables_unix_2_1 + OpamEnv.sys_ocaml_eval_variables, gtc_none + +let v2_2_beta = OpamVersion.of_string "2.2~beta" + +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. @@ -1130,15 +1141,8 @@ let from_2_0_to_2_1 ~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); - let conf = apply_eval_variables conf [] sys_config_variables_unix_2_1 in OpamFile.Config.with_jobs_opt None conf, gtc_none -let v2_2_alpha = OpamVersion.of_string "2.2~alpha" - -let from_2_1_to_2_2_alpha ~on_the_fly:_ _ conf = - apply_eval_variables conf sys_config_variables_unix_2_1 - OpamEnv.sys_ocaml_eval_variables, 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. @@ -1234,6 +1238,7 @@ let as_necessary ?reinit requested_lock global_lock root config = 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; ] |> List.filter (fun (v,_) -> OpamVersion.compare root_version v < 0) diff --git a/tests/reftests/init-ocaml-eval-variables.unix.test b/tests/reftests/init-ocaml-eval-variables.unix.test index 1a3e8a89709..705152c5b37 100644 --- a/tests/reftests/init-ocaml-eval-variables.unix.test +++ b/tests/reftests/init-ocaml-eval-variables.unix.test @@ -81,6 +81,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve 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 | grep eval-variables diff --git a/tests/reftests/init-ocaml-eval-variables.win32.test b/tests/reftests/init-ocaml-eval-variables.win32.test index fbbca848513..25f55aa5d9b 100644 --- a/tests/reftests/init-ocaml-eval-variables.win32.test +++ b/tests/reftests/init-ocaml-eval-variables.win32.test @@ -81,6 +81,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve 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 | grep eval-variables diff --git a/tests/reftests/opamroot-versions.test b/tests/reftests/opamroot-versions.test index 4112b78ef49..ad764d50eca 100644 --- a/tests/reftests/opamroot-versions.test +++ b/tests/reftests/opamroot-versions.test @@ -1062,6 +1062,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve You may want to back it up before going further. Perform the update and 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. <><> Rerunning init and update ><><><><><><><><><><><><><><><><><><><><><><><><> @@ -1151,6 +1153,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve You may want to back it up before going further. Perform the update and 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. <><> Rerunning init and update ><><><><><><><><><><><><><><><><><><><><><><><><> @@ -1224,6 +1228,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve You may want to back it up before going further. Perform the update and 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. <><> Rerunning init and update ><><><><><><><><><><><><><><><><><><><><><><><><> @@ -1364,6 +1370,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve You may want to back it up before going further. Perform the update and 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. <><> Rerunning init and update ><><><><><><><><><><><><><><><><><><><><><><><><> @@ -1422,6 +1430,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve You may want to back it up before going further. Perform the update and 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. <><> Rerunning init and update ><><><><><><><><><><><><><><><><><><><><><><><><> @@ -1513,6 +1523,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve You may want to back it up before going further. Perform the update and 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. <><> Rerunning init and update ><><><><><><><><><><><><><><><><><><><><><><><><> @@ -1588,6 +1600,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve You may want to back it up before going further. Perform the update and 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. <><> Rerunning init and update ><><><><><><><><><><><><><><><><><><><><><><><><> @@ -1729,6 +1743,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve You may want to back it up before going further. Perform the update and 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. <><> Rerunning init and update ><><><><><><><><><><><><><><><><><><><><><><><><> @@ -1822,6 +1838,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve 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: @@ -1892,6 +1910,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve 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: @@ -1964,6 +1984,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve 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: @@ -2065,6 +2087,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve 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 No cache found @@ -2148,7 +2172,7 @@ Done. ### # ro global state, rw repo state ### opam repo add root-config ./root-config GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM -FMT_UPG On-the-fly config upgrade, from 2.1 to 2.2~alpha +FMT_UPG On-the-fly config upgrade, from 2.1 to 2.2~beta FMT_UPG Format upgrade done RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM RSTATE Cache found @@ -2165,6 +2189,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve 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: @@ -2234,6 +2260,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve 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: @@ -2305,6 +2333,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve 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: @@ -2376,6 +2406,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve 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: @@ -2416,6 +2448,8 @@ This version of opam requires an update to the layout of ${BASEDIR}/OPAM from ve 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 No cache found @@ -2457,6 +2491,364 @@ i-am-package 2 One-line description i-am-sys-compiler 2 One-line description ### rm -rf _opam ### :V:6:a: From 2.2~alpha root, global +### ocaml generate.ml 2.2~alpha +### # ro global state +### opam option jobs +GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +FMT_UPG On-the-fly config upgrade, from 2.2~alpha to 2.2~beta +FMT_UPG Format upgrade done +### # ro global state, ro repo state, ro switch state +### opam list +GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +FMT_UPG On-the-fly config upgrade, from 2.2~alpha to 2.2~beta +FMT_UPG Format upgrade done +RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM +RSTATE No cache found +RSTATE loaded opam files from repo default in 0.000s +STATE LOAD-SWITCH-STATE @ sw-sys-comp +STATE Switch state loaded in 0.000s +# Packages matching: installed +# Name # Installed # Synopsis +i-am-another-package 2 One-line description +i-am-package 2 One-line description +i-am-sys-compiler 1 One-line description +### # ro global state, ro repo state, rw switch state +### opam install i-am-another-package --switch sw-comp +GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +FMT_UPG On-the-fly config upgrade, from 2.2~alpha to 2.2~beta +FMT_UPG Format upgrade done +RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM +RSTATE Cache found +STATE LOAD-SWITCH-STATE @ sw-comp +STATE Switch state loaded in 0.000s +STATE Detected changed packages (marked for reinstall): {} +The following actions will be performed: +=== install 1 package + - install i-am-another-package 2 + +<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> +-> installed i-am-another-package.2 +STATE dependencies (0.000) result={ i-am-compiler.2 } +Done. +### # ro global state, rw repo state +### opam repo add root-config ./root-config +GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +FMT_UPG On-the-fly config upgrade, from 2.2~alpha to 2.2~beta +FMT_UPG Format upgrade done +RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM +RSTATE Cache found +[root-config] Initialised +[NOTE] Repository root-config has been added to the selections of switch sw-sys-comp only. + Run `opam repository add root-config --all-switches|--set-default' to use it in all existing switches, or in newly created switches, respectively. + +### # rw global state +### opam option jobs=4 +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 2.2~beta +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version 2.2~beta, 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"] +default-invariant: ["i-am-sys-compiler"] +depext: true +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"] +jobs: 4 +opam-root-version: current +opam-version: "2.0" +repositories: "default" +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"}] +### opam-cat $OPAMROOT/sw-comp/.opam-switch/switch-config +invariant: ["i-am-compiler"] +opam-version: "2.0" +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"] +opam-version: "2.0" +roots: ["i-am-another-package.2" "i-am-compiler.2" "i-am-package.2"] +### :V:6:b: From 2.2~alpha root, local +### ocaml generate.ml 2.2~alpha local +### opam list | "${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 No cache found +RSTATE loaded opam files from repo default in 0.000s +STATE LOAD-SWITCH-STATE @ ${BASEDIR} +STATE Switch state loaded in 0.000s +# Packages matching: installed +# Name # Installed # Synopsis +i-am-sys-compiler 2 One-line description +### # ro global state, ro repo state, rw switch state +### opam install i-am-package +GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +FMT_UPG On-the-fly config upgrade, from 2.2~alpha to 2.2~beta +FMT_UPG Format upgrade done +RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM +RSTATE Cache found +STATE LOAD-SWITCH-STATE @ ${BASEDIR} +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): {} +The following actions will be performed: +=== install 1 package + - install i-am-package 2 + +<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> +-> installed i-am-package.2 +STATE dependencies (0.000) result={ i-am-sys-compiler.2 } +Done. +### # rw global state +### opam option jobs=4 +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 2.2~beta +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version 2.2~beta, 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"] +default-invariant: ["i-am-sys-compiler"] +depext: true +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"] +jobs: 4 +opam-root-version: current +opam-version: "2.0" +repositories: "default" +swh-fallback: false +switch: "sw-sys-comp" +### opam-cat $OPAMROOT/repo/repos-config +opam-version: "2.0" +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" +### opam-cat _opam/.opam-switch/switch-state +compiler: ["i-am-sys-compiler.2"] +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:6:c: From 2.2~alpha root, local unknown from config +### ocaml generate.ml 2.2~alpha local +### opam list | "${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 No cache found +RSTATE loaded opam files from repo default in 0.000s +STATE LOAD-SWITCH-STATE @ ${BASEDIR} +STATE Switch state loaded in 0.000s +# Packages matching: installed +# Name # Installed # Synopsis +i-am-sys-compiler 2 One-line description +### # ro global state, ro repo state, rw switch state +### opam install i-am-package | "${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 +STATE LOAD-SWITCH-STATE @ ${BASEDIR} +STATE Switch state loaded in 0.000s +STATE Detected changed packages (marked for reinstall): {} +The following actions will be performed: +=== install 1 package + - install i-am-package 2 + +<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> +-> installed i-am-package.2 +STATE dependencies (0.000) result={ i-am-sys-compiler.2 } +Done. +### # rw global state +### opam option jobs=4 +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 2.2~beta +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version 2.2~beta, 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"] +default-invariant: ["i-am-sys-compiler"] +depext: true +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"] +jobs: 4 +opam-root-version: current +opam-version: "2.0" +repositories: "default" +swh-fallback: false +switch: "sw-sys-comp" +### opam-cat $OPAMROOT/repo/repos-config +opam-version: "2.0" +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" +### opam-cat _opam/.opam-switch/switch-state +compiler: ["i-am-sys-compiler.2"] +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:6:d: Upgraded root and local 2.2~alpha switch not recorded +### ocaml generate.ml 2.2~alpha orphaned 2.2~alpha +### # ro global state, ro repo state, ro switch state +### opam list +GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +FMT_UPG On-the-fly config upgrade, from 2.2~alpha to 2.2~beta +FMT_UPG Format upgrade done +RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM +RSTATE No cache found +RSTATE loaded opam files from repo default in 0.000s +STATE LOAD-SWITCH-STATE @ ${BASEDIR} +STATE Switch state loaded in 0.000s +# Packages matching: installed +# Name # Installed # Synopsis +i-am-sys-compiler 2 One-line description +### # ro global state, ro repo state, rw switch state +### opam install i-am-package +GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +FMT_UPG On-the-fly config upgrade, from 2.2~alpha to 2.2~beta +FMT_UPG Format upgrade done +RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM +RSTATE Cache found +STATE LOAD-SWITCH-STATE @ ${BASEDIR} +STATE Switch state loaded in 0.000s +STATE Detected changed packages (marked for reinstall): {} +The following actions will be performed: +=== install 1 package + - install i-am-package 2 + +<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> +-> installed i-am-package.2 +STATE dependencies (0.000) result={ i-am-sys-compiler.2 } +Done. +### # rw global state +### opam option jobs=4 +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 2.2~beta +This version of opam requires an update to the layout of ${BASEDIR}/OPAM from version 2.2~alpha to version 2.2~beta, 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"] +default-invariant: ["i-am-sys-compiler"] +depext: true +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"] +jobs: 4 +opam-root-version: current +opam-version: "2.0" +repositories: "default" +swh-fallback: false +switch: "sw-sys-comp" +### opam-cat $OPAMROOT/repo/repos-config +opam-version: "2.0" +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" +### opam-cat _opam/.opam-switch/switch-state +compiler: ["i-am-sys-compiler.2"] +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:6:e: reinit from 2.2~beta +### ocaml generate.ml 2.2~beta +### opam init --reinit --bypass-checks --no-setup | grep -v Cygwin +No configuration file found, using built-in defaults. +GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM +RSTATE No cache found +RSTATE loaded opam files from repo default in 0.000s + +<><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> +[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"] +default-invariant: ["i-am-sys-compiler"] +depext: true +depext-cannot-install: false +depext-run-installs: true +download-jobs: 3 +eval-variables: [sys-comp-version ["sh" "-c" "echo $OPAMSYSCOMP"] "comp version"] +installed-switches: ["sw-sys-comp" "sw-comp" "default" "${BASEDIR}/why-did-you-delete-me" "this-internal-error"] +opam-root-version: current +opam-version: "2.0" +repositories: "default" +swh-fallback: false +switch: "sw-sys-comp" +wrap-build-commands: ["%{hooks}%/sandbox.sh" "build"] {os = "linux" | os = "macos"} +wrap-install-commands: ["%{hooks}%/sandbox.sh" "install"] {os = "linux" | os = "macos"} +wrap-remove-commands: ["%{hooks}%/sandbox.sh" "remove"] {os = "linux" | os = "macos"} +### opam switch --short +GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +${BASEDIR} +default +sw-comp +sw-sys-comp +this-internal-error +### opam list +GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM +RSTATE LOAD-REPOSITORY-STATE @ ${BASEDIR}/OPAM +RSTATE Cache found +STATE LOAD-SWITCH-STATE @ ${BASEDIR} +STATE Switch state loaded in 0.000s +# Packages matching: installed +# Name # Installed # Synopsis +i-am-package 2 One-line description +i-am-sys-compiler 2 One-line description +### rm -rf _opam +### :V:7:a: From 2.2~beta root, global ### ocaml generate.ml $OPAMROOTVERSION ### # ro global state ### opam option jobs @@ -2530,7 +2922,7 @@ compiler: ["i-am-compiler.2"] 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:6:b: From 2.2~alpha root, local +### :V:7:b: From 2.2~beta root, local ### ocaml generate.ml $OPAMROOTVERSION local ### opam list | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM @@ -2591,7 +2983,7 @@ compiler: ["i-am-sys-compiler.2"] 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:6:c: From 2.2~alpha root, local unknown from config +### :V:7:c: From 2.2~beta root, local unknown from config ### ocaml generate.ml $OPAMROOTVERSION local ### opam list | "${OPAMROOTVERSION}($|,)" -> "current" GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM @@ -2651,8 +3043,8 @@ compiler: ["i-am-sys-compiler.2"] 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:6:d: Upgraded root and local 2.2~alpha switch not recorded -### ocaml generate.ml $OPAMROOTVERSION orphaned 2.2~alpha +### :V:7:d: Upgraded root and local 2.2~beta switch not recorded +### ocaml generate.ml $OPAMROOTVERSION orphaned 2.2~beta ### # ro global state, ro repo state, ro switch state ### opam list GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM @@ -2712,8 +3104,8 @@ compiler: ["i-am-sys-compiler.2"] 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:6:e: reinit from 2.2~alpha -### ocaml generate.ml 2.2~alpha +### :V:7:e: reinit from 2.2~beta +### ocaml generate.ml 2.2~beta ### opam init --reinit --bypass-checks --no-setup | grep -v Cygwin No configuration file found, using built-in defaults. GSTATE LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM