@@ -17,12 +17,8 @@ Removed variable group in switch var-option
17
17
### opam option sys-pkg-manager-cmd= --global | grep -v configuration
18
18
### opam var arch=x86_64 --global
19
19
Added '[arch "x86_64" "Set through 'opam var'"]' to field global-variables in global configuration
20
- ### opam var jobs=7 --global
21
- Added '[jobs "7" "Set through 'opam var'"]' to field global-variables in global configuration
22
20
### opam var make=make --global
23
21
Added '[make "make" "Set through 'opam var'"]' to field global-variables in global configuration
24
- ### opam var opam-version=68.79 --global
25
- Added '[opam-version "68.79" "Set through 'opam var'"]' to field global-variables in global configuration
26
22
### opam var os=linux --global
27
23
Added '[os "linux" "Set through 'opam var'"]' to field global-variables in global configuration
28
24
### opam var os-distribution=lorem --global
@@ -45,6 +41,8 @@ Set to '[]' the field wrap-build-commands in global configuration
45
41
Set to '[]' the field wrap-install-commands in global configuration
46
42
### opam option wrap-remove-commands=[] --global
47
43
Set to '[]' the field wrap-remove-commands in global configuration
44
+ ### opam option jobs=7 --global
45
+ Set to '7' the field jobs in global configuration
48
46
### opam install i-got-the-variables --yes
49
47
The following actions will be performed:
50
48
=== install 2 packages
@@ -55,14 +53,13 @@ The following actions will be performed:
55
53
-> installed base.2
56
54
-> installed i-got-the-variables.2.4.6
57
55
Done.
58
- ### opam var | " *" -> " " | "[.]exe " -> ""
56
+ ### opam var | " *" -> " " | "[.]exe " -> "" | "opam-version.*" -> '\c'
59
57
60
58
<><> Global opam variables ><><><><><><><><><><><><><><><><><><><><><><><><><><>
61
59
arch x86_64 # Set through 'opam var'
62
60
exe # Suffix needed for executable filenames (Windows)
63
- jobs 7 # Set through ' opam var'
61
+ jobs 7 # The number of parallel jobs set up in opam configuration
64
62
make make # Set through 'opam var'
65
- opam-version 68.79 # Set through 'opam var'
66
63
os linux # Set through 'opam var'
67
64
os-distribution lorem # Set through 'opam var'
68
65
os-family ipsum # Set through 'opam var'
@@ -113,12 +110,11 @@ etc ${BASEDIR}/OPAM/var-option/etc
113
110
man ${BASEDIR}/OPAM/var-option/man
114
111
toplevel ${BASEDIR}/OPAM/var-option/lib/toplevel
115
112
stublibs ${BASEDIR}/OPAM/var-option/lib/stublibs
116
- ### opam var --global | " *" -> " " | "[.]exe " -> ""
113
+ ### opam var --global | " *" -> " " | "[.]exe " -> "" | "opam-version.*" -> '\c'
117
114
arch x86_64 # Set through 'opam var'
118
115
exe # Suffix needed for executable filenames (Windows)
119
- jobs 7 # Set through ' opam var'
116
+ jobs 7 # The number of parallel jobs set up in opam configuration
120
117
make make # Set through 'opam var'
121
- opam-version 68.79 # Set through 'opam var'
122
118
os linux # Set through 'opam var'
123
119
os-distribution lorem # Set through 'opam var'
124
120
os-family ipsum # Set through 'opam var'
@@ -231,7 +227,7 @@ depext-run-installs true
231
227
download-command {}
232
228
download-jobs 3
233
229
git-location {}
234
- jobs {}
230
+ jobs 7
235
231
post-build-commands {}
236
232
post-install-commands {}
237
233
post-remove-commands {}
@@ -275,7 +271,9 @@ wrap-remove-commands {}
275
271
[ERROR] Field or section download-jobs not found
276
272
# Return code 5 #
277
273
### opam option jobs
274
+ 7
278
275
### opam option jobs --global
276
+ 7
279
277
### opam option jobs --switch var-option
280
278
[ERROR] Field or section jobs not found
281
279
# Return code 5 #
@@ -488,7 +486,7 @@ Reverted field archive-mirrors in global configuration
488
486
### opam option archive-mirrors
489
487
### # Check that eval-variable is removed when a global variable is removed
490
488
### opam option global-variables
491
- [[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'"] [opam-version "68.79" "Set through 'opam var'"] [ make "make" "Set through 'opam var'"] [jobs "7 " "Set through 'opam var'"] [arch "x86_64" "Set through 'opam var'"] [sys-ocaml-version "4.08.0" "Set through 'opam var'"]]
489
+ [[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'"]]
492
490
### opam option 'eval-variables=[dolore ["mania"] "alica"]'
493
491
Set to '[dolore ["mania"] "alica"]' the field eval-variables in global configuration
494
492
### opam option eval-variables
@@ -500,8 +498,8 @@ Removed variable dolore in global configuration
500
498
### opam option eval-variables
501
499
[]
502
500
### opam option global-variables
503
- [[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'"] [opam-version "68.79" "Set through 'opam var'"] [ make "make" "Set through 'opam var'"] [jobs "7 " "Set through 'opam var'"] [arch "x86_64" "Set through 'opam var'"] [sys-ocaml-version "4.08.0" "Set through 'opam var'"]]
504
- ### # Check uniable operations
501
+ [[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'"]]
502
+ ### # Check disallowed operations
505
503
### opam option 'variables+={esse: "cillum"}'
506
504
[ERROR] Field variables can't be directly appended to, use `opam var` instead
507
505
# Return code 2 #
@@ -534,10 +532,66 @@ jobs download-command download-jobs archive-mirrors solver-criteria solver-upgra
534
532
[ERROR] There is no option named 'bar'. The allowed options are:
535
533
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
536
534
# Return code 2 #
535
+ ### # Check option shadowing
536
+ ### opam option download-jobs
537
+ 1
538
+ ### opam var download-jobs
539
+ [ERROR] Variable download-jobs not found in the global configuration
540
+ # Return code 5 #
541
+ ### opam var download-jobs=42 --global
542
+ [WARNING] You are setting a variable that has the same name as a global option.
543
+ Did you mean to use `opam option` instead? You can revert this variable using: 'opam var download-jobs= --global'
544
+
545
+ Added '[download-jobs "42" "Set through 'opam var'"]' to field global-variables in global configuration
546
+ ### opam option download-jobs --global
547
+ 1
548
+ ### opam var download-jobs --global
549
+ 42
550
+ ### opam var download-jobs=44 --switch var-option
551
+ [WARNING] You are setting a variable that has the same name as a global option.
552
+ Did you mean to use `opam option` instead? You can revert this variable using: 'opam var download-jobs= --global'
553
+
554
+ Added 'download-jobs: "44"' to field variables in switch var-option
555
+ ### opam var download-jobs --switch var-option
556
+ 44
557
+ ### opam var synopsis --global
558
+ [ERROR] Variable synopsis not found in the global configuration
559
+ # Return code 5 #
560
+ ### opam var 'synopsis="lorem ipsum"' --global
561
+ [WARNING] You are setting a variable that has the same name as a switch option.
562
+ Did you mean to use `opam option` instead? You can revert this variable using: 'opam var synopsis= --switch'
563
+
564
+ Added '[synopsis "\"lorem ipsum\"" "Set through 'opam var'"]' to field global-variables in global configuration
565
+ ### opam var synopsis --global
566
+ "lorem ipsum"
567
+ ### opam option synopsis --switch var-option
568
+ ""
569
+ ### opam var synopsis --switch var-option
570
+ [ERROR] Variable synopsis not found in switch var-option
571
+ # Return code 5 #
572
+ ### opam var 'synopsis="ipsum"' --switch var-option
573
+ [WARNING] You are setting a variable that has the same name as a switch option.
574
+ Did you mean to use `opam option` instead? You can revert this variable using: 'opam var synopsis= --switch'
575
+
576
+ Added 'synopsis: "\"ipsum\""' to field variables in switch var-option
577
+ ### opam option synopsis --switch var-option
578
+ ""
579
+ ### opam var synopsis --switch var-option
580
+ "ipsum"
581
+ ### opam var synopsis= --global -y
582
+ [WARNING] You are setting a variable that has the same name as a switch option.
583
+ Did you mean to use `opam option` instead? You can revert this variable using: 'opam var synopsis= --switch'
584
+
585
+ Removed variable synopsis in global configuration
586
+ ### opam var download-jobs= --global -y
587
+ [WARNING] You are setting a variable that has the same name as a global option.
588
+ Did you mean to use `opam option` instead? You can revert this variable using: 'opam var download-jobs= --global'
589
+
590
+ Removed variable download-jobs in global configuration
537
591
### : when no switch is present
538
592
### opam switch remove var-option -y
539
593
Switch var-option and all its packages will be wiped. Are you sure? [y/n] y
540
- ### opam var | ' +#.*' -> '' | " +[.]exe" -> ""
594
+ ### opam var | ' +#.*' -> '' | " +[.]exe" -> "" | "opam-version.*" -> '\c'
541
595
542
596
<><> Global opam variables ><><><><><><><><><><><><><><><><><><><><><><><><><><>
543
597
arch x86_64
546
600
foo global-foo
547
601
jobs 7
548
602
make make
549
- opam-version 68.79
550
603
os linux
551
604
os-distribution lorem
552
605
os-family ipsum
@@ -577,14 +630,13 @@ PKG:hash
577
630
PKG:dev
578
631
PKG:build-id
579
632
PKG:opamfile
580
- ### opam var --global | ' +#.*' -> '' | " +[.]exe" -> ""
633
+ ### opam var --global | ' +#.*' -> '' | " +[.]exe" -> "" | "opam-version.*" -> '\c'
581
634
arch x86_64
582
635
bin global-bin
583
636
exe
584
637
foo global-foo
585
638
jobs 7
586
639
make make
587
- opam-version 68.79
588
640
os linux
589
641
os-distribution lorem
590
642
os-family ipsum
@@ -615,7 +667,7 @@ depext-run-installs true
615
667
download-command {}
616
668
download-jobs 1
617
669
git-location {}
618
- jobs {}
670
+ jobs 7
619
671
post-build-commands {}
620
672
post-install-commands {}
621
673
post-remove-commands {}
@@ -647,7 +699,7 @@ depext-run-installs true
647
699
download-command {}
648
700
download-jobs 1
649
701
git-location {}
650
- jobs {}
702
+ jobs 7
651
703
post-build-commands {}
652
704
post-install-commands {}
653
705
post-remove-commands {}
0 commit comments