@@ -38,10 +38,10 @@ package require macports_util 1.0
38
38
package require msgcat
39
39
package require porttrace 1.0
40
40
41
- set targets [ list ]
42
- set target_uniqid 0
43
-
44
- set all_variants [ list ]
41
+ namespace eval portutil {
42
+ variable targets [ list ]
43
+ variable all_variants [ list ]
44
+ }
45
45
46
46
# ########## External High Level Procedures ###########
47
47
@@ -664,7 +664,7 @@ proc variant {args} {
664
664
}
665
665
666
666
# Finally append the ditem to the dlist.
667
- global all_variants
667
+ global portutil:: all_variants
668
668
lappend all_variants $ditem
669
669
}
670
670
@@ -688,7 +688,7 @@ proc variant_set {name} {
688
688
# variant_remove_ditem name
689
689
# Remove variant name's ditem from the all_variants dlist
690
690
proc variant_remove_ditem {name} {
691
- global all_variants
691
+ global portutil:: all_variants
692
692
set item_index 0
693
693
foreach variant_item $all_variants {
694
694
set item_provides [ditem_key $variant_item provides]
@@ -1656,7 +1656,7 @@ proc recursive_collect_deps {portname {depsfound {}}} \
1656
1656
1657
1657
1658
1658
proc eval_targets {target} {
1659
- global targets subport version revision portvariants
1659
+ global portutil:: targets subport version revision portvariants
1660
1660
set dlist $targets
1661
1661
1662
1662
# the statefile will likely be autocleaned away after install,
@@ -2034,7 +2034,7 @@ proc canonicalize_variants {variants {sign "+"}} {
2034
2034
}
2035
2035
2036
2036
proc eval_variants {variations} {
2037
- global PortInfo all_variants subport
2037
+ global PortInfo portutil:: all_variants subport
2038
2038
set dlist $all_variants
2039
2039
upvar $variations upvariations
2040
2040
lassign [choose_variants $dlist upvariations] chosen negated
@@ -2121,7 +2121,7 @@ proc eval_variants {variations} {
2121
2121
}
2122
2122
2123
2123
proc check_variants {target} {
2124
- global targets ports_force ports_dryrun PortInfo
2124
+ global portutil:: targets ports_force ports_dryrun PortInfo
2125
2125
set result 0
2126
2126
set variations $PortInfo(active_variants)
2127
2127
@@ -2197,7 +2197,7 @@ proc universal_setup {args} {
2197
2197
2198
2198
# constructor for target object
2199
2199
proc target_new {name procedure} {
2200
- global targets
2200
+ global portutil:: targets
2201
2201
set ditem [ditem_create]
2202
2202
2203
2203
ditem_key $ditem name $name
0 commit comments