<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[116449] trunk/base/src/port1.0</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/116449">116449</a></dd>
<dt>Author</dt> <dd>cal@macports.org</dd>
<dt>Date</dt> <dd>2014-01-25 08:57:17 -0800 (Sat, 25 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>port1.0: Tcl cleanup, from a patch by Gustaf Neumann
 - removed numeric comparisons where not necessary
 - braced expressions to allow for bytecode compilation
 - removed unneeded calls to expr
 - added brackets around if conditions
 - quoted match expressions</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbasesrcport10fetch_commontcl">trunk/base/src/port1.0/fetch_common.tcl</a></li>
<li><a href="#trunkbasesrcport10portbuildtcl">trunk/base/src/port1.0/portbuild.tcl</a></li>
<li><a href="#trunkbasesrcport10portchecksumtcl">trunk/base/src/port1.0/portchecksum.tcl</a></li>
<li><a href="#trunkbasesrcport10portcleantcl">trunk/base/src/port1.0/portclean.tcl</a></li>
<li><a href="#trunkbasesrcport10portconfiguretcl">trunk/base/src/port1.0/portconfigure.tcl</a></li>
<li><a href="#trunkbasesrcport10portdestroottcl">trunk/base/src/port1.0/portdestroot.tcl</a></li>
<li><a href="#trunkbasesrcport10portdistchecktcl">trunk/base/src/port1.0/portdistcheck.tcl</a></li>
<li><a href="#trunkbasesrcport10portdistfilestcl">trunk/base/src/port1.0/portdistfiles.tcl</a></li>
<li><a href="#trunkbasesrcport10portfetchtcl">trunk/base/src/port1.0/portfetch.tcl</a></li>
<li><a href="#trunkbasesrcport10portinstalltcl">trunk/base/src/port1.0/portinstall.tcl</a></li>
<li><a href="#trunkbasesrcport10portlinttcl">trunk/base/src/port1.0/portlint.tcl</a></li>
<li><a href="#trunkbasesrcport10portlivechecktcl">trunk/base/src/port1.0/portlivecheck.tcl</a></li>
<li><a href="#trunkbasesrcport10portloadtcl">trunk/base/src/port1.0/portload.tcl</a></li>
<li><a href="#trunkbasesrcport10portmaintcl">trunk/base/src/port1.0/portmain.tcl</a></li>
<li><a href="#trunkbasesrcport10portmirrortcl">trunk/base/src/port1.0/portmirror.tcl</a></li>
<li><a href="#trunkbasesrcport10portpatchtcl">trunk/base/src/port1.0/portpatch.tcl</a></li>
<li><a href="#trunkbasesrcport10portsandboxtcl">trunk/base/src/port1.0/portsandbox.tcl</a></li>
<li><a href="#trunkbasesrcport10portstartupitemtcl">trunk/base/src/port1.0/portstartupitem.tcl</a></li>
<li><a href="#trunkbasesrcport10porttracetcl">trunk/base/src/port1.0/porttrace.tcl</a></li>
<li><a href="#trunkbasesrcport10portunloadtcl">trunk/base/src/port1.0/portunload.tcl</a></li>
<li><a href="#trunkbasesrcport10portutiltcl">trunk/base/src/port1.0/portutil.tcl</a></li>
<li><a href="#trunkbasesrcport10teststesttcl">trunk/base/src/port1.0/tests/test.tcl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbasesrcport10fetch_commontcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/fetch_common.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/fetch_common.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/fetch_common.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> # percent-encode all characters in str that are not unreserved in URIs
</span><span class="cx"> proc portfetch::percent_encode {str} {
</span><span class="cx">     set outstr &quot;&quot;
</span><del>-    while {[string length $str] &gt; 0} {
</del><ins>+    while {$str ne &quot;&quot;} {
</ins><span class="cx">         set char [string index $str 0]
</span><span class="cx">         set str [string range $str 1 end]
</span><span class="cx">         switch -- $char {
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> # Given a site url and the name of the distfile, assemble url and
</span><span class="cx"> # return it.
</span><span class="cx"> proc portfetch::assemble_url {site distfile} {
</span><del>-    if {[string index $site end] != &quot;/&quot;} {
</del><ins>+    if {[string index $site end] ne &quot;/&quot;} {
</ins><span class="cx">         append site /
</span><span class="cx">     }
</span><span class="cx">     return &quot;${site}[percent_encode ${distfile}]&quot;
</span><span class="lines">@@ -106,11 +106,11 @@
</span><span class="cx">         # tag will be after the last colon after the
</span><span class="cx">         # first slash after the ://
</span><span class="cx">         set lastcolon [string last : $element]
</span><del>-        set aftersep [expr [string first : $element] + 3]
</del><ins>+        set aftersep [expr {[string first : $element] + 3}]
</ins><span class="cx">         set firstslash [string first / $element $aftersep]
</span><span class="cx">         if {$firstslash != -1 &amp;&amp; $firstslash &lt; $lastcolon} {
</span><del>-            set mirror_tag [string range $element [expr $lastcolon + 1] end]
-            set element [string range $element 0 [expr $lastcolon - 1]]
</del><ins>+            set mirror_tag [string range $element $lastcolon+1 end]
+            set element [string range $element 0 $lastcolon-1]
</ins><span class="cx">         } else {
</span><span class="cx">             set mirror_tag &quot;&quot;
</span><span class="cx">         }
</span><span class="lines">@@ -122,9 +122,9 @@
</span><span class="cx">             set mirror_tag &quot;&quot;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if {$mirror_tag == &quot;mirror&quot;} {
</del><ins>+        if {$mirror_tag eq &quot;mirror&quot;} {
</ins><span class="cx">             set thesubdir ${dist_subdir}
</span><del>-        } elseif {$subdir == &quot;&quot; &amp;&amp; $mirror_tag != &quot;nosubdir&quot;} {
</del><ins>+        } elseif {$subdir eq &quot;&quot; &amp;&amp; $mirror_tag ne &quot;nosubdir&quot;} {
</ins><span class="cx">             set thesubdir ${name}
</span><span class="cx">         } else {
</span><span class="cx">             set thesubdir ${subdir}
</span><span class="lines">@@ -192,10 +192,10 @@
</span><span class="cx">         # add in the global, fallback and user-defined mirrors for each tag
</span><span class="cx">         foreach site $site_list {
</span><span class="cx">             if {[regexp {([a-zA-Z]+://.+/?):([0-9A-Za-z_-]+)$} $site match site tag] &amp;&amp; ![info exists extras_added($tag)]} {
</span><del>-                if {$sglobal != &quot;&quot;} {
</del><ins>+                if {$sglobal ne &quot;&quot;} {
</ins><span class="cx">                     set site_list [concat $site_list [mirror_sites $sglobal $tag &quot;&quot; $mirrorfile]]
</span><span class="cx">                 }
</span><del>-                if {$sfallback != &quot;&quot;} {
</del><ins>+                if {$sfallback ne &quot;&quot;} {
</ins><span class="cx">                     set site_list [concat $site_list [mirror_sites $sfallback $tag &quot;&quot; $mirrorfile]]
</span><span class="cx">                 }
</span><span class="cx">                 if {[info exists env($senv)]} {
</span><span class="lines">@@ -247,7 +247,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         foreach site $urllist {
</span><del>-            if {[string range $site 0 6] == &quot;file://&quot;} {
</del><ins>+            if {[string range $site 0 6] eq &quot;file://&quot;} {
</ins><span class="cx">                 set pingtimes(localhost) 0
</span><span class="cx">                 continue
</span><span class="cx">             }
</span><span class="lines">@@ -299,7 +299,7 @@
</span><span class="cx"> 
</span><span class="cx">         set pinglist {}
</span><span class="cx">         foreach site $urllist {
</span><del>-            if {[string range $site 0 6] == &quot;file://&quot;} {
</del><ins>+            if {[string range $site 0 6] eq &quot;file://&quot;} {
</ins><span class="cx">                 set host localhost
</span><span class="cx">             } else {
</span><span class="cx">                 regexp $hostregex $site -&gt; host
</span></span></pre></div>
<a id="trunkbasesrcport10portbuildtcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portbuild.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portbuild.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portbuild.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -69,12 +69,12 @@
</span><span class="cx">     if {!${build.type.add_deps}} {
</span><span class="cx">         return
</span><span class="cx">     }
</span><del>-    if {[option build.type] == &quot;bsd&quot; &amp;&amp; [option os.platform] == &quot;darwin&quot;} {
</del><ins>+    if {[option build.type] eq &quot;bsd&quot; &amp;&amp; [option os.platform] eq &quot;darwin&quot;} {
</ins><span class="cx">         ui_debug &quot;build.type is BSD, adding bin:bsdmake:bsdmake build dependency&quot;
</span><span class="cx">         depends_build-delete bin:bsdmake:bsdmake
</span><span class="cx">         depends_build-append bin:bsdmake:bsdmake
</span><span class="cx">     }
</span><del>-    if {[option build.type] == &quot;gnu&quot; &amp;&amp; [option os.platform] == &quot;freebsd&quot;} {
</del><ins>+    if {[option build.type] eq &quot;gnu&quot; &amp;&amp; [option os.platform] eq &quot;freebsd&quot;} {
</ins><span class="cx">         ui_debug &quot;build.type is GNU, adding bin:gmake:gmake build dependency&quot;
</span><span class="cx">         depends_build-delete bin:gmake:gmake
</span><span class="cx">         depends_build-append bin:gmake:gmake
</span><span class="lines">@@ -87,23 +87,23 @@
</span><span class="cx"> default build.type.add_deps yes
</span><span class="cx"> 
</span><span class="cx"> proc portbuild::build_getmaketype {args} {
</span><del>-    if {[option build.type] == &quot;default&quot;} {
</del><ins>+    if {[option build.type] eq &quot;default&quot;} {
</ins><span class="cx">         return [findBinary make $portutil::autoconf::make_path]
</span><span class="cx">     }
</span><span class="cx">     switch -exact -- [option build.type] {
</span><span class="cx">         bsd {
</span><del>-            if {[option os.platform] == &quot;darwin&quot;} {
</del><ins>+            if {[option os.platform] eq &quot;darwin&quot;} {
</ins><span class="cx">                 return [findBinary bsdmake $portutil::autoconf::bsdmake_path]
</span><del>-            } elseif {[option os.platform] == &quot;freebsd&quot;} {
</del><ins>+            } elseif {[option os.platform] eq &quot;freebsd&quot;} {
</ins><span class="cx">                 return [findBinary make $portutil::autoconf::make_path]
</span><span class="cx">             } else {
</span><span class="cx">                 return [findBinary pmake $portutil::autoconf::bsdmake_path]
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">         gnu {
</span><del>-            if {[option os.platform] == &quot;darwin&quot;} {
</del><ins>+            if {[option os.platform] eq &quot;darwin&quot;} {
</ins><span class="cx">                 return [findBinary gnumake $portutil::autoconf::gnumake_path]
</span><del>-            } elseif {[option os.platform] == &quot;linux&quot;} {
</del><ins>+            } elseif {[option os.platform] eq &quot;linux&quot;} {
</ins><span class="cx">                 return [findBinary make $portutil::autoconf::make_path]
</span><span class="cx">             } else {
</span><span class="cx">                 return [findBinary gmake $portutil::autoconf::gnumake_path]
</span><span class="lines">@@ -111,12 +111,12 @@
</span><span class="cx">         }
</span><span class="cx">         pbx -
</span><span class="cx">         xcode {
</span><del>-            if {[option os.platform] != &quot;darwin&quot;} {
</del><ins>+            if {[option os.platform] ne &quot;darwin&quot;} {
</ins><span class="cx">                 return -code error &quot;[format [msgcat::mc &quot;This port requires 'xcodebuild', which is not available on %s.&quot;] [option os.platform]]&quot;
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             global xcodebuildcmd
</span><del>-            if {$xcodebuildcmd != &quot;none&quot;} {
</del><ins>+            if {$xcodebuildcmd ne &quot;none&quot;} {
</ins><span class="cx">                 return $xcodebuildcmd
</span><span class="cx">             } else {
</span><span class="cx">                 return -code error &quot;xcodebuild was not found on this system!&quot;
</span><span class="lines">@@ -140,7 +140,7 @@
</span><span class="cx">             ui_warn &quot;defaulting to $jobs jobs, consider setting buildmakejobs to a nonzero value in macports.conf&quot;
</span><span class="cx">         }
</span><span class="cx">         if {[info exists memsize] &amp;&amp; $jobs &gt; $memsize / 1000000000 + 1} {
</span><del>-            set jobs [expr $memsize / 1000000000 + 1]
</del><ins>+            set jobs [expr {$memsize / 1000000000 + 1}]
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     if {![string is integer -strict $jobs] || $jobs &lt;= 1} {
</span><span class="lines">@@ -150,8 +150,8 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> proc portbuild::build_getargs {args} {
</span><del>-    if {(([option build.type] == &quot;default&quot; &amp;&amp; [option os.platform] != &quot;freebsd&quot;) || \
-         ([option build.type] == &quot;gnu&quot;)) \
</del><ins>+    if {(([option build.type] eq &quot;default&quot; &amp;&amp; [option os.platform] ne &quot;freebsd&quot;) || \
+         ([option build.type] eq &quot;gnu&quot;)) \
</ins><span class="cx">         &amp;&amp; [regexp &quot;^(/\\S+/|)(g|gnu|)make(\\s+.*|)$&quot; [option build.cmd]]} {
</span><span class="cx">         # Print &quot;Entering directory&quot; lines for better log debugging
</span><span class="cx">         return &quot;-w [option build.target]&quot;
</span></span></pre></div>
<a id="trunkbasesrcport10portchecksumtcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portchecksum.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portchecksum.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portchecksum.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -82,8 +82,8 @@
</span><span class="cx">     set nb_checksum [llength $checksums_str]
</span><span class="cx"> 
</span><span class="cx">     if {[llength $all_dist_files] == 1
</span><del>-        &amp;&amp; [expr $nb_checksum % 2] == 0
-        &amp;&amp; [expr $nb_checksum / 2] &lt;= $checksum_types_count
</del><ins>+        &amp;&amp; [expr {$nb_checksum % 2}] == 0
+        &amp;&amp; [expr {$nb_checksum / 2}] &lt;= $checksum_types_count
</ins><span class="cx">         &amp;&amp; [lsearch -exact $checksum_types [lindex $checksums_str 0]] &gt;= 0} {
</span><span class="cx">         # Convert to format #2
</span><span class="cx">         set checksums_str [linsert $checksums_str 0 [lindex $all_dist_files 0]]
</span><span class="lines">@@ -226,7 +226,7 @@
</span><span class="cx"> 
</span><span class="cx">     # if everything is fine with the syntax, keep on and check the checksum of
</span><span class="cx">     # the distfiles.
</span><del>-    if {[parse_checksums $checksums_str] == &quot;yes&quot;} {
</del><ins>+    if {[parse_checksums $checksums_str] eq &quot;yes&quot;} {
</ins><span class="cx">         set distpath [option distpath]
</span><span class="cx"> 
</span><span class="cx">         foreach distfile $all_dist_files {
</span><span class="lines">@@ -268,7 +268,7 @@
</span><span class="cx">                     # Used for regression testing
</span><span class="cx">                     ui_debug &quot;[format [msgcat::mc &quot;Calculated (%s) is %s&quot;] $type $calculated_sum]&quot;
</span><span class="cx"> 
</span><del>-                    if {[string equal $sum $calculated_sum]} {
</del><ins>+                    if {$sum eq $calculated_sum} {
</ins><span class="cx">                         ui_debug &quot;[format [msgcat::mc &quot;Correct (%s) checksum for %s&quot;] $type $distfile]&quot;
</span><span class="cx">                     } else {
</span><span class="cx">                         ui_error &quot;[format [msgcat::mc &quot;Checksum (%s) mismatch for %s&quot;] $type $distfile]&quot;
</span></span></pre></div>
<a id="trunkbasesrcport10portcleantcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portclean.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portclean.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portclean.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -67,26 +67,26 @@
</span><span class="cx">         ui_warn &quot;Only cleaning in ~/.macports; insufficient privileges for standard locations&quot;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if {[info exists ports_clean_all] &amp;&amp; $ports_clean_all == &quot;yes&quot; || \
-        [info exists ports_clean_dist] &amp;&amp; $ports_clean_dist == &quot;yes&quot;} {
</del><ins>+    if {[info exists ports_clean_all] &amp;&amp; $ports_clean_all eq &quot;yes&quot; || \
+        [info exists ports_clean_dist] &amp;&amp; $ports_clean_dist eq &quot;yes&quot;} {
</ins><span class="cx">         ui_info &quot;$UI_PREFIX [format [msgcat::mc &quot;Removing distfiles for %s&quot;] [option subport]]&quot;
</span><span class="cx">         clean_dist
</span><span class="cx">     }
</span><del>-    if {([info exists ports_clean_all] &amp;&amp; $ports_clean_all == &quot;yes&quot; || \
-        [info exists ports_clean_archive] &amp;&amp; $ports_clean_archive == &quot;yes&quot;)
</del><ins>+    if {([info exists ports_clean_all] &amp;&amp; $ports_clean_all eq &quot;yes&quot; || \
+        [info exists ports_clean_archive] &amp;&amp; $ports_clean_archive eq &quot;yes&quot;)
</ins><span class="cx">         &amp;&amp; !$usealtworkpath} {
</span><span class="cx">         ui_info &quot;$UI_PREFIX [format [msgcat::mc &quot;Removing temporary archives for %s&quot;] [option subport]]&quot;
</span><span class="cx">         clean_archive
</span><span class="cx">     }
</span><del>-    if {[info exists ports_clean_all] &amp;&amp; $ports_clean_all == &quot;yes&quot; || \
-        [info exists ports_clean_work] &amp;&amp; $ports_clean_work == &quot;yes&quot; || \
-        [info exists ports_clean_archive] &amp;&amp; $ports_clean_archive == &quot;yes&quot; || \
-        [info exists ports_clean_dist] &amp;&amp; $ports_clean_dist == &quot;yes&quot; || \
-        !([info exists ports_clean_logs] &amp;&amp; $ports_clean_logs == &quot;yes&quot;)} {
</del><ins>+    if {[info exists ports_clean_all] &amp;&amp; $ports_clean_all eq &quot;yes&quot; || \
+        [info exists ports_clean_work] &amp;&amp; $ports_clean_work eq &quot;yes&quot; || \
+        [info exists ports_clean_archive] &amp;&amp; $ports_clean_archive eq &quot;yes&quot; || \
+        [info exists ports_clean_dist] &amp;&amp; $ports_clean_dist eq &quot;yes&quot; || \
+        !([info exists ports_clean_logs] &amp;&amp; $ports_clean_logs eq &quot;yes&quot;)} {
</ins><span class="cx">          ui_info &quot;$UI_PREFIX [format [msgcat::mc &quot;Removing work directory for %s&quot;] [option subport]]&quot;
</span><span class="cx">          clean_work
</span><span class="cx">     }
</span><del>-    if {(([info exists ports_clean_logs] &amp;&amp; $ports_clean_logs == &quot;yes&quot;) || ($keeplogs == &quot;no&quot;))
</del><ins>+    if {(([info exists ports_clean_logs] &amp;&amp; $ports_clean_logs eq &quot;yes&quot;) || ($keeplogs eq &quot;no&quot;))
</ins><span class="cx">         &amp;&amp; !$usealtworkpath} {
</span><span class="cx">         clean_logs
</span><span class="cx">     }
</span><span class="lines">@@ -165,7 +165,7 @@
</span><span class="cx">     # or if user forces us to
</span><span class="cx">     set dirlist [list]
</span><span class="cx">     if {$dist_subdir != $name} {
</span><del>-        if {!([info exists ports_force] &amp;&amp; $ports_force == &quot;yes&quot;)
</del><ins>+        if {!([info exists ports_force] &amp;&amp; $ports_force eq &quot;yes&quot;)
</ins><span class="cx">             &amp;&amp; [file isdirectory $distpath]
</span><span class="cx">             &amp;&amp; [llength [readdir $distpath]] &gt; 0} {
</span><span class="cx">             ui_warn [format [msgcat::mc &quot;Distfiles directory '%s' may contain distfiles needed for other ports, use the -f flag to force removal&quot; ] $distpath]
</span><span class="lines">@@ -291,7 +291,7 @@
</span><span class="cx">             # delete anything ending in .TMP since those are incomplete and
</span><span class="cx">             # thus can't be checked and aren't useful anyway.
</span><span class="cx">             set archivetype [string range [file extension $path] 1 end]
</span><del>-            if {[file isfile $path] &amp;&amp; ($archivetype == &quot;TMP&quot;
</del><ins>+            if {[file isfile $path] &amp;&amp; ($archivetype eq &quot;TMP&quot;
</ins><span class="cx">                 || [extract_archive_metadata $path $archivetype portname] == $subport)} {
</span><span class="cx">                 ui_debug &quot;Removing archive: $path&quot;
</span><span class="cx">                 if {[catch {delete $path} result]} {
</span></span></pre></div>
<a id="trunkbasesrcport10portconfiguretcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portconfigure.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portconfigure.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portconfigure.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -246,10 +246,10 @@
</span><span class="cx">     if {${configure.ccache}} {
</span><span class="cx">         # Create ccache directory with correct permissions with root privileges
</span><span class="cx">         elevateToRoot &quot;configure ccache&quot;
</span><del>-        if [catch {
</del><ins>+        if {[catch {
</ins><span class="cx">                 file mkdir ${ccache_dir}
</span><span class="cx">                 file attributes ${ccache_dir} -owner ${macportsuser} -permissions 0755
</span><del>-            } result] {
</del><ins>+            } result]} {
</ins><span class="cx">             ui_warn &quot;ccache_dir ${ccache_dir} could not be created; disabling ccache: $result&quot;
</span><span class="cx">             set configure.ccache no
</span><span class="cx">         }
</span><span class="lines">@@ -257,9 +257,9 @@
</span><span class="cx"> 
</span><span class="cx">         # Initialize ccache directory with the given maximum size
</span><span class="cx">         if {${configure.ccache}} {
</span><del>-            if [catch {
</del><ins>+            if {[catch {
</ins><span class="cx">                 exec ccache -M ${ccache_size} &gt;/dev/null
</span><del>-            } result] {
</del><ins>+            } result]} {
</ins><span class="cx">                 ui_warn &quot;ccache_dir ${ccache_dir} could not be initialized; disabling ccache: $result&quot;
</span><span class="cx">                 set configure.ccache no
</span><span class="cx">             }
</span><span class="lines">@@ -272,7 +272,7 @@
</span><span class="cx"> # universal_archs
</span><span class="cx"> proc portconfigure::choose_supported_archs {archs} {
</span><span class="cx">     global supported_archs
</span><del>-    if {$supported_archs == &quot;&quot;} {
</del><ins>+    if {$supported_archs eq &quot;&quot;} {
</ins><span class="cx">         return $archs
</span><span class="cx">     }
</span><span class="cx">     set ret {}
</span><span class="lines">@@ -354,7 +354,7 @@
</span><span class="cx">     global configure.universal_archs
</span><span class="cx">     set flags &quot;&quot;
</span><span class="cx">     foreach arch ${configure.universal_archs} {
</span><del>-        if {$flags == &quot;&quot;} {
</del><ins>+        if {$flags eq &quot;&quot;} {
</ins><span class="cx">             set flags &quot;-arch $arch&quot;
</span><span class="cx">         } else {
</span><span class="cx">             append flags &quot; -arch $arch&quot;
</span><span class="lines">@@ -397,7 +397,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> proc portconfigure::compiler_is_port {compiler} {
</span><del>-    return [expr {[portconfigure::compiler_port_name ${compiler}] != &quot;&quot;}]
</del><ins>+    return [expr {[portconfigure::compiler_port_name ${compiler}] ne &quot;&quot;}]
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> # internal function to determine the default compiler
</span><span class="lines">@@ -431,7 +431,7 @@
</span><span class="cx">     global xcodeversion macosx_deployment_target default_compilers configure.sdkroot
</span><span class="cx">     if {[info exists default_compilers]} {
</span><span class="cx">         return $default_compilers
</span><del>-    } elseif {$xcodeversion == &quot;none&quot; || $xcodeversion == &quot;&quot;} {
</del><ins>+    } elseif {$xcodeversion eq &quot;none&quot; || $xcodeversion eq &quot;&quot;} {
</ins><span class="cx">         return {cc}
</span><span class="cx">     } elseif {[vercmp $xcodeversion 5.0] &gt;= 0} {
</span><span class="cx">         return {clang macports-llvm-gcc-4.2 apple-gcc-4.2 macports-clang-3.3}
</span><span class="lines">@@ -744,7 +744,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         # Add flags to specify C++ STL implementation
</span><del>-        if {${configure.cxx_stdlib} ne {} &amp;&amp; [string match *clang* [option configure.cxx]]} {
</del><ins>+        if {${configure.cxx_stdlib} ne {} &amp;&amp; [string match &quot;*clang*&quot; [option configure.cxx]]} {
</ins><span class="cx">             append_to_environment_value configure CXXFLAGS -stdlib=${configure.cxx_stdlib}
</span><span class="cx">             append_to_environment_value configure OBJCXXFLAGS -stdlib=${configure.cxx_stdlib}
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkbasesrcport10portdestroottcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portdestroot.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portdestroot.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portdestroot.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -93,8 +93,8 @@
</span><span class="cx"> set_ui_prefix
</span><span class="cx"> 
</span><span class="cx"> proc portdestroot::destroot_getargs {args} {
</span><del>-    if {(([option build.type] == &quot;default&quot; &amp;&amp; [option os.platform] != &quot;freebsd&quot;) || \
-         ([option build.type] == &quot;gnu&quot;)) \
</del><ins>+    if {(([option build.type] eq &quot;default&quot; &amp;&amp; [option os.platform] ne &quot;freebsd&quot;) || \
+         ([option build.type] eq &quot;gnu&quot;)) \
</ins><span class="cx">         &amp;&amp; [regexp &quot;^(/\\S+/|)(g|gnu|)make(\\s+.*|)$&quot; [option destroot.cmd]]} {
</span><span class="cx">         # Print &quot;Entering directory&quot; lines for better log debugging
</span><span class="cx">         return &quot;-w [option destroot.target]&quot;
</span><span class="lines">@@ -163,7 +163,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     foreach fileToDelete {share/info/dir lib/charset.alias} {
</span><del>-        if [file exists &quot;${destroot}${prefix}/${fileToDelete}&quot;] {
</del><ins>+        if {[file exists &quot;${destroot}${prefix}/${fileToDelete}&quot;]} {
</ins><span class="cx">             ui_debug &quot;Deleting stray ${fileToDelete} file.&quot;
</span><span class="cx">             file delete &quot;${destroot}${prefix}/${fileToDelete}&quot;
</span><span class="cx">         }
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx">     # Prevent overlinking due to glibtool .la files: https://trac.macports.org/ticket/38010
</span><span class="cx">     ui_debug &quot;Fixing glibtool .la files in destroot for ${subport}&quot;
</span><span class="cx">     fs-traverse -depth fullpath ${destroot} {
</span><del>-        if {[file extension $fullpath] == &quot;.la&quot; &amp;&amp; [file type $fullpath] == &quot;file&quot;} {
</del><ins>+        if {[file extension $fullpath] eq &quot;.la&quot; &amp;&amp; [file type $fullpath] eq &quot;file&quot;} {
</ins><span class="cx">             # Make sure it is from glibtool ... &quot;a libtool library file&quot; will appear in the first line
</span><span class="cx">             if {![catch {set fp [open $fullpath]}]} {
</span><span class="cx">                 if {[gets $fp line] &gt; 0 &amp;&amp; [string first &quot;a libtool library file&quot; $line] != -1} {
</span><span class="lines">@@ -201,7 +201,7 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     fs-traverse -depth dir ${destroot} {
</span><del>-        if {[file type $dir] == &quot;directory&quot;} {
</del><ins>+        if {[file type $dir] eq &quot;directory&quot;} {
</ins><span class="cx">             catch {file delete $dir}
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -221,18 +221,18 @@
</span><span class="cx">     set gzip [findBinary gzip ${portutil::autoconf::gzip_path}]
</span><span class="cx">     set gunzip &quot;$gzip -d&quot;
</span><span class="cx">     set bunzip2 &quot;[findBinary bzip2 ${portutil::autoconf::bzip2_path}] -d&quot;
</span><del>-    if {[file isdirectory ${manpath}] &amp;&amp; [file type ${manpath}] == &quot;directory&quot;} {
</del><ins>+    if {[file isdirectory ${manpath}] &amp;&amp; [file type ${manpath}] eq &quot;directory&quot;} {
</ins><span class="cx">         ui_info &quot;$UI_PREFIX [format [msgcat::mc &quot;Compressing man pages for %s&quot;] ${subport}]&quot;
</span><span class="cx">         set found 0
</span><span class="cx">         set manlinks [list]
</span><span class="cx">         foreach mandir [readdir &quot;${manpath}&quot;] {
</span><span class="cx">             if {![regexp {^(cat|man)(.)$} ${mandir} match ignore manindex]} { continue }
</span><span class="cx">             set mandirpath [file join ${manpath} ${mandir}]
</span><del>-            if {[file isdirectory ${mandirpath}] &amp;&amp; [file type ${mandirpath}] == &quot;directory&quot;} {
</del><ins>+            if {[file isdirectory ${mandirpath}] &amp;&amp; [file type ${mandirpath}] eq &quot;directory&quot;} {
</ins><span class="cx">                 ui_debug &quot;Scanning ${mandir}&quot;
</span><span class="cx">                 foreach manfile [readdir ${mandirpath}] {
</span><span class="cx">                     set manfilepath [file join ${mandirpath} ${manfile}]
</span><del>-                    if {[file isfile ${manfilepath}] &amp;&amp; [file type ${manfilepath}] == &quot;file&quot;} {
</del><ins>+                    if {[file isfile ${manfilepath}] &amp;&amp; [file type ${manfilepath}] eq &quot;file&quot;} {
</ins><span class="cx">                         if {[regexp &quot;^(.*\[.\]${manindex}\[a-z\]*)\[.\]gz\$&quot; ${manfile} gzfile manfile]} {
</span><span class="cx">                             set found 1
</span><span class="cx">                             system &quot;cd ${manpath} &amp;&amp; \
</span><span class="lines">@@ -258,7 +258,7 @@
</span><span class="cx">                                 file attributes ${gzmanfilepath} -permissions $desired
</span><span class="cx">                             }
</span><span class="cx">                         }
</span><del>-                    } elseif {[file type ${manfilepath}] == &quot;link&quot;} {
</del><ins>+                    } elseif {[file type ${manfilepath}] eq &quot;link&quot;} {
</ins><span class="cx">                         lappend manlinks [file join ${mandir} ${manfile}]
</span><span class="cx">                     }
</span><span class="cx">                 }
</span><span class="lines">@@ -336,14 +336,14 @@
</span><span class="cx">                             set mtree_violation &quot;yes&quot;
</span><span class="cx">                         }
</span><span class="cx">                     }
</span><del>-                } elseif {[string equal -length [expr [string length $dfile] + 1] $dfile/ $prefix]} {
</del><ins>+                } elseif {[string equal -length [expr {[string length $dfile] + 1}] $dfile/ $prefix]} {
</ins><span class="cx">                     # we've found a subpath of our prefix
</span><span class="cx">                     lpush pathsToCheck $dfile
</span><span class="cx">                 } else {
</span><span class="cx">                     set dir_allowed no
</span><span class="cx">                     # these files are (at least potentially) outside of the prefix
</span><span class="cx">                     foreach dir &quot;$applications_dir $frameworks_dir /Library/LaunchAgents /Library/LaunchDaemons /Library/StartupItems&quot; {
</span><del>-                        if {[string equal -length [expr [string length $dfile] + 1] $dfile/ $dir]} {
</del><ins>+                        if {[string equal -length [expr {[string length $dfile] + 1}] $dfile/ $dir]} {
</ins><span class="cx">                             # it's a prefix of one of the allowed paths
</span><span class="cx">                             set dir_allowed yes
</span><span class="cx">                             break
</span></span></pre></div>
<a id="trunkbasesrcport10portdistchecktcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portdistcheck.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portdistcheck.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portdistcheck.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">     ui_debug &quot;Portfile modification date is [clock format $port_moddate]&quot;
</span><span class="cx"> 
</span><span class="cx">     set curl_options {}
</span><del>-    if [tbool fetch.ignore_sslcert] {
</del><ins>+    if {[tbool fetch.ignore_sslcert]} {
</ins><span class="cx">         lappend curl_options &quot;--ignore-ssl-cert&quot;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -127,13 +127,13 @@
</span><span class="cx">                 set size $totalsize
</span><span class="cx">                 set humansize &quot;${size}&quot;
</span><span class="cx">             } elseif {$totalsize &lt; 1024*1024} {
</span><del>-                set size [expr $totalsize / 1024.0]
</del><ins>+                set size [expr {$totalsize / 1024.0}]
</ins><span class="cx">                 set humansize [format &quot;%.1fK&quot; $size]
</span><span class="cx">             } elseif {$totalsize &lt; 1024*1024*1024} {
</span><del>-                set size [expr $totalsize / (1024.0*1024.0)]
</del><ins>+                set size [expr {$totalsize / (1024.0*1024.0)}]
</ins><span class="cx">                 set humansize [format &quot;%.1fM&quot; $size]
</span><span class="cx">             } else {
</span><del>-                set size [expr $totalsize / (1024.0*1024.0*1024.0)]
</del><ins>+                set size [expr {$totalsize / (1024.0*1024.0*1024.0)}]
</ins><span class="cx">                 set humansize [format &quot;%.1fG&quot; $size]
</span><span class="cx">             }
</span><span class="cx">             ui_msg &quot;$subport: $humansize&quot;
</span></span></pre></div>
<a id="trunkbasesrcport10portdistfilestcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portdistfiles.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portdistfiles.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portdistfiles.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -57,8 +57,8 @@
</span><span class="cx">            portdbpath dist_subdir all_dist_files
</span><span class="cx">     
</span><span class="cx">     # give up on ports that do not provide URLs
</span><del>-    if {(![info exists master_sites] || $master_sites == &quot;{}&quot;)
-        &amp;&amp; (![info exists patchfiles] || ![info exists patch_sites] || $patch_sites == &quot;{}&quot;)} {
</del><ins>+    if {(![info exists master_sites] || $master_sites eq &quot;{}&quot;)
+        &amp;&amp; (![info exists patchfiles] || ![info exists patch_sites] || $patch_sites eq &quot;{}&quot;)} {
</ins><span class="cx">         return 0
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx">         ui_msg &quot;\[$distfile\] [file join $portdbpath distfiles $dist_subdir $distfile]&quot;
</span><span class="cx"> 
</span><span class="cx">         # print checksums if available
</span><del>-        if {$result == &quot;yes&quot; &amp;&amp; [array get checksums_array $distfile] != &quot;&quot;} {
</del><ins>+        if {$result eq &quot;yes&quot; &amp;&amp; [array get checksums_array $distfile] ne &quot;&quot;} {
</ins><span class="cx">             foreach {type sum} $checksums_array($distfile) {
</span><span class="cx">                 ui_msg &quot; $type: $sum&quot;
</span><span class="cx">             }
</span></span></pre></div>
<a id="trunkbasesrcport10portfetchtcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portfetch.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portfetch.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portfetch.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -170,7 +170,7 @@
</span><span class="cx"> proc portfetch::set_fetch_type {option action args} {
</span><span class="cx">     global os.platform os.major
</span><span class="cx">     if {[string equal ${action} &quot;set&quot;]} {
</span><del>-        if {$args != &quot;standard&quot;} {
</del><ins>+        if {$args ne &quot;standard&quot;} {
</ins><span class="cx">             distfiles
</span><span class="cx">         }
</span><span class="cx">         switch $args {
</span><span class="lines">@@ -230,7 +230,7 @@
</span><span class="cx">                 set distsite [getdisttag $file]
</span><span class="cx">                 set file [getdistname $file]
</span><span class="cx">                 lappend all_dist_files $file
</span><del>-                if {$distsite != &quot;&quot;} {
</del><ins>+                if {$distsite ne &quot;&quot;} {
</ins><span class="cx">                     lappend fetch_urls $distsite $file
</span><span class="cx">                 } elseif {[info exists patch_sites]} {
</span><span class="cx">                     lappend fetch_urls patch_sites $file
</span><span class="lines">@@ -253,7 +253,7 @@
</span><span class="cx">                 set distsite [getdisttag $file]
</span><span class="cx">                 set file [getdistname $file]
</span><span class="cx">                 lappend all_dist_files $file
</span><del>-                if {$distsite != &quot;&quot;} {
</del><ins>+                if {$distsite ne &quot;&quot;} {
</ins><span class="cx">                     lappend fetch_urls $distsite $file
</span><span class="cx">                 } else {
</span><span class="cx">                     lappend fetch_urls master_sites $file
</span><span class="lines">@@ -390,7 +390,7 @@
</span><span class="cx">     }
</span><span class="cx">     regexp {(.*://)?([[:alnum:].-]+)(:(\d+))?} $proxy_str - - proxy_host - proxy_port
</span><span class="cx">     set ret &quot;--config-option servers:global:http-proxy-host=${proxy_host}&quot;
</span><del>-    if {$proxy_port != &quot;&quot;} {
</del><ins>+    if {$proxy_port ne &quot;&quot;} {
</ins><span class="cx">         append ret &quot; --config-option servers:global:http-proxy-port=${proxy_port}&quot;
</span><span class="cx">     }
</span><span class="cx">     return $ret
</span><span class="lines">@@ -501,7 +501,7 @@
</span><span class="cx">     if {${fetch.remote_time} != &quot;no&quot;} {
</span><span class="cx">         lappend fetch_options &quot;--remote-time&quot;
</span><span class="cx">     }
</span><del>-    if {$portverbose == &quot;yes&quot;} {
</del><ins>+    if {$portverbose eq &quot;yes&quot;} {
</ins><span class="cx">         lappend fetch_options &quot;-v&quot;
</span><span class="cx">     }
</span><span class="cx">     set sorted no
</span></span></pre></div>
<a id="trunkbasesrcport10portinstalltcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portinstall.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portinstall.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portinstall.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -238,7 +238,7 @@
</span><span class="cx">     array set ourvariations $PortInfo(active_variants)
</span><span class="cx">     set vlist [lsort -ascii [array names ourvariations]]
</span><span class="cx">     foreach v $vlist {
</span><del>-        if {$ourvariations($v) == &quot;+&quot;} {
</del><ins>+        if {$ourvariations($v) eq &quot;+&quot;} {
</ins><span class="cx">             puts $fd &quot;@portvariant +${v}&quot;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -263,7 +263,7 @@
</span><span class="cx">     # also save the contents for our own use later
</span><span class="cx">     set installPlist {}
</span><span class="cx">     fs-traverse -depth fullpath $destpath {
</span><del>-        if {[file type $fullpath] == &quot;directory&quot;} {
</del><ins>+        if {[file type $fullpath] eq &quot;directory&quot;} {
</ins><span class="cx">             continue
</span><span class="cx">         }
</span><span class="cx">         set relpath [strsed $fullpath &quot;s|^$destpath/||&quot;]
</span><span class="lines">@@ -310,13 +310,13 @@
</span><span class="cx">     os.platform os.major portarchivetype installPlist
</span><span class="cx"> 
</span><span class="cx">     set oldpwd [pwd]
</span><del>-    if {$oldpwd == &quot;&quot;} {
</del><ins>+    if {$oldpwd eq &quot;&quot;} {
</ins><span class="cx">         set oldpwd $portpath
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     set location [get_portimage_path]
</span><span class="cx">     set archive_path [find_portarchive_path]
</span><del>-    if {$archive_path != &quot;&quot;} {
</del><ins>+    if {$archive_path ne &quot;&quot;} {
</ins><span class="cx">         set install_dir [file dirname $location]
</span><span class="cx">         file mkdir $install_dir
</span><span class="cx">         file rename -force $archive_path $install_dir
</span><span class="lines">@@ -336,7 +336,7 @@
</span><span class="cx">         if {[info exists $deplist]} {
</span><span class="cx">             foreach dep [set $deplist] {
</span><span class="cx">                 set dep_portname [_get_dep_port $dep]
</span><del>-                if {$dep_portname != &quot;&quot;} {
</del><ins>+                if {$dep_portname ne &quot;&quot;} {
</ins><span class="cx">                     lappend dep_portnames $dep_portname
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="lines">@@ -356,7 +356,7 @@
</span><span class="cx">         $regref os_major ${os.major}
</span><span class="cx">         $regref archs [get_canonical_archs]
</span><span class="cx">         # Trick to have a portable GMT-POSIX epoch-based time.
</span><del>-        $regref date [expr [clock scan now -gmt true] - [clock scan &quot;1970-1-1 00:00:00&quot; -gmt true]]
</del><ins>+        $regref date [expr {[clock scan now -gmt true] - [clock scan &quot;1970-1-1 00:00:00&quot; -gmt true]}]
</ins><span class="cx">         if {[info exists negated_variants]} {
</span><span class="cx">             $regref negated_variants $negated_variants
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkbasesrcport10portlinttcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portlint.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portlint.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portlint.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -138,7 +138,7 @@
</span><span class="cx">             if {$nitpick} {
</span><span class="cx">                 seek $f -1 end
</span><span class="cx">                 set last [read $f 1]
</span><del>-                if {![string match &quot;\n&quot; $last]} {
</del><ins>+                if {&quot;\n&quot; ne $last} {
</ins><span class="cx">                     ui_warn &quot;Line $lineno has missing newline (at end of file)&quot;
</span><span class="cx">                     incr warnings
</span><span class="cx">                 }
</span><span class="lines">@@ -153,12 +153,12 @@
</span><span class="cx">             incr errors
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if {($require_after == &quot;PortSystem&quot; || $require_after == &quot;PortGroup&quot;) &amp;&amp; \
</del><ins>+        if {($require_after eq &quot;PortSystem&quot; || $require_after eq &quot;PortGroup&quot;) &amp;&amp; \
</ins><span class="cx">             [string match &quot;PortGroup*&quot; $line]} {
</span><span class="cx">             set require_blank false
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if {$nitpick &amp;&amp; $require_blank &amp;&amp; ($line != &quot;&quot;)} {
</del><ins>+        if {$nitpick &amp;&amp; $require_blank &amp;&amp; ($line ne &quot;&quot;)} {
</ins><span class="cx">             ui_warn &quot;Line $lineno should be a newline (after $require_after)&quot;
</span><span class="cx">             incr warnings
</span><span class="cx">         }
</span><span class="lines">@@ -228,7 +228,7 @@
</span><span class="cx">         if {[string match &quot;long_description*&quot; $line]} {
</span><span class="cx">             set in_description true
</span><span class="cx">         }
</span><del>-        if {$in_description &amp;&amp; ([string range $line end end] != &quot;\\&quot;)} {
</del><ins>+        if {$in_description &amp;&amp; ([string range $line end end] ne &quot;\\&quot;)} {
</ins><span class="cx">             set in_description false
</span><span class="cx">             #set require_blank true
</span><span class="cx">             #set require_after &quot;long_description&quot;
</span><span class="lines">@@ -245,7 +245,7 @@
</span><span class="cx">         
</span><span class="cx">         if {[string match &quot;platform\[ \t\]*&quot; $line]} {
</span><span class="cx">             regexp {platform\s+(?:\w+\s+(?:\w+\s+)?)?(\w+)} $line -&gt; platform_arch
</span><del>-            if {$platform_arch == &quot;ppc&quot;} {
</del><ins>+            if {$platform_arch eq &quot;ppc&quot;} {
</ins><span class="cx">                 ui_error &quot;Arch 'ppc' in platform on line $lineno should be 'powerpc'&quot;
</span><span class="cx">                 incr errors
</span><span class="cx">             }
</span><span class="lines">@@ -334,7 +334,7 @@
</span><span class="cx"> 
</span><span class="cx">     foreach req_var $lint_required {
</span><span class="cx"> 
</span><del>-        if {$req_var == &quot;master_sites&quot;} {
</del><ins>+        if {$req_var eq &quot;master_sites&quot;} {
</ins><span class="cx">             if {${fetch.type} != &quot;standard&quot;} {
</span><span class="cx">                 ui_info &quot;OK: $req_var not required for fetch.type ${fetch.type}&quot;
</span><span class="cx">                 continue
</span><span class="lines">@@ -401,7 +401,7 @@
</span><span class="cx">     foreach variant $all_variants {
</span><span class="cx">         set variantname [ditem_key $variant name] 
</span><span class="cx">         set variantdesc [lindex [ditem_key $variant description] 0]
</span><del>-        if {![info exists variantname] || $variantname == &quot;&quot;} {
</del><ins>+        if {![info exists variantname] || $variantname eq &quot;&quot;} {
</ins><span class="cx">             ui_error &quot;Variant number $variantnumber does not have a name&quot;
</span><span class="cx">             incr errors
</span><span class="cx">         } else {
</span><span class="lines">@@ -414,18 +414,18 @@
</span><span class="cx">                 set name_ok false
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            if {![info exists variantdesc] || $variantdesc == &quot;&quot;} {
</del><ins>+            if {![info exists variantdesc] || $variantdesc eq &quot;&quot;} {
</ins><span class="cx">                 # don't warn about missing descriptions for global variants
</span><span class="cx">                 if {[lsearch -exact $local_variants $variantname] != -1 &amp;&amp;
</span><del>-                    [variant_desc $porturl $variantname] == &quot;&quot;} {
</del><ins>+                    [variant_desc $porturl $variantname] eq &quot;&quot;} {
</ins><span class="cx">                     ui_warn &quot;Variant $variantname does not have a description&quot;
</span><span class="cx">                     incr warnings
</span><span class="cx">                     set desc_ok false
</span><del>-                } elseif {$variantdesc == &quot;&quot;} {
</del><ins>+                } elseif {$variantdesc eq &quot;&quot;} {
</ins><span class="cx">                     set variantdesc &quot;(pre-defined variant)&quot;
</span><span class="cx">                 }
</span><span class="cx">             } else {
</span><del>-                if {[variant_desc $porturl $variantname] != &quot;&quot;} {
</del><ins>+                if {[variant_desc $porturl $variantname] ne &quot;&quot;} {
</ins><span class="cx">                     ui_warn &quot;Variant $variantname overrides global description&quot;
</span><span class="cx">                     incr warnings
</span><span class="cx">                 }
</span><span class="lines">@@ -470,7 +470,7 @@
</span><span class="cx">             ui_debug &quot;$errorInfo&quot;
</span><span class="cx">             continue
</span><span class="cx">         }
</span><del>-        if {$res == &quot;&quot;} {
</del><ins>+        if {$res eq &quot;&quot;} {
</ins><span class="cx">             ui_error &quot;Unknown dependency: $dep&quot;
</span><span class="cx">             incr errors
</span><span class="cx">         } else {
</span><span class="lines">@@ -509,19 +509,19 @@
</span><span class="cx">                 $addr == &quot;openmaintainer@macports.org&quot;} {
</span><span class="cx">             ui_warn &quot;Using full email address for no/open maintainer&quot;
</span><span class="cx">             incr warnings
</span><del>-        } elseif [regexp &quot;^(.+)@macports.org$&quot; $addr -&gt; localpart] {
</del><ins>+        } elseif {[regexp &quot;^(.+)@macports.org$&quot; $addr -&gt; localpart]} {
</ins><span class="cx">             ui_warn &quot;Maintainer email address for $localpart includes @macports.org&quot;
</span><span class="cx">             incr warnings
</span><span class="cx">         } elseif {$addr == &quot;darwinports@opendarwin.org&quot;} {
</span><span class="cx">             ui_warn &quot;Using legacy email address for no/open maintainer&quot;
</span><span class="cx">             incr warnings
</span><del>-        } elseif [regexp &quot;^(.+)@(.+)$&quot; $addr -&gt; localpart domain] {
</del><ins>+        } elseif {[regexp &quot;^(.+)@(.+)$&quot; $addr -&gt; localpart domain]} {
</ins><span class="cx">             ui_warn &quot;Maintainer email address should be obfuscated as $domain:$localpart&quot;
</span><span class="cx">             incr warnings
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if {$license == &quot;unknown&quot;} {
</del><ins>+    if {$license eq &quot;unknown&quot;} {
</ins><span class="cx">         ui_warn &quot;no license set&quot;
</span><span class="cx">         incr warnings
</span><span class="cx">     } else {
</span><span class="lines">@@ -547,7 +547,7 @@
</span><span class="cx">                         # if the last character of license name is a number or plus sign
</span><span class="cx">                         # then a hyphen is missing
</span><span class="cx">                         set license_end [string index $subtest end]
</span><del>-                        if {[string equal &quot;+&quot; $license_end] || [string is integer -strict $license_end]} {
</del><ins>+                        if {&quot;+&quot; eq $license_end || [string is integer -strict $license_end]} {
</ins><span class="cx">                             ui_error &quot;invalid license '${test}': missing hyphen before version&quot;
</span><span class="cx">                         }
</span><span class="cx">                     }
</span><span class="lines">@@ -601,7 +601,7 @@
</span><span class="cx">         set refcount  [lindex [set ${deprecated_options_name}($option)] 1]
</span><span class="cx"> 
</span><span class="cx">         if {$refcount &gt; 0} {
</span><del>-            if {$newoption != &quot;&quot;} {
</del><ins>+            if {$newoption ne &quot;&quot;} {
</ins><span class="cx">                 ui_warn &quot;Using deprecated option '$option', superseded by '$newoption'&quot;
</span><span class="cx">             } else {
</span><span class="cx">                 ui_warn &quot;Using deprecated option '$option'&quot;
</span><span class="lines">@@ -622,22 +622,22 @@
</span><span class="cx"> 
</span><span class="cx">     set svn_cmd &quot;&quot;
</span><span class="cx">     catch {set svn_cmd [findBinary svn]}
</span><del>-    if {$svn_cmd != &quot;&quot; &amp;&amp; ([file exists $portpath/.svn] || ![catch {exec $svn_cmd info $portpath &gt; /dev/null 2&gt;@1}])} {
</del><ins>+    if {$svn_cmd ne &quot;&quot; &amp;&amp; ([file exists $portpath/.svn] || ![catch {exec $svn_cmd info $portpath &gt; /dev/null 2&gt;@1}])} {
</ins><span class="cx">         ui_debug &quot;Checking svn properties&quot;
</span><del>-        if [catch {exec $svn_cmd propget svn:keywords $portfile 2&gt;@1} output] {
</del><ins>+        if {[catch {exec $svn_cmd propget svn:keywords $portfile 2&gt;@1} output]} {
</ins><span class="cx">             ui_warn &quot;Unable to check for svn:keywords property: $output&quot;
</span><span class="cx">         } else {
</span><span class="cx">             ui_debug &quot;Property svn:keywords is \&quot;$output\&quot;, should be \&quot;Id\&quot;&quot;
</span><del>-            if {$output != &quot;Id&quot;} {
</del><ins>+            if {$output ne &quot;Id&quot;} {
</ins><span class="cx">                 ui_error &quot;Missing subversion property on Portfile, please execute: svn ps svn:keywords Id Portfile&quot;
</span><span class="cx">                 incr errors
</span><span class="cx">             }
</span><span class="cx">         }
</span><del>-        if [catch {exec $svn_cmd propget svn:eol-style $portfile 2&gt;@1} output] {
</del><ins>+        if {[catch {exec $svn_cmd propget svn:eol-style $portfile 2&gt;@1} output]} {
</ins><span class="cx">             ui_warn &quot;Unable to check for svn:eol-style property: $output&quot;
</span><span class="cx">         } else {
</span><span class="cx">             ui_debug &quot;Property svn:eol-style is \&quot;$output\&quot;, should be \&quot;native\&quot;&quot;
</span><del>-            if {$output != &quot;native&quot;} {
</del><ins>+            if {$output ne &quot;native&quot;} {
</ins><span class="cx">                 ui_error &quot;Missing subversion property on Portfile, please execute: svn ps svn:eol-style native Portfile&quot;
</span><span class="cx">                 incr errors
</span><span class="cx">             }
</span></span></pre></div>
<a id="trunkbasesrcport10portlivechecktcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portlivecheck.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portlivecheck.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portlivecheck.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">     ui_debug &quot;Port (livecheck) version is ${livecheck.version}&quot;
</span><span class="cx"> 
</span><span class="cx">     set curl_options {}
</span><del>-    if [tbool livecheck.ignore_sslcert] {
</del><ins>+    if {[tbool livecheck.ignore_sslcert]} {
</ins><span class="cx">         lappend curl_options &quot;--ignore-ssl-cert&quot;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx">                 if {[regexp &quot;^($available_types)(?::(\[^:\]+))?&quot; ${master_site} _ site subdir]} {
</span><span class="cx">                     set subdirs [split $subdir /]
</span><span class="cx">                     if {[llength $subdirs] &gt; 1} {
</span><del>-                        if {[lindex $subdirs 0] == &quot;project&quot;} {
</del><ins>+                        if {[lindex $subdirs 0] eq &quot;project&quot;} {
</ins><span class="cx">                             set subdir [lindex $subdirs 1]
</span><span class="cx">                         } else {
</span><span class="cx">                             set subdir &quot;&quot;
</span></span></pre></div>
<a id="trunkbasesrcport10portloadtcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portload.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portload.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portload.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">     set launchctl_path ${portutil::autoconf::launchctl_path}
</span><span class="cx"> 
</span><span class="cx">     foreach { path } &quot;/Library/${startupitem.location}/${startupitem.plist}&quot; {
</span><del>-        if {[string length $launchctl_path] == 0} {
</del><ins>+        if {$launchctl_path eq &quot;&quot;} {
</ins><span class="cx">             return -code error [format [msgcat::mc &quot;launchctl command was not found by configure&quot;]]
</span><span class="cx">         } elseif {![file exists $path]} {
</span><span class="cx">             return -code error [format [msgcat::mc &quot;Launchd plist %s was not found&quot;] $path]
</span></span></pre></div>
<a id="trunkbasesrcport10portmaintcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portmain.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portmain.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portmain.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx"> default subbuildpath {[portmain::get_subbuildpath]}
</span><span class="cx"> proc portmain::get_subbuildpath {} {
</span><span class="cx">     global portpath portbuildpath subport
</span><del>-    if {$subport != &quot;&quot;} {
</del><ins>+    if {$subport ne &quot;&quot;} {
</ins><span class="cx">         set subdir $subport
</span><span class="cx">     } else {
</span><span class="cx">         set subdir [file tail $portpath]
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx"> default os.endian {$os_endian}
</span><span class="cx"> 
</span><span class="cx"> set macosx_version_text {}
</span><del>-if {[option os.platform] == &quot;darwin&quot;} {
</del><ins>+if {[option os.platform] eq &quot;darwin&quot;} {
</ins><span class="cx">     set macosx_version_text &quot;(Mac OS X ${macosx_version}) &quot;
</span><span class="cx"> }
</span><span class="cx"> ui_debug &quot;OS [option os.platform]/[option os.version] ${macosx_version_text}arch [option os.arch]&quot;
</span><span class="lines">@@ -128,7 +128,7 @@
</span><span class="cx"> default universal_variant {${use_configure}}
</span><span class="cx"> 
</span><span class="cx"> # sub-platforms of darwin
</span><del>-if {[option os.platform] == &quot;darwin&quot;} {
</del><ins>+if {[option os.platform] eq &quot;darwin&quot;} {
</ins><span class="cx">     if {[file isdirectory /System/Library/Frameworks/Carbon.framework]} {
</span><span class="cx">         default os.subplatform macosx
</span><span class="cx">         # we're on Mac OS X and can therefore build universal
</span></span></pre></div>
<a id="trunkbasesrcport10portmirrortcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portmirror.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portmirror.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portmirror.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx">     set mirror_filemap_path [file join $portdbpath distfiles_mirror.db]
</span><span class="cx">     if {![info exists mirror_filemap]
</span><span class="cx">         &amp;&amp; [info exists ports_mirror_new]
</span><del>-        &amp;&amp; $ports_mirror_new == &quot;yes&quot;
</del><ins>+        &amp;&amp; $ports_mirror_new eq &quot;yes&quot;
</ins><span class="cx">         &amp;&amp; [file exists $mirror_filemap_path]} {
</span><span class="cx">         # Trash the map file if it existed.
</span><span class="cx">         file delete -force $mirror_filemap_path
</span></span></pre></div>
<a id="trunkbasesrcport10portpatchtcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portpatch.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portpatch.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portpatch.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">     global UI_PREFIX usealtworkpath altprefix
</span><span class="cx"> 
</span><span class="cx">     # First make sure that patchfiles exists and isn't stubbed out.
</span><del>-    if {![exists patchfiles] || [option patchfiles] == &quot;&quot;} {
</del><ins>+    if {![exists patchfiles] || [option patchfiles] eq &quot;&quot;} {
</ins><span class="cx">         return 0
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbasesrcport10portsandboxtcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portsandbox.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portsandbox.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portsandbox.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> 
</span><span class="cx"> options portsandbox_supported portsandbox_active portsandbox_profile
</span><span class="cx"> default portsandbox_supported {[file executable $portutil::autoconf::sandbox_exec_path]}
</span><del>-default portsandbox_active {[expr $portsandbox_supported &amp;&amp; $sandbox_enable]}
</del><ins>+default portsandbox_active {[expr {$portsandbox_supported &amp;&amp; $sandbox_enable}]}
</ins><span class="cx"> default portsandbox_profile {}
</span><span class="cx"> 
</span><span class="cx"> # set up a suitable profile to pass to sandbox-exec, based on the target
</span></span></pre></div>
<a id="trunkbasesrcport10portstartupitemtcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portstartupitem.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portstartupitem.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portstartupitem.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -231,12 +231,12 @@
</span><span class="cx">     puts ${item} &quot;LOGFILE=\&quot;${startupitem.logfile}\&quot;&quot;
</span><span class="cx">     puts ${item} &quot;EXECUTABLE=\&quot;${startupitem.executable}\&quot;&quot;
</span><span class="cx">     puts ${item} &quot;&quot;
</span><del>-    puts ${item} &quot;HAVE_STARTCMDS=[expr [llength ${startupitem.start}] ? &quot;true&quot; : &quot;false&quot;]&quot;
-    puts ${item} &quot;HAVE_STOPCMDS=[expr [llength ${startupitem.stop}] ? &quot;true&quot; : &quot;false&quot;]&quot;
-    puts ${item} &quot;HAVE_RESTARTCMDS=[expr [llength ${startupitem.restart}] ? &quot;true&quot; : &quot;false&quot;]&quot;
</del><ins>+    puts ${item} &quot;HAVE_STARTCMDS=[expr {[llength ${startupitem.start}] ? &quot;true&quot; : &quot;false&quot;}]&quot;
+    puts ${item} &quot;HAVE_STOPCMDS=[expr {[llength ${startupitem.stop}] ? &quot;true&quot; : &quot;false&quot;}]&quot;
+    puts ${item} &quot;HAVE_RESTARTCMDS=[expr {[llength ${startupitem.restart}] ? &quot;true&quot; : &quot;false&quot;}]&quot;
</ins><span class="cx">     puts ${item} &quot;DELETE_PIDFILE=${createPidFile}&quot;
</span><span class="cx">     puts ${item} &quot;CREATE_PIDFILE=${deletePidFile}&quot;
</span><del>-    puts ${item} &quot;LOG_EVENTS=[expr [tbool ${startupitem.logevents}] ? &quot;true&quot; : &quot;false&quot;]&quot;
</del><ins>+    puts ${item} &quot;LOG_EVENTS=[expr {[tbool ${startupitem.logevents}] ? &quot;true&quot; : &quot;false&quot;}]&quot;
</ins><span class="cx">     puts ${item} &quot;&quot;
</span><span class="cx"> 
</span><span class="cx">     # Emit the init lines
</span></span></pre></div>
<a id="trunkbasesrcport10porttracetcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/porttrace.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/porttrace.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/porttrace.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -272,12 +272,12 @@
</span><span class="cx"> 
</span><span class="cx">         # Skip empty lines.
</span><span class="cx">         if {$line_length &gt; 0} {
</span><del>-            set path_start [expr [string first &quot;\t&quot; $theline] + 1]
-            set op [string range $theline 0 [expr $path_start - 2]]
-            set path [string range $theline $path_start [expr $line_length - 1]]
</del><ins>+            set path_start [expr {[string first &quot;\t&quot; $theline] + 1}]
+            set op [string range $theline 0 $path_start-2]
+            set path [string range $theline $path_start $line_length-1]
</ins><span class="cx"> 
</span><span class="cx">             # open/execve
</span><del>-            if {$op == &quot;open&quot; || $op == &quot;execve&quot;} {
</del><ins>+            if {$op eq &quot;open&quot; || $op eq &quot;execve&quot;} {
</ins><span class="cx">                 # Only work on files.
</span><span class="cx">                 if {[file isfile $path]} {
</span><span class="cx">                     # Did we process the file yet?
</span><span class="lines">@@ -301,7 +301,7 @@
</span><span class="cx">                         catch {filemap set trace_filemap $path $port}
</span><span class="cx">                     }
</span><span class="cx">                 }
</span><del>-            } elseif {$op == &quot;sandbox_violation&quot;} {
</del><ins>+            } elseif {$op eq &quot;sandbox_violation&quot;} {
</ins><span class="cx">                 lappend sandbox_violation_list $path
</span><span class="cx">             }
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkbasesrcport10portunloadtcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portunload.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portunload.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portunload.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">     set launchctl_path ${portutil::autoconf::launchctl_path}
</span><span class="cx"> 
</span><span class="cx">     foreach { path } &quot;/Library/${startupitem.location}/${startupitem.plist}&quot; {
</span><del>-        if {[string length $launchctl_path] == 0} {
</del><ins>+        if {$launchctl_path eq &quot;&quot;} {
</ins><span class="cx">             return -code error [format [msgcat::mc &quot;launchctl command was not found by configure&quot;]]
</span><span class="cx">         } elseif {![file exists $path]} {
</span><span class="cx">             return -code error [format [msgcat::mc &quot;Launchd plist %s was not found&quot;] $path]
</span></span></pre></div>
<a id="trunkbasesrcport10portutiltcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/portutil.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/portutil.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/portutil.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx">             set deprecated_options(${option}-replace) [list ${option}-strsed 0]
</span><span class="cx">         }
</span><span class="cx">         set refcount [lindex $deprecated_options(${option}-replace) 1]
</span><del>-        lset deprecated_options(${option}-replace) 1 [expr $refcount + 1]
</del><ins>+        lset deprecated_options(${option}-replace) 1 [expr {$refcount + 1}]
</ins><span class="cx">         return [eval handle_option-strsed $option $args]
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -252,15 +252,15 @@
</span><span class="cx">     set refcount  [lindex $deprecated_options($option) 1]
</span><span class="cx">     global $newoption
</span><span class="cx"> 
</span><del>-    if {$newoption == &quot;&quot;} {
</del><ins>+    if {$newoption eq &quot;&quot;} {
</ins><span class="cx">         ui_warn &quot;Port $subport using deprecated option \&quot;$option\&quot;.&quot;
</span><span class="cx">         return
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     # Increment reference counter
</span><del>-    lset deprecated_options($option) 1 [expr $refcount + 1]
</del><ins>+    lset deprecated_options($option) 1 [expr {$refcount + 1}]
</ins><span class="cx"> 
</span><del>-    if {$action != &quot;read&quot;} {
</del><ins>+    if {$action ne &quot;read&quot;} {
</ins><span class="cx">         $newoption [set $option]
</span><span class="cx">     } else {
</span><span class="cx">         $option [set $newoption]
</span><span class="lines">@@ -384,12 +384,12 @@
</span><span class="cx">     set command_suffix &quot;&quot;
</span><span class="cx"> 
</span><span class="cx">     if {[llength $args] &gt; 0} {
</span><del>-        if {[lindex $args 0] == &quot;-notty&quot;} {
</del><ins>+        if {[lindex $args 0] eq &quot;-notty&quot;} {
</ins><span class="cx">             set notty &quot;-notty&quot;
</span><span class="cx">             set args [lrange $args 1 end]
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if {[lindex $args 0] == &quot;-varprefix&quot;} {
</del><ins>+        if {[lindex $args 0] eq &quot;-varprefix&quot;} {
</ins><span class="cx">             set varprefix [lindex $args 1]
</span><span class="cx">             set args [lrange $args 2 end]
</span><span class="cx">         }
</span><span class="lines">@@ -435,7 +435,7 @@
</span><span class="cx"> 
</span><span class="cx">     # Prepare nice value change
</span><span class="cx">     set nice &quot;&quot;
</span><del>-    if {[info exists ${varprefix}.nice] &amp;&amp; [set ${varprefix}.nice] != &quot;&quot;} {
</del><ins>+    if {[info exists ${varprefix}.nice] &amp;&amp; [set ${varprefix}.nice] ne &quot;&quot;} {
</ins><span class="cx">         set nice &quot;-nice [set ${varprefix}.nice]&quot;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -529,10 +529,10 @@
</span><span class="cx">             # args is a list of strings/list
</span><span class="cx">             foreach arg $args {
</span><span class="cx">                 # Strip trailing empty lines
</span><del>-                if {[string index $arg 0] == &quot;\n&quot;} {
</del><ins>+                if {[string index $arg 0] eq &quot;\n&quot;} {
</ins><span class="cx">                     set arg [string range $arg 1 end]
</span><span class="cx">                 }
</span><del>-                if {[string index $arg end] == &quot;\n&quot;} {
</del><ins>+                if {[string index $arg end] eq &quot;\n&quot;} {
</ins><span class="cx">                     set arg [string range $arg 0 end-1]
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="lines">@@ -540,13 +540,13 @@
</span><span class="cx">                 set indent &quot;&quot;
</span><span class="cx">                 for {set i 0} {$i &lt; [string length $arg]} {incr i} {
</span><span class="cx">                     set c [string index $arg $i]
</span><del>-                    if {$c != &quot; &quot; &amp;&amp; $c != &quot;\t&quot;} {
</del><ins>+                    if {$c ne &quot; &quot; &amp;&amp; $c ne &quot;\t&quot;} {
</ins><span class="cx">                         break
</span><span class="cx">                     }
</span><span class="cx">                     append indent $c
</span><span class="cx">                 }
</span><span class="cx">                 # Remove indent on first line
</span><del>-                set arg [string replace $arg 0 [expr $i - 1]]
</del><ins>+                set arg [string replace $arg 0 [expr {$i - 1}]]
</ins><span class="cx">                 # Remove indent on each other line
</span><span class="cx">                 set arg [string map &quot;\&quot;\n$indent\&quot; \&quot;\n\&quot;&quot; $arg]
</span><span class="cx"> 
</span><span class="lines">@@ -581,7 +581,7 @@
</span><span class="cx">         return -code error &quot;Malformed variant specification&quot;
</span><span class="cx">     }
</span><span class="cx">     set code [lindex $args end]
</span><del>-    set args [lrange $args 0 [expr $len - 2]]
</del><ins>+    set args [lrange $args 0 $len-2]
</ins><span class="cx"> 
</span><span class="cx">     set ditem [variant_new &quot;temp-variant&quot;]
</span><span class="cx"> 
</span><span class="lines">@@ -629,7 +629,7 @@
</span><span class="cx">         set vdesc [join [ditem_key $ditem description]]
</span><span class="cx"> 
</span><span class="cx">         # read global variant description, if none given
</span><del>-        if {$vdesc == &quot;&quot;} {
</del><ins>+        if {$vdesc eq &quot;&quot;} {
</ins><span class="cx">             set vdesc [variant_desc $porturl $variant_provides]
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -668,7 +668,7 @@
</span><span class="cx"> proc variant_isset {name} {
</span><span class="cx">     global variations
</span><span class="cx"> 
</span><del>-    if {[info exists variations($name)] &amp;&amp; $variations($name) == &quot;+&quot;} {
</del><ins>+    if {[info exists variations($name)] &amp;&amp; $variations($name) eq &quot;+&quot;} {
</ins><span class="cx">         return 1
</span><span class="cx">     }
</span><span class="cx">     return 0
</span><span class="lines">@@ -731,7 +731,7 @@
</span><span class="cx">                 incr lineno
</span><span class="cx">                 set name [lindex $line 0]
</span><span class="cx">                 set desc [lindex $line 1]
</span><del>-                if {$name != &quot;&quot; &amp;&amp; $desc != &quot;&quot;} {
</del><ins>+                if {$name ne &quot;&quot; &amp;&amp; $desc ne &quot;&quot;} {
</ins><span class="cx">                     set variant_descs_global(${descfile}_$name) $desc
</span><span class="cx">                 } else {
</span><span class="cx">                     ui_warn &quot;Invalid variant description in $descfile at line $lineno&quot;
</span><span class="lines">@@ -781,7 +781,7 @@
</span><span class="cx">     }
</span><span class="cx">     set code [lindex $args end]
</span><span class="cx">     set os [lindex $args 0]
</span><del>-    set args [lrange $args 1 [expr $len - 2]]
</del><ins>+    set args [lrange $args 1 $len-2]
</ins><span class="cx"> 
</span><span class="cx">     foreach arg $args {
</span><span class="cx">         if {[regexp {(^[0-9]+$)} $arg match result]} {
</span><span class="lines">@@ -990,7 +990,7 @@
</span><span class="cx"> 
</span><span class="cx">         set cmdline $portutil::autoconf::sed_command
</span><span class="cx">         if {$extended} {
</span><del>-            if {$portutil::autoconf::sed_ext_flag == &quot;N/A&quot;} {
</del><ins>+            if {$portutil::autoconf::sed_ext_flag eq &quot;N/A&quot;} {
</ins><span class="cx">                 ui_debug &quot;sed extended regexp not available&quot;
</span><span class="cx">                 return -code error &quot;reinplace sed(1) too old&quot;
</span><span class="cx">             }
</span><span class="lines">@@ -1010,7 +1010,7 @@
</span><span class="cx">             ui_debug &quot;$errorInfo&quot;
</span><span class="cx">             ui_error &quot;reinplace: $error&quot;
</span><span class="cx">             file delete &quot;$tmpfile&quot;
</span><del>-            if {$locale != &quot;&quot;} {
</del><ins>+            if {$locale ne &quot;&quot;} {
</ins><span class="cx">                 if {$oldlocale_exists} {
</span><span class="cx">                     set env(LC_CTYPE) $oldlocale
</span><span class="cx">                 } else {
</span><span class="lines">@@ -1024,7 +1024,7 @@
</span><span class="cx">             return -code error &quot;reinplace sed(1) failed&quot;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if {$locale != &quot;&quot;} {
</del><ins>+        if {$locale ne &quot;&quot;} {
</ins><span class="cx">             if {$oldlocale_exists} {
</span><span class="cx">                 set env(LC_CTYPE) $oldlocale
</span><span class="cx">             } else {
</span><span class="lines">@@ -1074,7 +1074,7 @@
</span><span class="cx"> # touch
</span><span class="cx"> # mimics the BSD touch command
</span><span class="cx"> proc touch {args} {
</span><del>-    while {[string match -* [lindex $args 0]]} {
</del><ins>+    while {[string match &quot;-*&quot; [lindex $args 0]]} {
</ins><span class="cx">         set arg [string range [lindex $args 0] 1 end]
</span><span class="cx">         set args [lrange $args 1 end]
</span><span class="cx">         switch -- $arg {
</span><span class="lines">@@ -1085,7 +1085,7 @@
</span><span class="cx">             t {
</span><span class="cx">                 set narg [lindex $args 0]
</span><span class="cx">                 set args [lrange $args 1 end]
</span><del>-                if {[string length $narg] == 0} {
</del><ins>+                if {$narg eq &quot;&quot;} {
</ins><span class="cx">                     return -code error &quot;touch: option requires an argument -- $arg&quot;
</span><span class="cx">                 }
</span><span class="cx">                 set options($arg) $narg
</span><span class="lines">@@ -1098,7 +1098,7 @@
</span><span class="cx"> 
</span><span class="cx">     # parse the r/t options
</span><span class="cx">     if {[info exists options(rt)]} {
</span><del>-        if {[string equal $options(rt) r]} {
</del><ins>+        if {$options(rt) eq &quot;r&quot;} {
</ins><span class="cx">             # -r
</span><span class="cx">             # get atime/mtime from the file
</span><span class="cx">             if {[file exists $options(r)]} {
</span><span class="lines">@@ -1113,9 +1113,9 @@
</span><span class="cx">             # turn it into a CCyymmdd hhmmss
</span><span class="cx">             set timespec {^(?:(\d\d)?(\d\d))?(\d\d)(\d\d)(\d\d)(\d\d)(?:\.(\d\d))?$}
</span><span class="cx">             if {[regexp $timespec $options(t) {} CC YY MM DD hh mm SS]} {
</span><del>-                if {[string length $YY] == 0} {
</del><ins>+                if {$YY eq &quot;&quot;} {
</ins><span class="cx">                     set year [clock format [clock seconds] -format %Y]
</span><del>-                } elseif {[string length $CC] == 0} {
</del><ins>+                } elseif {$CC eq &quot;&quot;} {
</ins><span class="cx">                     if {$YY &gt;= 69 &amp;&amp; $YY &lt;= 99} {
</span><span class="cx">                         set year 19$YY
</span><span class="cx">                     } else {
</span><span class="lines">@@ -1124,7 +1124,7 @@
</span><span class="cx">                 } else {
</span><span class="cx">                     set year $CC$YY
</span><span class="cx">                 }
</span><del>-                if {[string length $SS] == 0} {
</del><ins>+                if {$SS eq &quot;&quot;} {
</ins><span class="cx">                     set SS 00
</span><span class="cx">                 }
</span><span class="cx">                 set atime [clock scan &quot;$year$MM$DD $hh$mm$SS&quot;]
</span><span class="lines">@@ -1204,7 +1204,7 @@
</span><span class="cx"> # ln [-f] [-h] [-s] [-v] source_file [target_file]
</span><span class="cx"> # ln [-f] [-h] [-s] [-v] source_file ... target_dir
</span><span class="cx"> proc ln {args} {
</span><del>-    while {[string match -* [lindex $args 0]]} {
</del><ins>+    while {[string match &quot;-*&quot; [lindex $args 0]]} {
</ins><span class="cx">         set arg [string range [lindex $args 0] 1 end]
</span><span class="cx">         if {[string length $arg] &gt; 1} {
</span><span class="cx">             set remainder -[string range $arg 1 end]
</span><span class="lines">@@ -1230,7 +1230,7 @@
</span><span class="cx">         set files $args
</span><span class="cx">         set target ./
</span><span class="cx">     } else {
</span><del>-        set files [lrange $args 0 [expr [llength $args] - 2]]
</del><ins>+        set files [lrange $args 0 [llength $args]-2]
</ins><span class="cx">         set target [lindex $args end]
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1357,11 +1357,11 @@
</span><span class="cx">     set env(HOME) &quot;${workpath}/.home&quot;
</span><span class="cx">     set env(TMPDIR) &quot;${workpath}/.tmp&quot;
</span><span class="cx"> 
</span><del>-    if {[ditem_key $ditem state] != &quot;no&quot;} {
</del><ins>+    if {[ditem_key $ditem state] ne &quot;no&quot;} {
</ins><span class="cx">         set target_state_fd [open_statefile]
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if {$procedure != &quot;&quot;} {
</del><ins>+    if {$procedure ne &quot;&quot;} {
</ins><span class="cx">         set targetname [ditem_key $ditem name]
</span><span class="cx">         set target [ditem_key $ditem provides]
</span><span class="cx">         portsandbox::set_profile $target
</span><span class="lines">@@ -1380,14 +1380,14 @@
</span><span class="cx">         if {$result == 0} {
</span><span class="cx">             # Skip the step if required and explain why through ui_debug.
</span><span class="cx">             # check if the step was already done (as mentioned in the state file)
</span><del>-            if {[ditem_key $ditem state] != &quot;no&quot;
</del><ins>+            if {[ditem_key $ditem state] ne &quot;no&quot;
</ins><span class="cx">                     &amp;&amp; [check_statefile target $targetname $target_state_fd]} {
</span><span class="cx">                 ui_debug &quot;Skipping completed $targetname ($portname)&quot;
</span><span class="cx">                 set skipped 1
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             # Of course, if this is a dry run, don't do the task:
</span><del>-            if {[info exists ports_dryrun] &amp;&amp; $ports_dryrun == &quot;yes&quot;} {
</del><ins>+            if {[info exists ports_dryrun] &amp;&amp; $ports_dryrun eq &quot;yes&quot;} {
</ins><span class="cx">                 # only one message per portname
</span><span class="cx">                 if {$portname != $ports_dry_last_skipped} {
</span><span class="cx">                     ui_notice &quot;For $portname: skipping $targetname (dry run)&quot;
</span><span class="lines">@@ -1472,7 +1472,7 @@
</span><span class="cx">                     # Gather the dependencies for deptypes
</span><span class="cx">                     foreach deptype $deptypes {
</span><span class="cx">                         # Add to the list of dependencies if the option exists and isn't empty.
</span><del>-                        if {[info exists PortInfo($deptype)] &amp;&amp; $PortInfo($deptype) != &quot;&quot;} {
</del><ins>+                        if {[info exists PortInfo($deptype)] &amp;&amp; $PortInfo($deptype) ne &quot;&quot;} {
</ins><span class="cx">                             set depends [concat $depends $PortInfo($deptype)]
</span><span class="cx">                         }
</span><span class="cx">                     }
</span><span class="lines">@@ -1485,7 +1485,7 @@
</span><span class="cx"> 
</span><span class="cx">                         # If portname is empty, the dependency is already satisfied by other means,
</span><span class="cx">                         # for example a bin: dependency on a file not installed by MacPorts
</span><del>-                        if {$name != &quot;&quot;} {
</del><ins>+                        if {$name ne &quot;&quot;} {
</ins><span class="cx">                             if {[lsearch -exact $deplist $name] == -1} {
</span><span class="cx">                                 lappend deplist $name
</span><span class="cx">                                 set deplist [recursive_collect_deps $name $deplist]
</span><span class="lines">@@ -1494,7 +1494,7 @@
</span><span class="cx">                     }
</span><span class="cx"> 
</span><span class="cx">                     # Add ccache port for access to ${prefix}/bin/ccache binary
</span><del>-                    if [option configure.ccache] {
</del><ins>+                    if {[option configure.ccache]} {
</ins><span class="cx">                         lappend deplist ccache
</span><span class="cx">                     }
</span><span class="cx"> 
</span><span class="lines">@@ -1580,8 +1580,8 @@
</span><span class="cx">             # - this step is not to always be performed
</span><span class="cx">             # - this step must be written to file
</span><span class="cx">             if {$skipped == 0
</span><del>-          &amp;&amp; [ditem_key $ditem runtype] != &quot;always&quot;
-          &amp;&amp; [ditem_key $ditem state] != &quot;no&quot;} {
</del><ins>+          &amp;&amp; [ditem_key $ditem runtype] ne &quot;always&quot;
+          &amp;&amp; [ditem_key $ditem state] ne &quot;no&quot;} {
</ins><span class="cx">             write_statefile target $targetname $target_state_fd
</span><span class="cx">             }
</span><span class="cx">         } else {
</span><span class="lines">@@ -1596,7 +1596,7 @@
</span><span class="cx">         set result 1
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if {[ditem_key $ditem state] != &quot;no&quot;} {
</del><ins>+    if {[ditem_key $ditem state] ne &quot;no&quot;} {
</ins><span class="cx">         close $target_state_fd
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1639,10 +1639,10 @@
</span><span class="cx">     # the statefile will likely be autocleaned away after install,
</span><span class="cx">     # so special-case already-completed install and activate
</span><span class="cx">     if {[registry_exists $subport $version $revision $portvariants]} {
</span><del>-        if {$target == &quot;install&quot;} {
</del><ins>+        if {$target eq &quot;install&quot;} {
</ins><span class="cx">             ui_debug &quot;Skipping $target ($subport) since this port is already installed&quot;
</span><span class="cx">             return 0
</span><del>-        } elseif {$target == &quot;activate&quot;} {
</del><ins>+        } elseif {$target eq &quot;activate&quot;} {
</ins><span class="cx">             set regref [registry_open $subport $version $revision $portvariants &quot;&quot;]
</span><span class="cx">             if {[registry_prop_retr $regref active] != 0} {
</span><span class="cx">                 # Something to close the registry entry may be called here, if it existed.
</span><span class="lines">@@ -1660,13 +1660,13 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     # Select the subset of targets under $target
</span><del>-    if {$target != &quot;&quot;} {
</del><ins>+    if {$target ne &quot;&quot;} {
</ins><span class="cx">         set matches [dlist_search $dlist provides $target]
</span><span class="cx"> 
</span><span class="cx">         if {[llength $matches] &gt; 0} {
</span><span class="cx">             set dlist [dlist_append_dependents $dlist [lindex $matches 0] [list]]
</span><span class="cx">             # Special-case 'all'
</span><del>-        } elseif {$target != &quot;all&quot;} {
</del><ins>+        } elseif {$target ne &quot;all&quot;} {
</ins><span class="cx">             ui_error &quot;unknown target: $target&quot;
</span><span class="cx">             return 1
</span><span class="cx">         }
</span><span class="lines">@@ -1961,9 +1961,9 @@
</span><span class="cx">         set ignored 0
</span><span class="cx">         foreach flavor [ditem_key $ditem provides] {
</span><span class="cx">             if {[info exists upvariations($flavor)]} {
</span><del>-                if {$upvariations($flavor) == &quot;+&quot;} {
</del><ins>+                if {$upvariations($flavor) eq &quot;+&quot;} {
</ins><span class="cx">                     incr pros
</span><del>-                } elseif {$upvariations($flavor) == &quot;-&quot;} {
</del><ins>+                } elseif {$upvariations($flavor) eq &quot;-&quot;} {
</ins><span class="cx">                     incr cons
</span><span class="cx">                 }
</span><span class="cx">             } else {
</span><span class="lines">@@ -2119,14 +2119,14 @@
</span><span class="cx">         set ditems [dlist_append_dependents $targets [lindex $ditems 0] [list]]
</span><span class="cx">     }
</span><span class="cx">     foreach d $ditems {
</span><del>-        if {[ditem_key $d state] != &quot;no&quot;} {
</del><ins>+        if {[ditem_key $d state] ne &quot;no&quot;} {
</ins><span class="cx">             # At least one matching target requires the state file
</span><span class="cx">             set statereq 1
</span><span class="cx">             break
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     if { $statereq &amp;&amp;
</span><del>-        !([info exists ports_force] &amp;&amp; $ports_force == &quot;yes&quot;)} {
</del><ins>+        !([info exists ports_force] &amp;&amp; $ports_force eq &quot;yes&quot;)} {
</ins><span class="cx"> 
</span><span class="cx">         set state_fd [open_statefile]
</span><span class="cx"> 
</span><span class="lines">@@ -2134,7 +2134,7 @@
</span><span class="cx">         if {[check_statefile_variants variations oldvariations $state_fd]} {
</span><span class="cx">             ui_error &quot;Requested variants \&quot;[canonicalize_variants [array get variations]]\&quot; do not match original selection \&quot;[canonicalize_variants [array get oldvariations]]\&quot;.\nPlease use the same variants again, perform 'port clean [option subport]' or specify the force option (-f).&quot;
</span><span class="cx">             set result 1
</span><del>-        } elseif {!([info exists ports_dryrun] &amp;&amp; $ports_dryrun == &quot;yes&quot;)} {
</del><ins>+        } elseif {!([info exists ports_dryrun] &amp;&amp; $ports_dryrun eq &quot;yes&quot;)} {
</ins><span class="cx">             # Write variations out to the statefile
</span><span class="cx">             foreach key [array names variations *] {
</span><span class="cx">                 write_statefile variant $variations($key)$key $state_fd
</span><span class="lines">@@ -2189,7 +2189,7 @@
</span><span class="cx">     foreach target $args {
</span><span class="cx">         set origproc [ditem_key $ditem procedure]
</span><span class="cx">         set ident [ditem_key $ditem name]
</span><del>-        if {[info commands $target] == &quot;&quot;} {
</del><ins>+        if {[info commands $target] eq &quot;&quot;} {
</ins><span class="cx">             proc $target {args} &quot;
</span><span class="cx">                 variable proc_index
</span><span class="cx">                 set proc_index \[llength \[ditem_key $ditem proc\]\]
</span><span class="lines">@@ -2314,9 +2314,9 @@
</span><span class="cx"> proc handle_add_users {} {
</span><span class="cx">     set cur &quot;&quot;
</span><span class="cx">     foreach val [option add_users] {
</span><del>-        if {[string match *=* $val] &amp;&amp; $cur != &quot;&quot;} {
</del><ins>+        if {[string match &quot;*=*&quot; $val] &amp;&amp; $cur ne &quot;&quot;} {
</ins><span class="cx">             set split_arg [split $val =]
</span><del>-            if {[lindex $split_arg 0] == &quot;group&quot;} {
</del><ins>+            if {[lindex $split_arg 0] eq &quot;group&quot;} {
</ins><span class="cx">                 set groupname [lindex $split_arg 1]
</span><span class="cx">                 addgroup $groupname
</span><span class="cx">                 lappend args($cur) gid=[existsgroup $groupname]
</span><span class="lines">@@ -2657,7 +2657,7 @@
</span><span class="cx">         close $fd
</span><span class="cx">         file delete -force $tempdir
</span><span class="cx">     }
</span><del>-    if {$metadata_type == &quot;contents&quot;} {
</del><ins>+    if {$metadata_type eq &quot;contents&quot;} {
</ins><span class="cx">         set contents {}
</span><span class="cx">         set ignore 0
</span><span class="cx">         set sep [file separator]
</span><span class="lines">@@ -2673,7 +2673,7 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">         return $contents
</span><del>-    } elseif {$metadata_type == &quot;portname&quot;} {
</del><ins>+    } elseif {$metadata_type eq &quot;portname&quot;} {
</ins><span class="cx">         foreach line [split $raw_contents \n] {
</span><span class="cx">             if {[lindex $line 0] == &quot;@portname&quot;} {
</span><span class="cx">                 return [lindex $line 1]
</span><span class="lines">@@ -2738,7 +2738,7 @@
</span><span class="cx">     set archs &quot;&quot;
</span><span class="cx">     set base_arch &quot;&quot;
</span><span class="cx">     foreach arch ${configure.universal_archs} {
</span><del>-        if [file exists &quot;${base}/${arch}&quot;] {
</del><ins>+        if {[file exists &quot;${base}/${arch}&quot;]} {
</ins><span class="cx">             set archs [concat ${archs} ${arch}]
</span><span class="cx">             set base_arch ${arch}
</span><span class="cx">         }
</span><span class="lines">@@ -2862,7 +2862,7 @@
</span><span class="cx">         }
</span><span class="cx">     } else {
</span><span class="cx">         # not root, so can't set owner/group
</span><del>-        set permissions [lindex $attributes [expr [lsearch $attributes &quot;-permissions&quot;] + 1]]
</del><ins>+        set permissions [lindex $attributes [lsearch $attributes &quot;-permissions&quot;]+1]
</ins><span class="cx">         file attributes $file -permissions $permissions
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -2915,7 +2915,7 @@
</span><span class="cx"> 
</span><span class="cx"> proc validate_macportsuser {} {
</span><span class="cx">     global macportsuser
</span><del>-    if {[getuid] == 0 &amp;&amp; $macportsuser != &quot;root&quot; &amp;&amp; 
</del><ins>+    if {[getuid] == 0 &amp;&amp; $macportsuser ne &quot;root&quot; &amp;&amp; 
</ins><span class="cx">         ([existsuser $macportsuser] == 0 || [existsgroup $macportsuser] == 0 )} {
</span><span class="cx">         ui_warn &quot;configured user/group $macportsuser does not exist, will build as root&quot;
</span><span class="cx">         set macportsuser &quot;root&quot;
</span><span class="lines">@@ -2956,7 +2956,7 @@
</span><span class="cx"> 
</span><span class="cx">     set i [string first . $depline]
</span><span class="cx">     if {$i &lt; 0} {set i [string length $depline]}
</span><del>-    set depname [string range $depline 0 [expr $i - 1]]
</del><ins>+    set depname [string range $depline 0 $i-1]
</ins><span class="cx">     set depversion [string range $depline $i end]
</span><span class="cx">     regsub {\.} $depversion {\.} depversion
</span><span class="cx">     if {${os.platform} == &quot;darwin&quot;} {
</span><span class="lines">@@ -2992,7 +2992,7 @@
</span><span class="cx"> 
</span><span class="cx">     regexp {^(.*)/(.*?)$} &quot;$fullname&quot; match search_path depregex
</span><span class="cx"> 
</span><del>-    if {[string index $search_path 0] != &quot;/&quot;} {
</del><ins>+    if {[string index $search_path 0] ne &quot;/&quot;} {
</ins><span class="cx">         # Prepend prefix if not an absolute path
</span><span class="cx">         set search_path &quot;${prefix}/${search_path}&quot;
</span><span class="cx">     }
</span><span class="lines">@@ -3023,7 +3023,7 @@
</span><span class="cx">             set depfile [_pathtest $depspec 1]
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    if {$depfile == &quot;&quot;} {
</del><ins>+    if {$depfile eq &quot;&quot;} {
</ins><span class="cx">         return $portname
</span><span class="cx">     } else {
</span><span class="cx">         set theport [registry_file_registered $depfile]
</span><span class="lines">@@ -3038,7 +3038,7 @@
</span><span class="cx"> # returns the list of archs that the port is targeting
</span><span class="cx"> proc get_canonical_archs {} {
</span><span class="cx">     global supported_archs os.arch configure.build_arch configure.universal_archs
</span><del>-    if {$supported_archs == &quot;noarch&quot;} {
</del><ins>+    if {$supported_archs eq &quot;noarch&quot;} {
</ins><span class="cx">         return &quot;noarch&quot;
</span><span class="cx">     } elseif {[variant_exists universal] &amp;&amp; [variant_isset universal]} {
</span><span class="cx">         return [lsort -ascii ${configure.universal_archs}]
</span><span class="lines">@@ -3056,7 +3056,7 @@
</span><span class="cx">             return -code error &quot;archflags do not exist for tool '$tool'&quot;
</span><span class="cx">         }
</span><span class="cx">     } else {
</span><del>-        if {$tool == &quot;cc&quot;} {
</del><ins>+        if {$tool eq &quot;cc&quot;} {
</ins><span class="cx">             set tool c
</span><span class="cx">         }
</span><span class="cx">         if {[catch {option configure.universal_${tool}flags} flags]} {
</span><span class="lines">@@ -3069,7 +3069,7 @@
</span><span class="cx"> # check that the selected archs are supported
</span><span class="cx"> proc check_supported_archs {} {
</span><span class="cx">     global supported_archs build_arch universal_archs configure.build_arch configure.universal_archs subport
</span><del>-    if {$supported_archs == &quot;noarch&quot;} {
</del><ins>+    if {$supported_archs eq &quot;noarch&quot;} {
</ins><span class="cx">         return 0
</span><span class="cx">     } elseif {[variant_exists universal] &amp;&amp; [variant_isset universal]} {
</span><span class="cx">         if {[llength ${configure.universal_archs}] &gt; 1 || $universal_archs == ${configure.universal_archs}} {
</span><span class="lines">@@ -3078,7 +3078,7 @@
</span><span class="cx">             ui_error &quot;$subport cannot be installed for the configured universal_archs '$universal_archs' because it only supports the arch(s) '$supported_archs'.&quot;
</span><span class="cx">             return 1
</span><span class="cx">         }
</span><del>-    } elseif {$build_arch == &quot;&quot; || ${configure.build_arch} != &quot;&quot;} {
</del><ins>+    } elseif {$build_arch eq &quot;&quot; || ${configure.build_arch} != &quot;&quot;} {
</ins><span class="cx">         return 0
</span><span class="cx">     }
</span><span class="cx">     ui_error &quot;$subport cannot be installed for the configured build_arch '$build_arch' because it only supports the arch(s) '$supported_archs'.&quot;
</span><span class="lines">@@ -3122,7 +3122,7 @@
</span><span class="cx">                 set rec 5.0.1
</span><span class="cx">             }
</span><span class="cx">         }
</span><del>-        if {$xcodeversion == &quot;none&quot;} {
</del><ins>+        if {$xcodeversion eq &quot;none&quot;} {
</ins><span class="cx">             ui_warn &quot;Xcode does not appear to be installed; most ports will likely fail to build.&quot;
</span><span class="cx">             if {[file exists &quot;/Applications/Install Xcode.app&quot;]} {
</span><span class="cx">                 ui_warn &quot;You downloaded Xcode from the Mac App Store but didn't install it. Run \&quot;Install Xcode\&quot; in the /Applications folder.&quot;
</span><span class="lines">@@ -3183,13 +3183,13 @@
</span><span class="cx">         return 0
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if {[find_portarchive_path] != &quot;&quot;} {
</del><ins>+    if {[find_portarchive_path] ne &quot;&quot;} {
</ins><span class="cx">         set archive_available_result 1
</span><span class="cx">         return 1
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     set archiverootname [file rootname [get_portimage_name]]
</span><del>-    if {[file rootname [file tail $porturl]] == $archiverootname &amp;&amp; [file extension $porturl] != &quot;&quot;} {
</del><ins>+    if {[file rootname [file tail $porturl]] eq $archiverootname &amp;&amp; [file extension $porturl] ne &quot;&quot;} {
</ins><span class="cx">         set archive_available_result 1
</span><span class="cx">         return 1
</span><span class="cx">     }
</span><span class="lines">@@ -3211,7 +3211,7 @@
</span><span class="cx">     # look for and strip off any tag, which will start with the first colon after the
</span><span class="cx">     # first slash after the ://
</span><span class="cx">     set lastcolon [string last : $sites_entry]
</span><del>-    set aftersep [expr [string first : $sites_entry] + 3]
</del><ins>+    set aftersep [expr {[string first : $sites_entry] + 3}]
</ins><span class="cx">     set firstslash [string first / $sites_entry $aftersep]
</span><span class="cx">     if {$firstslash != -1 &amp;&amp; $firstslash &lt; $lastcolon} {
</span><span class="cx">         incr lastcolon -1
</span><span class="lines">@@ -3219,7 +3219,7 @@
</span><span class="cx">     } else {
</span><span class="cx">         set site $sites_entry
</span><span class="cx">     }
</span><del>-    if {[string index $site end] != &quot;/&quot;} {
</del><ins>+    if {[string index $site end] ne &quot;/&quot;} {
</ins><span class="cx">         append site &quot;/[option archive.subdir]&quot;
</span><span class="cx">     } else {
</span><span class="cx">         append site [option archive.subdir]
</span></span></pre></div>
<a id="trunkbasesrcport10teststesttcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port1.0/tests/test.tcl (116448 => 116449)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port1.0/tests/test.tcl        2014-01-25 16:52:01 UTC (rev 116448)
+++ trunk/base/src/port1.0/tests/test.tcl        2014-01-25 16:57:17 UTC (rev 116449)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> proc print_help {arg} {
</span><del>-    if { $arg == &quot;tests&quot; } {
</del><ins>+    if { $arg eq &quot;tests&quot; } {
</ins><span class="cx">         puts &quot;The list of available tests is:&quot;
</span><span class="cx">         cd tests
</span><span class="cx">         set test_suite [glob *.test]
</span><span class="lines">@@ -34,11 +34,11 @@
</span><span class="cx"> 
</span><span class="cx"> # Process args
</span><span class="cx"> foreach arg $argv {
</span><del>-    if { $arg == &quot;-h&quot; || $arg == &quot;-help&quot; } {
</del><ins>+    if { $arg eq &quot;-h&quot; || $arg eq &quot;-help&quot; } {
</ins><span class="cx">         print_help &quot;&quot;
</span><span class="cx">         exit 0
</span><del>-    } elseif { $arg == &quot;-debug&quot; } {
-        set index [expr [lsearch $argv $arg] + 1]
</del><ins>+    } elseif { $arg eq &quot;-debug&quot; } {
+        set index [expr {[lsearch $argv $arg] + 1}]
</ins><span class="cx">         set level [lindex $argv $index]
</span><span class="cx">         if { $level &gt;= 0 &amp;&amp; $level &lt;= 3 } {
</span><span class="cx">             append arguments &quot;-debug &quot; $level
</span><span class="lines">@@ -46,32 +46,32 @@
</span><span class="cx">             puts &quot;Invalid debug level.&quot;
</span><span class="cx">             exit 1
</span><span class="cx">         }
</span><del>-    } elseif { $arg == &quot;-t&quot; } {
-        set index [expr [lsearch $argv $arg] + 1]
</del><ins>+    } elseif { $arg eq &quot;-t&quot; } {
+        set index [expr {[lsearch $argv $arg] + 1}]
</ins><span class="cx">         set test_name [lindex $argv $index]
</span><span class="cx">         set no 0
</span><span class="cx">         cd tests
</span><span class="cx">         set test_suite [glob *.test]
</span><span class="cx">         foreach test $test_suite {
</span><span class="cx">             if { $test_name != $test } {
</span><del>-                set no [expr $no + 1]
</del><ins>+                set no [expr {$no + 1}]
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">         if { $no == [llength $test_suite] } {
</span><span class="cx">             print_help tests
</span><span class="cx">             exit 1
</span><span class="cx">         }
</span><del>-    } elseif { $arg == &quot;-l&quot; } {
</del><ins>+    } elseif { $arg eq &quot;-l&quot; } {
</ins><span class="cx">         print_help tests
</span><span class="cx">         exit 0
</span><del>-    } elseif { $arg == &quot;-nocolor&quot; } {
</del><ins>+    } elseif { $arg eq &quot;-nocolor&quot; } {
</ins><span class="cx">         set color_out &quot;no&quot;
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> # Run tests
</span><del>-if { $test_name != &quot;&quot;} {
</del><ins>+if { $test_name ne &quot;&quot;} {
</ins><span class="cx">     set result [eval exec $tcl $test_name $arguments 2&gt;@stderr]
</span><span class="cx">     puts $result
</span><span class="cx"> 
</span><span class="lines">@@ -104,7 +104,7 @@
</span><span class="cx">         if { $fail != 0 } { set err &quot;yes&quot; }
</span><span class="cx"> 
</span><span class="cx">         set out &quot;&quot;
</span><del>-        if { ($fail != 0 || $skip != 0) &amp;&amp; $color_out == &quot;&quot; } {
</del><ins>+        if { ($fail != 0 || $skip != 0) &amp;&amp; $color_out eq &quot;&quot; } {
</ins><span class="cx">             # Color failed tests.
</span><span class="cx">             append out &quot;\x1b\[1;31mTotal:&quot; $total &quot; Passed:&quot; $pass &quot; Failed:&quot; $fail &quot; Skipped:&quot; $skip &quot;  \x1b\[0m&quot; $test
</span><span class="cx">         } else {
</span><span class="lines">@@ -119,13 +119,13 @@
</span><span class="cx">             puts $out
</span><span class="cx">         }
</span><span class="cx">         if { $fail != 0 } {
</span><del>-            set end [expr [string first $test $result 0] - 1]
</del><ins>+            set end [expr {[string first $test $result 0] - 1}]
</ins><span class="cx">             puts [string range $result 0 $end]
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> # Return 1 if errors were found.
</span><del>-if {$err != &quot;&quot;} { exit 1 }
</del><ins>+if {$err ne &quot;&quot;} { exit 1 }
</ins><span class="cx"> 
</span><span class="cx"> return 0
</span></span></pre>
</div>
</div>

</body>
</html>