[64305] trunk/base/src/registry2.0/receipt_sqlite.tcl
jmr at macports.org
jmr at macports.org
Mon Mar 1 10:09:18 PST 2010
Revision: 64305
http://trac.macports.org/changeset/64305
Author: jmr at macports.org
Date: 2010-03-01 10:09:15 -0800 (Mon, 01 Mar 2010)
Log Message:
-----------
fix problem with eval and empty registry search strings
Modified Paths:
--------------
trunk/base/src/registry2.0/receipt_sqlite.tcl
Modified: trunk/base/src/registry2.0/receipt_sqlite.tcl
===================================================================
--- trunk/base/src/registry2.0/receipt_sqlite.tcl 2010-03-01 17:35:46 UTC (rev 64304)
+++ trunk/base/src/registry2.0/receipt_sqlite.tcl 2010-03-01 18:09:15 UTC (rev 64305)
@@ -64,11 +64,7 @@
# Check to see if an entry exists
proc entry_exists {name version {revision 0} {variants ""}} {
- set searchcmd "registry::entry search"
- foreach key {name version revision variants} {
- append searchcmd " $key [set $key]"
- }
- if {![catch {set ports [eval $searchcmd]}] && [llength $ports] > 0} {
+ if {![catch {set ports [registry::entry search name $name version $version revision $revision variants $variants]}] && [llength $ports] > 0} {
return 1
}
return 0
@@ -153,14 +149,13 @@
set ports [registry::entry installed]
}
} else {
- set searchcmd "registry::entry search"
registry::decode_spec $version version revision variants
- foreach key {name version revision variants} {
- if {[info exists $key] && [set $key] != ""} {
- append searchcmd " $key [set $key]"
+ foreach key {version revision variants} {
+ if {![info exists $key]} {
+ set $key ""
}
}
- if {[catch {set ports [eval $searchcmd]}]} {
+ if {[catch {set ports [registry::entry search name $name version $version revision $revision variants $variants]}]} {
set ports [list]
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100301/1c7c8b17/attachment.html>
More information about the macports-changes
mailing list