N0REP0
### <pkg:i-got-the-variables.2.4.6>
opam-version: "2.0"
depends: [ "base" ]
available: !(os = "macos" & arch = "arm64")
flags: compiler
setenv: IGTV_PATH = "%{lib}%/stublibs"
### <pkg:base.1>
opam-version: "2.0"
### <pkg:base.2>
opam-version: "2.0"
### opam switch create var-option --empty
### opam var user= --switch var-option
Removed variable user in switch var-option
### opam var group= --switch var-option
Removed variable group in switch var-option
### opam option sys-pkg-manager-cmd= --global | grep -v configuration
### opam var arch=x86_64 --global
Added '[arch "x86_64" "Set through 'opam var'"]' to field global-variables in global configuration
### opam var make=make --global
Added '[make "make" "Set through 'opam var'"]' to field global-variables in global configuration
### opam var os=linux --global
Added '[os "linux" "Set through 'opam var'"]' to field global-variables in global configuration
### opam var os-distribution=lorem --global
Added '[os-distribution "lorem" "Set through 'opam var'"]' to field global-variables in global configuration
### opam var os-family=ipsum --global
Added '[os-family "ipsum" "Set through 'opam var'"]' to field global-variables in global configuration
### opam var os-version=dolor --global
Added '[os-version "dolor" "Set through 'opam var'"]' to field global-variables in global configuration
### opam var sys-ocaml-arch= --global
Removed variable sys-ocaml-arch in global configuration
### opam var sys-ocaml-cc= --global
Removed variable sys-ocaml-cc in global configuration
### opam var sys-ocaml-libc= --global
Removed variable sys-ocaml-libc in global configuration
### opam var sys-ocaml-system= --global
Removed variable sys-ocaml-system in global configuration
### opam option wrap-build-commands=[] --global
Set to '[]' the field wrap-build-commands in global configuration
### opam option wrap-install-commands=[] --global
Set to '[]' the field wrap-install-commands in global configuration
### opam option wrap-remove-commands=[] --global
Set to '[]' the field wrap-remove-commands in global configuration
### opam option jobs=7 --global
Set to '7' the field jobs in global configuration
### opam install i-got-the-variables --yes
The following actions will be performed:
=== install 2 packages
  - install base                2     [required by i-got-the-variables]
  - install i-got-the-variables 2.4.6

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed base.2
-> installed i-got-the-variables.2.4.6
Done.
### opam var | "   *" -> " " | "[.]exe " -> "" | "opam-version.*" -> '\c'

<><> Global opam variables ><><><><><><><><><><><><><><><><><><><><><><><><><><>
arch x86_64 # Set through 'opam var'
exe # Suffix needed for executable filenames (Windows)
jobs 7 # The number of parallel jobs set up in opam configuration
make make # Set through 'opam var'
os linux # Set through 'opam var'
os-distribution lorem # Set through 'opam var'
os-family ipsum # Set through 'opam var'
os-version dolor # Set through 'opam var'
root ${BASEDIR}/OPAM # The current opam root directory
switch var-option # The identifier of the current switch
sys-ocaml-version 4.08.0 # Set through 'opam var'

<><> Configuration variables from the current switch ><><><><><><><><><><><><><>
prefix ${BASEDIR}/OPAM/var-option
lib ${BASEDIR}/OPAM/var-option/lib
bin ${BASEDIR}/OPAM/var-option/bin
sbin ${BASEDIR}/OPAM/var-option/sbin
share ${BASEDIR}/OPAM/var-option/share
doc ${BASEDIR}/OPAM/var-option/doc
etc ${BASEDIR}/OPAM/var-option/etc
man ${BASEDIR}/OPAM/var-option/man
toplevel ${BASEDIR}/OPAM/var-option/lib/toplevel
stublibs ${BASEDIR}/OPAM/var-option/lib/stublibs

<><> Package variables ('opam var --package PKG' to show) <><><><><><><><><><><>
PKG:name # Name of the package
PKG:version # Version of the package
PKG:depends # Resolved direct dependencies of the package
PKG:installed # Whether the package is installed
PKG:enable # Takes the value "enable" or "disable" depending on whether the package is installed
PKG:pinned # Whether the package is pinned
PKG:bin # Binary directory for this package
PKG:sbin # System binary directory for this package
PKG:lib # Library directory for this package
PKG:man # Man directory for this package
PKG:doc # Doc directory for this package
PKG:share # Share directory for this package
PKG:etc # Etc directory for this package
PKG:build # Directory where the package was built
PKG:hash # Hash of the package archive
PKG:dev # True if this is a development package
PKG:build-id # A hash identifying the precise package version with all its dependencies
PKG:opamfile # Path of the current opam file
### opam var --switch var-option
prefix   ${BASEDIR}/OPAM/var-option
lib      ${BASEDIR}/OPAM/var-option/lib
bin      ${BASEDIR}/OPAM/var-option/bin
sbin     ${BASEDIR}/OPAM/var-option/sbin
share    ${BASEDIR}/OPAM/var-option/share
doc      ${BASEDIR}/OPAM/var-option/doc
etc      ${BASEDIR}/OPAM/var-option/etc
man      ${BASEDIR}/OPAM/var-option/man
toplevel ${BASEDIR}/OPAM/var-option/lib/toplevel
stublibs ${BASEDIR}/OPAM/var-option/lib/stublibs
### opam var --global | "   *" -> " " | "[.]exe " -> "" | "opam-version.*" -> '\c'
arch x86_64 # Set through 'opam var'
exe # Suffix needed for executable filenames (Windows)
jobs 7 # The number of parallel jobs set up in opam configuration
make make # Set through 'opam var'
os linux # Set through 'opam var'
os-distribution lorem # Set through 'opam var'
os-family ipsum # Set through 'opam var'
os-version dolor # Set through 'opam var'
root ${BASEDIR}/OPAM # The current opam root directory
switch var-option # The identifier of the current switch
sys-ocaml-version 4.08.0 # Set through 'opam var'
### OPAMDEBUG=-1 OPAMDEBUGSECTIONS="GSTATE STATE" opam var bin
GSTATE                          LOAD-GLOBAL-STATE @ ${BASEDIR}/OPAM
${BASEDIR}/OPAM/var-option/bin
### opam var bin --switch var-option
${BASEDIR}/OPAM/var-option/bin
### opam var bin --global
[ERROR] Variable bin not found in the global configuration
# Return code 5 #
### opam var bin=global-bin --global
Added '[bin "global-bin" "Set through 'opam var'"]' to field global-variables in global configuration
### opam var bin=switch-bin --switch var-option
Added 'bin: "switch-bin"' to field variables in switch var-option
### opam var bin
${BASEDIR}/OPAM/var-option/bin
### opam var bin --switch var-option
${BASEDIR}/OPAM/var-option/bin
### opam var bin --global
global-bin
### opam var foo=global-foo --global
Added '[foo "global-foo" "Set through 'opam var'"]' to field global-variables in global configuration
### opam var foo=switch-foo --switch var-option
Added 'foo: "switch-foo"' to field variables in switch var-option
### opam var foo
switch-foo
### opam var foo --switch var-option
switch-foo
### opam var foo --global
global-foo
### opam var ocaml-base-compiler:version
[ERROR] Variable ocaml-base-compiler:version not found in switch var-option; package ocaml-base-compiler is not installed in this switch
# Return code 5 #
### opam var ocaml-base-compiler:version --switch var-option
[ERROR] Variable ocaml-base-compiler:version not found in switch var-option; package ocaml-base-compiler is not installed in this switch
# Return code 5 #
### opam var ocaml-base-compiler:version --global
[ERROR] Variable ocaml-base-compiler:version not found in the global configuration
# Return code 5 #
### opam var --package ocaml | ".*build-id.*" -> '\c' | ".*opamfile.*" -> '\c' | "   *" -> " "
[ERROR] Package ocaml not found, skipping
### opam var i-got-the-variables:version
2.4.6
### opam var i-got-the-variables:version --switch var-option
2.4.6
### opam var i-got-the-variables:version --global
[ERROR] Variable i-got-the-variables:version not found in the global configuration
# Return code 5 #
### opam var --package i-got-the-variables | ".*build-id.*" -> '\c' | ".*opamfile.*" -> '\c' | "   *" -> " "
i-got-the-variables:name i-got-the-variables # Name of the package
i-got-the-variables:version 2.4.6 # Version of the package
i-got-the-variables:depends base.2 # Resolved direct dependencies of the package
i-got-the-variables:installed true # Whether the package is installed
i-got-the-variables:enable enable # Takes the value "enable" or "disable" depending on whether the package is installed
i-got-the-variables:pinned false # Whether the package is pinned
i-got-the-variables:bin ${BASEDIR}/OPAM/var-option/bin # Binary directory for this package
i-got-the-variables:sbin ${BASEDIR}/OPAM/var-option/sbin # System binary directory for this package
i-got-the-variables:lib ${BASEDIR}/OPAM/var-option/lib/i-got-the-variables # Library directory for this package
i-got-the-variables:man ${BASEDIR}/OPAM/var-option/man # Man directory for this package
i-got-the-variables:doc ${BASEDIR}/OPAM/var-option/doc/i-got-the-variables # Doc directory for this package
i-got-the-variables:share ${BASEDIR}/OPAM/var-option/share/i-got-the-variables # Share directory for this package
i-got-the-variables:etc ${BASEDIR}/OPAM/var-option/etc/i-got-the-variables # Etc directory for this package
i-got-the-variables:build ${BASEDIR}/OPAM/var-option/.opam-switch/build/i-got-the-variables.2.4.6 # Directory where the package was built
i-got-the-variables:dev false # True if this is a development package
### opam var i-got-the-variables:version=1 | '…' -> '...' | '`' -> "'"
opam: variable setting needs a scope, use '--global' or '--switch <switch>'
Usage: opam var [--global] [--package=PACKAGE] [OPTION]... [VAR[=[VALUE]]]
Try 'opam var --help' or 'opam --help' for more information.
# Return code 2 #
### opam var i-got-the-variables:version=1 --switch var-option
[ERROR] Package variables are read-only and cannot be updated using `opam var --global`
# Return code 2 #
### opam var i-got-the-variables:version=1 --global
[ERROR] Package variables are read-only and cannot be updated using `opam var --global`
# Return code 2 #
### opam var _:version
[ERROR] Self variables (`_:`) are not valid here
# Return code 2 #
### opam var _:version --switch var-option
[ERROR] Self variables (`_:`) are not valid here
# Return code 2 #
### opam var _:version --global
[ERROR] Self variables (`_:`) are not valid here
# Return code 2 #
### opam var _:version=1 | '…' -> '...' | '`' -> "'"
opam: variable setting needs a scope, use '--global' or '--switch <switch>'
Usage: opam var [--global] [--package=PACKAGE] [OPTION]... [VAR[=[VALUE]]]
Try 'opam var --help' or 'opam --help' for more information.
# Return code 2 #
### opam var _:version=1 --switch var-option
[ERROR] Self variables (`_:`) are not valid here
# Return code 2 #
### opam var _:version=1 --global
[ERROR] Self variables (`_:`) are not valid here
# Return code 2 #
### opam option

<><> Global configuration <><><><><><><><><><><><><><><><><><><><><><><><><><><>
archive-mirrors                {}
best-effort-prefix-criteria    {}
depext                         true
depext-bypass                  {}
depext-cannot-install          false
depext-run-installs            true
download-command               {}
download-jobs                  3
git-location                   {}
jobs                           7
post-build-commands            {}
post-install-commands          {}
post-remove-commands           {}
post-session-commands          {}
pre-build-commands             {}
pre-install-commands           {}
pre-remove-commands            {}
pre-session-commands           {}
repository-validation-command  {}
solver                         {}
solver-criteria                {}
solver-fixup-criteria          {}
solver-upgrade-criteria        {}
swh-fallback                   false
sys-pkg-manager-cmd            {}
wrap-build-commands            {}
wrap-install-commands          {}
wrap-remove-commands           {}

<><> Switch configuration (var-option) ><><><><><><><><><><><><><><><><><><><><>
depext-bypass          {}
post-build-commands    {}
post-install-commands  {}
post-remove-commands   {}
post-session-commands  {}
pre-build-commands     {}
pre-install-commands   {}
pre-remove-commands    {}
pre-session-commands   {}
setenv                 {}
synopsis               "var-option"
wrap-build-commands    {}
wrap-install-commands  {}
wrap-remove-commands   {}
### # Check global & switch option setting
### opam option download-jobs
3
### opam option download-jobs --global
3
### opam option download-jobs --switch var-option
[ERROR] Field or section download-jobs not found
# Return code 5 #
### opam option jobs
7
### opam option jobs --global
7
### opam option jobs --switch var-option
[ERROR] Field or section jobs not found
# Return code 5 #
### opam option depext-bypass
[]
### opam option depext-bypass --global
[]
### opam option depext-bypass --switch var-option
[]
### opam option synopsis
"var-option"
### opam option 'synopsis="sit amet"'
Set to '"sit amet"' the field synopsis in switch var-option
### opam option synopsis
"sit amet"
### opam option synopsis --switch var-option
"sit amet"
### opam option synopsis --global
[ERROR] Field or section synopsis not found
# Return code 5 #
### opam option synopsis=
Reverted field synopsis in switch var-option
### opam option synopsis
""
### opam option 'synopsis="consectetur adipiscing"' --switch var-option
Set to '"consectetur adipiscing"' the field synopsis in switch var-option
### opam option synopsis
"consectetur adipiscing"
### opam option synopsis= --switch var-option
Reverted field synopsis in switch var-option
### opam option synopsis
""
### opam option download-jobs
3
### opam option download-jobs=10
Set to '10' the field download-jobs in global configuration
### opam option download-jobs
10
### opam option download-jobs --switch var-option
[ERROR] Field or section download-jobs not found
# Return code 5 #
### opam option download-jobs --global
10
### opam option download-jobs=
Reverted field download-jobs in global configuration
### opam option download-jobs
1
### opam option download-jobs=12 --global
Set to '12' the field download-jobs in global configuration
### opam option download-jobs
12
### opam option download-jobs= --global
Reverted field download-jobs in global configuration
### opam option download-jobs
1
### # Check same option name setting through global & switch
### opam option pre-session-commands
[]
### opam option 'pre-session-commands=["elit"]'
Set to '["elit"]' the field pre-session-commands in switch var-option
### opam option pre-session-commands
"elit"
### opam option pre-session-commands --switch var-option
"elit"
### opam option pre-session-commands --global
[]
### opam option pre-session-commands=
Reverted field pre-session-commands in switch var-option
### opam option pre-session-commands
[]
### opam option pre-session-commands --switch var-option
[]
### opam option pre-session-commands --global
[]
### opam option 'pre-session-commands=["sed"]' --switch var-option
Set to '["sed"]' the field pre-session-commands in switch var-option
### opam option pre-session-commands
"sed"
### opam option pre-session-commands --switch var-option
"sed"
### opam option pre-session-commands --global
[]
### opam option pre-session-commands= --switch var-option
Reverted field pre-session-commands in switch var-option
### opam option pre-session-commands
[]
### opam option pre-session-commands --switch var-option
[]
### opam option pre-session-commands --global
[]
### opam option 'pre-session-commands=["do"]' --global
Set to '["do"]' the field pre-session-commands in global configuration
### opam option pre-session-commands
[]
### opam option pre-session-commands --switch var-option
[]
### opam option pre-session-commands --global
"do"
### opam option pre-session-commands= --global
Reverted field pre-session-commands in global configuration
### opam option pre-session-commands
[]
### opam option pre-session-commands --switch var-option
[]
### opam option pre-session-commands --global
[]
### # Check addition & removal on set
### opam option depext-bypass
[]
### opam option 'depext-bypass+="tempor"'
Added '"tempor"' to field depext-bypass in switch var-option
### opam option 'depext-bypass+=["incididunt"]'
Added '["incididunt"]' to field depext-bypass in switch var-option
### opam option depext-bypass
["incididunt" "tempor"]
### opam option 'depext-bypass-="incididunt"'
Removed '"incididunt"' from field depext-bypass in switch var-option
### opam option depext-bypass
"tempor"
### opam option 'depext-bypass=["incididunt" "tempor"]'
Set to '["incididunt" "tempor"]' the field depext-bypass in switch var-option
### opam option 'depext-bypass-=["tempor"]'
Removed '["tempor"]' from field depext-bypass in switch var-option
### opam option depext-bypass
"incididunt"
### opam option 'depext-bypass-="ut"'
No modification in switch var-option
### opam option depext-bypass
"incididunt"
### opam option 'depext-bypass-=[]'
No modification in switch var-option
### opam option depext-bypass
"incididunt"
### opam option depext-bypass=
Reverted field depext-bypass in switch var-option
### opam option 'depext-bypass-="tempor"'
No modification in switch var-option
### opam option depext-bypass
[]
### # Check addition & removal on map
### opam option sys-pkg-manager-cmd
[]
### opam option 'sys-pkg-manager-cmd+=["tempor" "path/to"]'
Added '["tempor" "path/to"]' to field sys-pkg-manager-cmd in global configuration
### opam option 'sys-pkg-manager-cmd+=["incididunt" "path/to"]'
Added '["incididunt" "path/to"]' to field sys-pkg-manager-cmd in global configuration
### opam option sys-pkg-manager-cmd
[["incididunt" "${BASEDIR}/path/to"] ["tempor" "${BASEDIR}/path/to"]]
### opam option 'sys-pkg-manager-cmd-=["incididunt" "path/to"]'
Removed '["incididunt" "path/to"]' from field sys-pkg-manager-cmd in global configuration
### opam option sys-pkg-manager-cmd
["tempor" "${BASEDIR}/path/to"]
### opam option 'sys-pkg-manager-cmd=[["incididunt" "path/to"]["tempor" "path/to"]]'
Set to '[["incididunt" "path/to"]["tempor" "path/to"]]' the field sys-pkg-manager-cmd in global configuration
### opam option 'sys-pkg-manager-cmd-=["tempor" "path/to"]'
Removed '["tempor" "path/to"]' from field sys-pkg-manager-cmd in global configuration
### opam option sys-pkg-manager-cmd
["incididunt" "${BASEDIR}/path/to"]
### opam option 'sys-pkg-manager-cmd-=["ut" "/inexist/ant"]'
No modification in global configuration
### opam option sys-pkg-manager-cmd
["incididunt" "${BASEDIR}/path/to"]
### opam option sys-pkg-manager-cmd=
Reverted field sys-pkg-manager-cmd in global configuration
### opam option 'sys-pkg-manager-cmd-=["tempor" "path/to"]'
No modification in global configuration
### opam option sys-pkg-manager-cmd
[]
### # Check addition & removal on list
### opam option 'setenv+=lorem="labore"'
Added 'lorem="labore"' to field setenv in switch var-option
### opam option 'setenv+=ipsum="dolore"'
Added 'ipsum="dolore"' to field setenv in switch var-option
### opam option setenv
[[ipsum = "dolore"] [lorem = "labore"]]
### opam option 'setenv-=lorem="labore"'
Removed 'lorem="labore"' from field setenv in switch var-option
### opam option setenv
ipsum = "dolore"
### opam option 'setenv=[[lorem="labore"] [ipsum="dolore"]]'
Set to '[[lorem="labore"] [ipsum="dolore"]]' the field setenv in switch var-option
### opam option 'setenv-=lorem="labore"'
Removed 'lorem="labore"' from field setenv in switch var-option
### opam option setenv
ipsum = "dolore"
### opam option 'setenv-=lorem="et"'
No modification in switch var-option
### opam option setenv
ipsum = "dolore"
### opam option setenv=
Reverted field setenv in switch var-option
### opam option 'setenv-=lorem="labore"'
No modification in switch var-option
### opam option setenv
[]
### opam option 'archive-mirrors="http://lorem.labore"'
Set to '"http://lorem.labore"' the field archive-mirrors in global configuration
### opam option archive-mirrors
"http://lorem.labore"
### opam option 'archive-mirrors+="http://ipsum.dolore"'
Added '"http://ipsum.dolore"' to field archive-mirrors in global configuration
### opam option archive-mirrors
["http://ipsum.dolore" "http://lorem.labore"]
### opam option 'archive-mirrors-="http://lorem.labore"'
Removed '"http://lorem.labore"' from field archive-mirrors in global configuration
### opam option archive-mirrors
"http://ipsum.dolore"
### opam option archive-mirrors=
Reverted field archive-mirrors in global configuration
### opam option archive-mirrors
### # Check that eval-variable is removed when a global variable is removed
### opam option global-variables
[[foo "global-foo" "Set through 'opam var'"] [bin "global-bin" "Set through 'opam var'"] [os-version "dolor" "Set through 'opam var'"] [os-family "ipsum" "Set through 'opam var'"] [os-distribution "lorem" "Set through 'opam var'"] [os "linux" "Set through 'opam var'"] [make "make" "Set through 'opam var'"] [arch "x86_64" "Set through 'opam var'"] [sys-ocaml-version "4.08.0" "Set through 'opam var'"]]
### opam option 'eval-variables=[dolore ["mania"] "alica"]'
Set to '[dolore ["mania"] "alica"]' the field eval-variables in global configuration
### opam option eval-variables
[dolore ["mania"] "alica"]
### opam var dolore=mania --global
Added '[dolore "mania" "Set through 'opam var'"]' to field global-variables in global configuration
### opam var dolore= --global
Removed variable dolore in global configuration
### opam option eval-variables
[]
### opam option global-variables
[[foo "global-foo" "Set through 'opam var'"] [bin "global-bin" "Set through 'opam var'"] [os-version "dolor" "Set through 'opam var'"] [os-family "ipsum" "Set through 'opam var'"] [os-distribution "lorem" "Set through 'opam var'"] [os "linux" "Set through 'opam var'"] [make "make" "Set through 'opam var'"] [arch "x86_64" "Set through 'opam var'"] [sys-ocaml-version "4.08.0" "Set through 'opam var'"]]
### # Check disallowed operations
### opam option 'variables+={esse: "cillum"}'
[ERROR] Field variables can't be directly appended to, use `opam var` instead
# Return code 2 #
### opam option 'invariant="inv"'
[ERROR] Field invariant is not modifiable
# Return code 2 #
### opam option 'jobs+=3'
[ERROR] Field jobs can't be appended
# Return code 2 #
### opam option 'jobs-=3'
[ERROR] Field jobs can't be substracted
# Return code 2 #
### opam option bar
[ERROR] No option named 'bar' found. Use 'opam option [--global]' to list them
# Return code 2 #
### opam option bar --global
[ERROR] Field or section bar not found
# Return code 5 #
### opam option bar --switch var-option
[ERROR] Field or section bar not found
# Return code 5 #
### opam option bar=sit
[ERROR] No option named 'bar' found. Use 'opam option [--global]' to list them
# Return code 2 #
### opam option bar=sit --global
[ERROR] There is no option named 'bar'. The allowed options are:
jobs download-command download-jobs archive-mirrors solver-criteria solver-upgrade-criteria solver-fixup-criteria best-effort-prefix-criteria solver global-variables eval-variables repository-validation-command depext depext-run-installs depext-cannot-install depext-bypass sys-pkg-manager-cmd git-location swh-fallback pre-build-commands pre-install-commands pre-remove-commands pre-session-commands wrap-build-commands wrap-install-commands wrap-remove-commands post-build-commands post-install-commands post-remove-commands post-session-commands
# Return code 2 #
### opam option bar=sit --switch var-option
[ERROR] There is no option named 'bar'. The allowed options are:
synopsis setenv depext-bypass pre-build-commands pre-install-commands pre-remove-commands pre-session-commands wrap-build-commands wrap-install-commands wrap-remove-commands post-build-commands post-install-commands post-remove-commands post-session-commands variables
# Return code 2 #
### # Check option shadowing
### opam option download-jobs
1
### opam var download-jobs
[ERROR] Variable download-jobs not found in the global configuration
# Return code 5 #
### opam var download-jobs=42 --global
[WARNING] You are setting a variable that has the same name as a global option.
          Did you mean to use `opam option` instead? You can revert this variable using: 'opam var download-jobs= --global'

Added '[download-jobs "42" "Set through 'opam var'"]' to field global-variables in global configuration
### opam option download-jobs --global
1
### opam var download-jobs --global
42
### opam var download-jobs=44 --switch var-option
[WARNING] You are setting a variable that has the same name as a global option.
          Did you mean to use `opam option` instead? You can revert this variable using: 'opam var download-jobs= --global'

Added 'download-jobs: "44"' to field variables in switch var-option
### opam var download-jobs --switch var-option
44
### opam var synopsis --global
[ERROR] Variable synopsis not found in the global configuration
# Return code 5 #
### opam var 'synopsis="lorem ipsum"' --global
[WARNING] You are setting a variable that has the same name as a switch option.
          Did you mean to use `opam option` instead? You can revert this variable using: 'opam var synopsis= --switch'

Added '[synopsis "\"lorem ipsum\"" "Set through 'opam var'"]' to field global-variables in global configuration
### opam var synopsis --global
"lorem ipsum"
### opam option synopsis --switch var-option
""
### opam var synopsis --switch var-option
[ERROR] Variable synopsis not found in switch var-option
# Return code 5 #
### opam var 'synopsis="ipsum"' --switch var-option
[WARNING] You are setting a variable that has the same name as a switch option.
          Did you mean to use `opam option` instead? You can revert this variable using: 'opam var synopsis= --switch'

Added 'synopsis: "\"ipsum\""' to field variables in switch var-option
### opam option synopsis --switch var-option
""
### opam var synopsis --switch var-option
"ipsum"
### opam var synopsis= --global -y
[WARNING] You are setting a variable that has the same name as a switch option.
          Did you mean to use `opam option` instead? You can revert this variable using: 'opam var synopsis= --switch'

Removed variable synopsis in global configuration
### opam var download-jobs= --global -y
[WARNING] You are setting a variable that has the same name as a global option.
          Did you mean to use `opam option` instead? You can revert this variable using: 'opam var download-jobs= --global'

Removed variable download-jobs in global configuration
### : when no switch is present
### opam switch remove var-option -y
Switch var-option and all its packages will be wiped. Are you sure? [y/n] y
### opam var | ' +#.*' -> '' | " +[.]exe" -> "" | "opam-version.*" -> '\c'

<><> Global opam variables ><><><><><><><><><><><><><><><><><><><><><><><><><><>
arch              x86_64
bin               global-bin
exe
foo               global-foo
jobs              7
make              make
os                linux
os-distribution   lorem
os-family         ipsum
os-version        dolor
root              ${BASEDIR}/OPAM
switch
sys-ocaml-version 4.08.0

<><> Configuration variables from the current switch ><><><><><><><><><><><><><>
No switch installed

<><> Package variables ('opam var --package PKG' to show) <><><><><><><><><><><>
PKG:name
PKG:version
PKG:depends
PKG:installed
PKG:enable
PKG:pinned
PKG:bin
PKG:sbin
PKG:lib
PKG:man
PKG:doc
PKG:share
PKG:etc
PKG:build
PKG:hash
PKG:dev
PKG:build-id
PKG:opamfile
### opam var --global | ' +#.*' -> '' | " +[.]exe" -> "" | "opam-version.*" -> '\c'
arch              x86_64
bin               global-bin
exe
foo               global-foo
jobs              7
make              make
os                linux
os-distribution   lorem
os-family         ipsum
os-version        dolor
root              ${BASEDIR}/OPAM
switch
sys-ocaml-version 4.08.0
### opam var --switch phantom
prefix   ${BASEDIR}/OPAM/phantom
lib      ${BASEDIR}/OPAM/phantom/lib
bin      ${BASEDIR}/OPAM/phantom/bin
sbin     ${BASEDIR}/OPAM/phantom/sbin
share    ${BASEDIR}/OPAM/phantom/share
doc      ${BASEDIR}/OPAM/phantom/doc
etc      ${BASEDIR}/OPAM/phantom/etc
man      ${BASEDIR}/OPAM/phantom/man
toplevel ${BASEDIR}/OPAM/phantom/lib/toplevel
stublibs ${BASEDIR}/OPAM/phantom/lib/stublibs
### opam option

<><> Global configuration <><><><><><><><><><><><><><><><><><><><><><><><><><><>
archive-mirrors                {}
best-effort-prefix-criteria    {}
depext                         true
depext-bypass                  {}
depext-cannot-install          false
depext-run-installs            true
download-command               {}
download-jobs                  1
git-location                   {}
jobs                           7
post-build-commands            {}
post-install-commands          {}
post-remove-commands           {}
post-session-commands          {}
pre-build-commands             {}
pre-install-commands           {}
pre-remove-commands            {}
pre-session-commands           {}
repository-validation-command  {}
solver                         {}
solver-criteria                {}
solver-fixup-criteria          {}
solver-upgrade-criteria        {}
swh-fallback                   false
sys-pkg-manager-cmd            {}
wrap-build-commands            {}
wrap-install-commands          {}
wrap-remove-commands           {}

<><> Switch configuration <><><><><><><><><><><><><><><><><><><><><><><><><><><>
No switch installed
### opam option --global
archive-mirrors                {}
best-effort-prefix-criteria    {}
depext                         true
depext-bypass                  {}
depext-cannot-install          false
depext-run-installs            true
download-command               {}
download-jobs                  1
git-location                   {}
jobs                           7
post-build-commands            {}
post-install-commands          {}
post-remove-commands           {}
post-session-commands          {}
pre-build-commands             {}
pre-install-commands           {}
pre-remove-commands            {}
pre-session-commands           {}
repository-validation-command  {}
solver                         {}
solver-criteria                {}
solver-fixup-criteria          {}
solver-upgrade-criteria        {}
swh-fallback                   false
sys-pkg-manager-cmd            {}
wrap-build-commands            {}
wrap-install-commands          {}
wrap-remove-commands           {}
### opam option --switch phantom
[ERROR] switch phantom not found, display default values
depext-bypass          {}
post-build-commands    {}
post-install-commands  {}
post-remove-commands   {}
post-session-commands  {}
pre-build-commands     {}
pre-install-commands   {}
pre-remove-commands    {}
pre-session-commands   {}
setenv                 {}
synopsis               ""
wrap-build-commands    {}
wrap-install-commands  {}
wrap-remove-commands   {}
### opam var root
${BASEDIR}/OPAM
### opam var root --global
${BASEDIR}/OPAM
### opam option depext
true
### opam option depext --global
true
### opam var arch="somearch" | '…' -> '...' | '`' -> "'"
opam: variable setting needs a scope, use '--global' or '--switch <switch>'
Usage: opam var [--global] [--package=PACKAGE] [OPTION]... [VAR[=[VALUE]]]
Try 'opam var --help' or 'opam --help' for more information.
# Return code 2 #
### opam var arch="somearch" --global
Added '[arch "\"somearch\"" "Set through 'opam var'"]' to field global-variables in global configuration
### opam var arch="somearch" --switch phantom
[ERROR] The selected switch phantom is not installed
# Return code 2 #
### opam option depext-bypass=["pkg"]
Set to '["pkg"]' the field depext-bypass in global configuration
### opam option depext-bypass=["otherpkg"] --global
Set to '["otherpkg"]' the field depext-bypass in global configuration
### opam option depext-bypass=["yetanotherpkg"] --switch phantom
[ERROR] The selected switch phantom is not installed
# Return code 2 #
