Ticket #38117: a_v_1.1_add-path.diff
File a_v_1.1_add-path.diff, 1.7 KB (added by michaelld (Michael Dickens), 12 years ago) |
---|
-
active_variants-1.1.tcl
45 45 # 46 46 # where 47 47 # $name 48 # is the name of the port you're trying to check (required) 48 # is the name of the port you're trying to check (required), which can be 49 # specified as either just the port, or via "(bin:lib:path):FOO:port" 50 # as accepted by the dependency parser. 49 51 # $required 50 52 # is a list of variants that must be enabled for the test to succeed 51 53 # (required; remember this can also be a space-separated string or just … … 104 106 # same time). This explains the [lindex $active_list 0] in the following 105 107 # block. 106 108 109 # get the port which will provide $name 110 set port [_get_dep_port $name] 111 if {$port == ""} { 112 ui_error "active_variants: Error: invalid port name '${name}'" 113 ui_error " expecting either: port or (bin:lib:path):FOO:port" 114 return 0 115 } 116 if {$name != $port} { 117 ui_debug "Checking $port for active variants for depspec '$name'" 118 } 119 107 120 # this will throw if $name isn't active 108 set installed [lindex [registry_active $ name] 0]121 set installed [lindex [registry_active $port] 0] 109 122 110 123 # In $installed there are in order: name, version, revision, variants, 111 124 # a boolean indicating whether the port is installed and the epoch. So, 112 125 # we're interested in the field at offset 3. 113 126 set variants [lindex $installed 3] 114 ui_debug "$ nameis installed with the following variants: $variants"127 ui_debug "$port is installed with the following variants: $variants" 115 128 ui_debug " required: $required, forbidden: $forbidden" 116 129 117 130 # split by "+" into the separate variant names