[36952] branches/variant-descs-14482/base/src/port/port.tcl
raimue at macports.org
raimue at macports.org
Tue May 20 19:20:27 PDT 2008
Revision: 36952
http://trac.macosforge.org/projects/macports/changeset/36952
Author: raimue at macports.org
Date: 2008-05-20 19:20:27 -0700 (Tue, 20 May 2008)
Log Message:
-----------
port/port.tcl:
Remove get_variant_desc, this will now be done in port1.0/portutil.tcl instead
Modified Paths:
--------------
branches/variant-descs-14482/base/src/port/port.tcl
Modified: branches/variant-descs-14482/base/src/port/port.tcl
===================================================================
--- branches/variant-descs-14482/base/src/port/port.tcl 2008-05-20 22:50:43 UTC (rev 36951)
+++ branches/variant-descs-14482/base/src/port/port.tcl 2008-05-21 02:20:27 UTC (rev 36952)
@@ -450,47 +450,7 @@
return $result
}
-##
-# Get description for a variant from global descriptions file
-#
-# @param porturl url to a port
-# @param variant name
-# @return description from descriptions file or an empty string
-proc get_variant_desc {porturl variant} {
- global variant_descs_global
- set sourcepath [macports::getsourceconfigdir $porturl]
- if {$sourcepath == ""} {
- # protocol does not support global variants
- return ""
- }
- set descfile [file join $sourcepath variant_descriptions.conf]
- if {![info exists variant_descs_global($sourcepath)]} {
- set variant_descs_global($sourcepath) yes
-
- if {[file exists $descfile]} {
- set fd [open $descfile r]
- set lineno 0
- while {[gets $fd line] >= 0} {
- incr lineno
- if {[regexp {^(\w+)([ \t]+(.*))?$} $line match option ignore val] == 1} {
- set variant_descs_global(${sourcepath}_$option) $val
- } else {
- ui_warn "Invalid variant description in $descfile at line $lineno"
- }
- }
- close $fd
- }
- }
-
- if {[info exists variant_descs_global(${sourcepath}_${variant})]} {
- return $variant_descs_global(${sourcepath}_${variant})
- } else {
- return ""
- }
-}
-
-
##########################################
# Port selection
##########################################
@@ -1966,11 +1926,6 @@
# print out all the variants
puts "$portname has the variants:"
foreach v $portinfo(variants) {
- if {![info exists descs($v)]} {
- # if description is not set yet, get it from the global source descriptions file
- set descs($v) [get_variant_desc $porturl $v]
- }
-
if {[info exists descs($v)] && $descs($v) != ""} {
puts "\t$v: [string trim $descs($v)]"
} else {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080520/6b74f704/attachment.htm
More information about the macports-changes
mailing list