[107005] trunk/base/src/macports1.0/macports.tcl

larryv at macports.org larryv at macports.org
Thu Jun 13 22:01:26 PDT 2013


Revision: 107005
          https://trac.macports.org/changeset/107005
Author:   larryv at macports.org
Date:     2013-06-13 22:01:26 -0700 (Thu, 13 Jun 2013)
Log Message:
-----------
macports.tcl: Replace simple string commands with equivalent expressions.

Modified Paths:
--------------
    trunk/base/src/macports1.0/macports.tcl

Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl	2013-06-14 04:34:40 UTC (rev 107004)
+++ trunk/base/src/macports1.0/macports.tcl	2013-06-14 05:01:26 UTC (rev 107005)
@@ -778,7 +778,7 @@
 
     # Check command line override for autoclean
     if {[info exists macports::global_options(ports_autoclean)]} {
-        if {![string equal $macports::global_options(ports_autoclean) $portautoclean]} {
+        if {$macports::global_options(ports_autoclean) ne $portautoclean} {
             set macports::portautoclean $macports::global_options(ports_autoclean)
         }
     }
@@ -789,7 +789,7 @@
     }
     # Check command line override for trace
     if {[info exists macports::global_options(ports_trace)]} {
-        if {![string equal $macports::global_options(ports_trace) $porttrace]} {
+        if {$macports::global_options(ports_trace) ne $porttrace} {
             set macports::porttrace $macports::global_options(ports_trace)
         }
     }
@@ -822,7 +822,7 @@
         global macports::portverbose
     }
     if {[info exists macports::ui_options(ports_verbose)]} {
-        if {![string equal $macports::ui_options(ports_verbose) $portverbose]} {
+        if {$macports::ui_options(ports_verbose) ne $portverbose} {
             set macports::portverbose $macports::ui_options(ports_verbose)
         }
     }
@@ -1853,7 +1853,7 @@
         ![catch {$workername eval check_supported_archs} result] && $result == 0 &&
         ![catch {$workername eval eval_targets $target} result] && $result == 0} {
         # If auto-clean mode, clean-up after dependency install
-        if {[string equal $macports::portautoclean "yes"]} {
+        if {$macports::portautoclean eq "yes"} {
             # Make sure we are back in the port path before clean
             # otherwise if the current directory had been changed to
             # inside the port,  the next port may fail when trying to
@@ -1980,7 +1980,7 @@
     }
 
     set clean 0
-    if {[string equal $macports::portautoclean "yes"] && ([string equal $target "install"] || [string equal $target "activate"])} {
+    if {$macports::portautoclean eq "yes" && ($target eq "install" || $target eq "activate")} {
         # If we're doing an install, check if we should clean after
         set clean 1
     }
@@ -3331,7 +3331,7 @@
             set owner [file attributes $prefix -owner]
             set group [file attributes $prefix -group]
             set perms [string range [file attributes $prefix -permissions] end-3 end]
-            if {$tcl_platform(user) ne "root" && ![string equal $tcl_platform(user) $owner]} {
+            if {$tcl_platform(user) ne "root" && $tcl_platform(user) ne $owner} {
                 return -code error "User $tcl_platform(user) does not own $prefix - try using sudo"
             }
             ui_debug "Permissions OK"
@@ -3412,7 +3412,7 @@
         ui_error "$portname is not installed"
         return 3
     }
-    if {![string match {} $depscachename]} {
+    if {$depscachename ne {}} {
         upvar $depscachename depscache
     } else {
         array set depscache {}
@@ -3439,7 +3439,7 @@
     global macports::global_variations
     array set options $optionslist
 
-    if {![string match {} $depscachename]} {
+    if {$depscachename ne {}} {
         upvar $depscachename depscache
     }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130613/b368fb4c/attachment.html>


More information about the macports-changes mailing list