|
|
@@ -204,7 +204,7 @@ proc json_encode_port {port_info {indent ""}} { |
|
|
set first true |
|
|
|
|
|
set json "\{" |
|
|
foreach name {name version variants} { |
|
|
foreach name {name version requested variants} { |
|
|
# Skip empty strings |
|
|
if {$port($name) eq ""} { |
|
|
continue |
|
|
@@ -319,8 +319,8 @@ proc split_variants {variants} { |
|
|
# collection of inactive ports |
|
|
# @returns |
|
|
# a list of installed ports chosen according to the \a active parameter, where each entry is |
|
|
# the list representation of a Tcl array with the keys name, version and variants. The |
|
|
# variants value is encoded using \c split_variants, the version entry has the form |
|
|
# the list representation of a Tcl array with the keys name, version, requested and variants. |
|
|
# The variants value is encoded using \c split_variants, the version entry has the form |
|
|
# "$version_$revision". |
|
|
proc get_installed_ports {active} { |
|
|
set ilist {} |
|
|
@@ -339,8 +339,18 @@ proc get_installed_ports {active} { |
|
|
set iname [lindex $i 0] |
|
|
set iversion [lindex $i 1] |
|
|
set irevision [lindex $i 2] |
|
|
set ivariants [split_variants [lindex $i 3]] |
|
|
lappend results [list name $iname version "${iversion}_${irevision}" variants $ivariants] |
|
|
set ivariants [lindex $i 3] |
|
|
set iepoch [lindex $i 5] |
|
|
|
|
|
set regref [registry::open_entry $iname $iversion $irevision $ivariants $iepoch] |
|
|
if {[registry::property_retrieve $regref "requested"]} { |
|
|
set irequested "true" |
|
|
} else { |
|
|
set irequested "" |
|
|
} |
|
|
set ivariantlist [split_variants $ivariants] |
|
|
|
|
|
lappend results [list name $iname version "${iversion}_${irevision}" requested $irequested variants $ivariantlist] |
|
|
} |
|
|
} |
|
|
|
|
|
|