[69719] trunk/base/src/port/port.tcl
perry at macports.org
perry at macports.org
Wed Jul 14 08:37:47 PDT 2010
Revision: 69719
http://trac.macports.org/changeset/69719
Author: perry at macports.org
Date: 2010-07-14 08:37:46 -0700 (Wed, 14 Jul 2010)
Log Message:
-----------
Natural-order sort ports in portlist_compare. Addresses #25592.
Modified Paths:
--------------
trunk/base/src/port/port.tcl
Modified: trunk/base/src/port/port.tcl
===================================================================
--- trunk/base/src/port/port.tcl 2010-07-14 14:11:48 UTC (rev 69718)
+++ trunk/base/src/port/port.tcl 2010-07-14 15:37:46 UTC (rev 69719)
@@ -413,9 +413,12 @@
proc portlist_compare { a b } {
array set a_ $a
array set b_ $b
- set namecmp [string compare -nocase $a_(name) $b_(name)]
- if {$namecmp != 0} {
- return $namecmp
+ set namecmp [string equal -nocase $a_(name) $b_(name)]
+ if {$namecmp != 1} {
+ if {$a_(name) eq [lindex [lsort -dictionary [list $a_(name) $b_(name)]] 0]} {
+ return -1
+ }
+ return 1
}
set avr_ [split $a_(version) "_"]
set bvr_ [split $b_(version) "_"]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100714/2347a2ea/attachment.html>
More information about the macports-changes
mailing list