[48230] trunk/base/src/macports1.0/macports.tcl
blb at macports.org
blb at macports.org
Tue Mar 17 00:51:07 PDT 2009
Revision: 48230
http://trac.macports.org/changeset/48230
Author: blb at macports.org
Date: 2009-03-17 00:51:05 -0700 (Tue, 17 Mar 2009)
Log Message:
-----------
macports1.0/macports.tcl - use registry_installed instead of registry_exists
in _mportinstalled as the latter requires the port's name, version, revision,
and variants to succeed but the former only the port's name; should fix
ticket #17762;
Also remove unneeded res in _mportactive
Modified Paths:
--------------
trunk/base/src/macports1.0/macports.tcl
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2009-03-17 07:29:53 UTC (rev 48229)
+++ trunk/base/src/macports1.0/macports.tcl 2009-03-17 07:51:05 UTC (rev 48230)
@@ -1280,19 +1280,17 @@
proc _mportinstalled {mport} {
# Check for the presense of the port in the registry
set workername [ditem_key $mport workername]
- set res [$workername eval registry_exists \${portname} \${portversion}]
- if {$res != 0} {
- ui_debug "[ditem_key $mport provides] is installed"
- return 1
- } else {
+ if {[catch {set reslist [$workername eval registry_installed \${portname}]}]} {
return 0
+ } else {
+ return [expr [llength $reslist] > 0]
}
}
# Determine if a port is active (only for image mode)
proc _mportactive {mport} {
set workername [ditem_key $mport workername]
- if {[catch {set reslist [$workername eval registry_active \${portname}]} res]} {
+ if {[catch {set reslist [$workername eval registry_active \${portname}]}]} {
return 0
} else {
return [expr [llength $reslist] > 0]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090317/a491d1e3/attachment.html>
More information about the macports-changes
mailing list