<!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>[146654] trunk/base/src/port/port.tcl</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/146654">146654</a></dd>
<dt>Author</dt> <dd>g5pw@macports.org</dd>
<dt>Date</dt> <dd>2016-03-14 17:58:43 -0700 (Mon, 14 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>base: remove trailing whitespace from port.tcl</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbasesrcportporttcl">trunk/base/src/port/port.tcl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbasesrcportporttcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/port/port.tcl (146653 => 146654)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/port/port.tcl        2016-03-15 00:54:06 UTC (rev 146653)
+++ trunk/base/src/port/port.tcl        2016-03-15 00:58:43 UTC (rev 146654)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx"> # 3. Neither the name of Apple Inc. nor the names of its contributors
</span><span class="cx"> #    may be used to endorse or promote products derived from this software
</span><span class="cx"> #    without specific prior written permission.
</span><del>-# 
</del><ins>+#
</ins><span class="cx"> # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;
</span><span class="cx"> # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
</span><span class="cx"> # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
</span><span class="lines">@@ -115,12 +115,12 @@
</span><span class="cx"> 
</span><span class="cx"> Portnames that contain standard glob characters will be expanded to the
</span><span class="cx"> set of ports matching the glob pattern.
</span><del>-    
</del><ins>+
</ins><span class="cx"> Port expressions
</span><span class="cx"> ----------------
</span><span class="cx"> Portnames, port glob patterns, and pseudo-portnames may be logically
</span><span class="cx"> combined using expressions consisting of and, or, not, !, (, and ).
</span><del>-    
</del><ins>+
</ins><span class="cx"> For more information
</span><span class="cx"> --------------------
</span><span class="cx"> See man pages: port(1), macports.conf(5), portfile(7), portgroup(7),
</span><span class="lines">@@ -223,7 +223,7 @@
</span><span class="cx"> # we're handling errors in a soft fashion, in which
</span><span class="cx"> # case we continue
</span><span class="cx"> proc break_softcontinue { msg status name_status } {
</span><del>-    upvar $name_status status_var 
</del><ins>+    upvar $name_status status_var
</ins><span class="cx">     ui_error $msg
</span><span class="cx">     if {[macports::ui_isset ports_processall]} {
</span><span class="cx">         set status_var 0
</span><span class="lines">@@ -245,7 +245,7 @@
</span><span class="cx"> # This function sorts the variants and presents them in a canonical representation
</span><span class="cx"> proc composite_version {version variations {emptyVersionOkay 0}} {
</span><span class="cx">     # Form a composite version out of the version and variations
</span><del>-    
</del><ins>+
</ins><span class="cx">     # Select the variations into positive and negative
</span><span class="cx">     set pos {}
</span><span class="cx">     set neg {}
</span><span class="lines">@@ -367,14 +367,14 @@
</span><span class="cx"> 
</span><span class="cx">     # Form the fully discriminated portname: portname/version_revison+-variants
</span><span class="cx">     set port(fullname) &quot;$port(name)/[composite_version $port(version) $port(variants)]&quot;
</span><del>-    
</del><ins>+
</ins><span class="cx">     return [array get port]
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> proc add_to_portlist {listname portentry} {
</span><span class="cx">     upvar $listname portlist
</span><del>-    
</del><ins>+
</ins><span class="cx">     # Form portlist entry and add to portlist
</span><span class="cx">     lappend portlist [entry_for_portlist $portentry]
</span><span class="cx"> }
</span><span class="lines">@@ -455,7 +455,7 @@
</span><span class="cx"> proc foreachport {portlist block} {
</span><span class="cx">     set savedir [pwd]
</span><span class="cx">     foreach portspec $portlist {
</span><del>-    
</del><ins>+
</ins><span class="cx">         # Set the variables for the block
</span><span class="cx">         uplevel 1 &quot;array unset portspec; array set portspec { $portspec }&quot;
</span><span class="cx">         uplevel 1 {
</span><span class="lines">@@ -469,10 +469,10 @@
</span><span class="cx">             array unset options
</span><span class="cx">             array set options $portspec(options)
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Invoke block
</span><span class="cx">         uplevel 1 $block
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Restore cwd after each port, since mportopen changes it, and otherwise relative
</span><span class="cx">         # urls would break on subsequent passes
</span><span class="cx">         if {[file exists $savedir]} {
</span><span class="lines">@@ -686,7 +686,7 @@
</span><span class="cx">     foreach m $list {
</span><span class="cx">         if {[string first &quot;@&quot; $m] &lt; 0} {
</span><span class="cx">             if {[string first &quot;:&quot; $m] &gt;= 0} {
</span><del>-                set m [regsub -- &quot;(.*):(.*)&quot; $m &quot;\\2@\\1&quot;] 
</del><ins>+                set m [regsub -- &quot;(.*):(.*)&quot; $m &quot;\\2@\\1&quot;]
</ins><span class="cx">             } elseif {$m ne &quot;openmaintainer&quot; &amp;&amp; $m ne &quot;nomaintainer&quot;} {
</span><span class="cx">                 set m &quot;$m@macports.org&quot;
</span><span class="cx">             }
</span><span class="lines">@@ -706,15 +706,15 @@
</span><span class="cx">     foreach {name info} $infos {
</span><span class="cx">         array unset portinfo
</span><span class="cx">         array set portinfo $info
</span><del>-        
</del><ins>+
</ins><span class="cx">         set portentry [entry_for_portlist [list url $portinfo(porturl) name $name]]
</span><del>-        
</del><ins>+
</ins><span class="cx">         array unset entry
</span><span class="cx">         array set entry $portentry
</span><del>-        
</del><ins>+
</ins><span class="cx">         if {[info exists unique($entry(fullname))]} continue
</span><span class="cx">         set unique($entry(fullname)) 1
</span><del>-        
</del><ins>+
</ins><span class="cx">         lappend result $portentry
</span><span class="cx">     }
</span><span class="cx">     return $result
</span><span class="lines">@@ -728,7 +728,7 @@
</span><span class="cx">         fatal &quot;search for portname $pattern failed: $result&quot;
</span><span class="cx">     }
</span><span class="cx">     set results [unique_results_to_portlist $res]
</span><del>-    
</del><ins>+
</ins><span class="cx">     # Return the list of all ports, sorted
</span><span class="cx">     return [portlist_sort $results]
</span><span class="cx"> }
</span><span class="lines">@@ -891,12 +891,12 @@
</span><span class="cx">             # Get information about latest available version and revision
</span><span class="cx">             set latest_version $portinfo(version)
</span><span class="cx">             set latest_revision     0
</span><del>-            if {[info exists portinfo(revision)] &amp;&amp; $portinfo(revision) &gt; 0} { 
</del><ins>+            if {[info exists portinfo(revision)] &amp;&amp; $portinfo(revision) &gt; 0} {
</ins><span class="cx">                 set latest_revision $portinfo(revision)
</span><span class="cx">             }
</span><span class="cx">             set latest_compound     &quot;${latest_version}_${latest_revision}&quot;
</span><span class="cx">             set latest_epoch        0
</span><del>-            if {[info exists portinfo(epoch)]} { 
</del><ins>+            if {[info exists portinfo(epoch)]} {
</ins><span class="cx">                 set latest_epoch    $portinfo(epoch)
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="lines">@@ -1108,7 +1108,7 @@
</span><span class="cx">                     array unset portinfo
</span><span class="cx">                     array set portinfo [lindex $result 1]
</span><span class="cx">                     set porturl $portinfo(porturl)
</span><del>-                
</del><ins>+
</ins><span class="cx">                     # open its portfile
</span><span class="cx">                     if {[catch {set mport [mportopen $porturl [list subport $portinfo(name)] [array get global_variations]]} result]} {
</span><span class="cx">                         ui_debug &quot;$::errorInfo&quot;
</span><span class="lines">@@ -1198,7 +1198,7 @@
</span><span class="cx"> 
</span><span class="cx"> proc seqExpr { resname } {
</span><span class="cx">     upvar $resname reslist
</span><del>-    
</del><ins>+
</ins><span class="cx">     # Evaluate a sequence of expressions a b c...
</span><span class="cx">     # These act the same as a or b or c
</span><span class="cx"> 
</span><span class="lines">@@ -1217,14 +1217,14 @@
</span><span class="cx">             set reslist [opUnion $reslist $blist]
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $result
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> proc orExpr { resname } {
</span><span class="cx">     upvar $resname reslist
</span><del>-    
</del><ins>+
</ins><span class="cx">     set a [andExpr reslist]
</span><span class="cx">     while ($a) {
</span><span class="cx">         switch -- [lookahead] {
</span><span class="lines">@@ -1234,7 +1234,7 @@
</span><span class="cx">                     if {![andExpr blist]} {
</span><span class="cx">                         return 0
</span><span class="cx">                     }
</span><del>-                        
</del><ins>+
</ins><span class="cx">                     # Calculate a union b
</span><span class="cx">                     set reslist [opUnion $reslist $blist]
</span><span class="cx">                 }
</span><span class="lines">@@ -1243,26 +1243,26 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $a
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> proc andExpr { resname } {
</span><span class="cx">     upvar $resname reslist
</span><del>-    
</del><ins>+
</ins><span class="cx">     set a [unaryExpr reslist]
</span><span class="cx">     while {$a} {
</span><span class="cx">         switch -- [lookahead] {
</span><span class="cx">             and {
</span><span class="cx">                     advance
</span><del>-                    
</del><ins>+
</ins><span class="cx">                     set blist {}
</span><span class="cx">                     set b [unaryExpr blist]
</span><span class="cx">                     if {!$b} {
</span><span class="cx">                         return 0
</span><span class="cx">                     }
</span><del>-                    
</del><ins>+
</ins><span class="cx">                     # Calculate a intersect b
</span><span class="cx">                     set reslist [opIntersection $reslist $blist]
</span><span class="cx">                 }
</span><span class="lines">@@ -1271,7 +1271,7 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $a
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1295,7 +1295,7 @@
</span><span class="cx">                 set result [element reslist]
</span><span class="cx">             }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $result
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1303,13 +1303,13 @@
</span><span class="cx"> proc element { resname } {
</span><span class="cx">     upvar $resname reslist
</span><span class="cx">     set el 0
</span><del>-    
</del><ins>+
</ins><span class="cx">     set url &quot;&quot;
</span><span class="cx">     set name &quot;&quot;
</span><span class="cx">     set version &quot;&quot;
</span><span class="cx">     array unset requested_variants
</span><span class="cx">     array unset options
</span><del>-    
</del><ins>+
</ins><span class="cx">     set token [lookahead]
</span><span class="cx">     switch -regex -- $token {
</span><span class="cx">         ^\\)$               -
</span><span class="lines">@@ -1411,10 +1411,10 @@
</span><span class="cx"> 
</span><span class="cx">             set recursive [string equal $selector &quot;rdependentof&quot;]
</span><span class="cx">             add_multiple_ports reslist [get_dependent_ports $portname $recursive]
</span><del>-            
</del><ins>+
</ins><span class="cx">             set el 1
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         ^depof:             -
</span><span class="cx">         ^rdepof:            {
</span><span class="cx">             advance
</span><span class="lines">@@ -1424,7 +1424,7 @@
</span><span class="cx"> 
</span><span class="cx">             set recursive [string equal $selector &quot;rdepof&quot;]
</span><span class="cx">             add_multiple_ports reslist [get_dep_ports $portname $recursive]
</span><del>-            
</del><ins>+
</ins><span class="cx">             set el 1
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -1481,12 +1481,12 @@
</span><span class="cx"> 
</span><span class="cx"> proc add_multiple_ports { resname ports {remainder &quot;&quot;} } {
</span><span class="cx">     upvar $resname reslist
</span><del>-    
</del><ins>+
</ins><span class="cx">     set version &quot;&quot;
</span><span class="cx">     array unset variants
</span><span class="cx">     array unset options
</span><span class="cx">     parsePortSpec version variants options $remainder
</span><del>-    
</del><ins>+
</ins><span class="cx">     array unset overrides
</span><span class="cx">     if {$version ne &quot;&quot;} { set overrides(version) $version }
</span><span class="cx">     if {[array size variants]} {
</span><span class="lines">@@ -1525,7 +1525,7 @@
</span><span class="cx"> 
</span><span class="cx"> proc opIntersection { a b } {
</span><span class="cx">     set result {}
</span><del>-    
</del><ins>+
</ins><span class="cx">     # Rules we follow in performing the intersection of two port lists:
</span><span class="cx">     #
</span><span class="cx">     #   a/, a/          ==&gt; a/
</span><span class="lines">@@ -1536,7 +1536,7 @@
</span><span class="cx">     #
</span><span class="cx">     #   If there's an exact match, we take it.
</span><span class="cx">     #   If there's a match between simple and discriminated, we take the later.
</span><del>-    
</del><ins>+
</ins><span class="cx">     # First create a list of the fully discriminated names in b
</span><span class="cx">     array unset bfull
</span><span class="cx">     set i 0
</span><span class="lines">@@ -1545,14 +1545,14 @@
</span><span class="cx">         set bfull($port(fullname)) $i
</span><span class="cx">         incr i
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     # Walk through each item in a, matching against b
</span><span class="cx">     foreach aitem [unique_entries $a] {
</span><span class="cx">         array set port $aitem
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Quote the fullname and portname to avoid special characters messing up the regexp
</span><span class="cx">         set safefullname [regex_pat_sanitize $port(fullname)]
</span><del>-        
</del><ins>+
</ins><span class="cx">         set simpleform [expr { &quot;$port(name)/&quot; == $port(fullname) }]
</span><span class="cx">         if {$simpleform} {
</span><span class="cx">             set pat &quot;^${safefullname}&quot;
</span><span class="lines">@@ -1560,7 +1560,7 @@
</span><span class="cx">             set safename [regex_pat_sanitize $port(name)]
</span><span class="cx">             set pat &quot;^${safefullname}$|^${safename}/$&quot;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         set matches [array names bfull -regexp $pat]
</span><span class="cx">         foreach match $matches {
</span><span class="cx">             if {$simpleform} {
</span><span class="lines">@@ -1571,16 +1571,16 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $result
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> proc opComplement { a b } {
</span><span class="cx">     set result {}
</span><del>-    
</del><ins>+
</ins><span class="cx">     # Return all elements of a not matching elements in b
</span><del>-    
</del><ins>+
</ins><span class="cx">     # First create a list of the fully discriminated names in b
</span><span class="cx">     array unset bfull
</span><span class="cx">     set i 0
</span><span class="lines">@@ -1589,14 +1589,14 @@
</span><span class="cx">         set bfull($port(fullname)) $i
</span><span class="cx">         incr i
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     # Walk through each item in a, taking all those items that don't match b
</span><span class="cx">     foreach aitem $a {
</span><span class="cx">         array set port $aitem
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Quote the fullname and portname to avoid special characters messing up the regexp
</span><span class="cx">         set safefullname [regex_pat_sanitize $port(fullname)]
</span><del>-        
</del><ins>+
</ins><span class="cx">         set simpleform [expr { &quot;$port(name)/&quot; == $port(fullname) }]
</span><span class="cx">         if {$simpleform} {
</span><span class="cx">             set pat &quot;^${safefullname}&quot;
</span><span class="lines">@@ -1604,7 +1604,7 @@
</span><span class="cx">             set safename [regex_pat_sanitize $port(name)]
</span><span class="cx">             set pat &quot;^${safefullname}$|^${safename}/$&quot;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         set matches [array names bfull -regexp $pat]
</span><span class="cx"> 
</span><span class="cx">         # We copy this element to result only if it didn't match against b
</span><span class="lines">@@ -1612,7 +1612,7 @@
</span><span class="cx">             lappend result $aitem
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $result
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1623,12 +1623,12 @@
</span><span class="cx">     upvar $vername portversion
</span><span class="cx">     upvar $varname portvariants
</span><span class="cx">     upvar $optname portoptions
</span><del>-    
</del><ins>+
</ins><span class="cx">     set portname &quot;&quot;
</span><span class="cx">     set portversion &quot;&quot;
</span><span class="cx">     array unset portvariants
</span><span class="cx">     array unset portoptions
</span><del>-    
</del><ins>+
</ins><span class="cx">     if { [moreargs] } {
</span><span class="cx">         # Look first for a potential portname
</span><span class="cx">         #
</span><span class="lines">@@ -1641,7 +1641,7 @@
</span><span class="cx">         if {![regexp {^(@|[-+]([[:alpha:]_]+[\w\.]*)|[[:alpha:]_]+[\w\.]*=)} $token match]} {
</span><span class="cx">             advance
</span><span class="cx">             regexp {^([^@]+)(@.*)?} $token match portname remainder
</span><del>-            
</del><ins>+
</ins><span class="cx">             # If the portname contains a /, then try to use it as a URL
</span><span class="cx">             if {[string match &quot;*/*&quot; $portname]} {
</span><span class="cx">                 set url &quot;file://$portname&quot;
</span><span class="lines">@@ -1662,7 +1662,7 @@
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Now parse the rest of the spec
</span><span class="cx">         parsePortSpec portversion portvariants portoptions $remainder
</span><span class="cx">     }
</span><span class="lines">@@ -1680,25 +1680,25 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-    
</del><ins>+
</ins><span class="cx"> proc parsePortSpec { vername varname optname {remainder &quot;&quot;} } {
</span><span class="cx">     upvar $vername portversion
</span><span class="cx">     upvar $varname portvariants
</span><span class="cx">     upvar $optname portoptions
</span><del>-    
</del><ins>+
</ins><span class="cx">     global global_options
</span><del>-    
</del><ins>+
</ins><span class="cx">     set portversion &quot;&quot;
</span><span class="cx">     array unset portoptions
</span><span class="cx">     array set portoptions [array get global_options]
</span><span class="cx">     array unset portvariants
</span><del>-    
</del><ins>+
</ins><span class="cx">     # Parse port version/variants/options
</span><span class="cx">     set opt $remainder
</span><span class="cx">     set adv 0
</span><span class="cx">     set consumed 0
</span><span class="cx">     for {set firstTime 1} {$opt ne &quot;&quot; || [moreargs]} {set firstTime 0} {
</span><del>-    
</del><ins>+
</ins><span class="cx">         # Refresh opt as needed
</span><span class="cx">         if {$opt eq &quot;&quot;} {
</span><span class="cx">             if {$adv} advance
</span><span class="lines">@@ -1706,14 +1706,14 @@
</span><span class="cx">             set adv 1
</span><span class="cx">             set consumed 0
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Version must be first, if it's there at all
</span><span class="cx">         if {$firstTime &amp;&amp; [string match {@*} $opt]} {
</span><span class="cx">             # Parse the version
</span><del>-            
</del><ins>+
</ins><span class="cx">             # Strip the @
</span><span class="cx">             set opt [string range $opt 1 end]
</span><del>-            
</del><ins>+
</ins><span class="cx">             # Handle the version
</span><span class="cx">             set sepPos [string first &quot;/&quot; $opt]
</span><span class="cx">             if {$sepPos &gt;= 0} {
</span><span class="lines">@@ -1736,7 +1736,7 @@
</span><span class="cx">             set consumed 1
</span><span class="cx">         } else {
</span><span class="cx">             # Parse all other options
</span><del>-            
</del><ins>+
</ins><span class="cx">             # Look first for a variable setting: VARNAME=VALUE
</span><span class="cx">             if {[regexp {^([[:alpha:]_]+[\w\.]*)=(.*)} $opt match key val] == 1} {
</span><span class="cx">                 # It's a variable setting
</span><span class="lines">@@ -2018,10 +2018,10 @@
</span><span class="cx">             # specified for the port (so we get e.g. dependencies right)
</span><span class="cx">             array unset merged_variations
</span><span class="cx">             array set merged_variations [array get variations]
</span><del>-            foreach { variation value } [array get global_variations] { 
-                if { ![info exists merged_variations($variation)] } { 
-                    set merged_variations($variation) $value 
-                } 
</del><ins>+            foreach { variation value } [array get global_variations] {
+                if { ![info exists merged_variations($variation)] } {
+                    set merged_variations($variation) $value
+                }
</ins><span class="cx">             }
</span><span class="cx">             if {![info exists options(subport)]} {
</span><span class="cx">                 if {[info exists portinfo(name)]} {
</span><span class="lines">@@ -2030,7 +2030,7 @@
</span><span class="cx">                     set options(subport) $portname
</span><span class="cx">                 }
</span><span class="cx">             }
</span><del>- 
</del><ins>+
</ins><span class="cx">             if {[catch {set mport [mportopen $porturl [array get options] [array get merged_variations]]} result]} {
</span><span class="cx">                 ui_debug &quot;$::errorInfo&quot;
</span><span class="cx">                 break_softcontinue &quot;Unable to open port: $result&quot; 1 status
</span><span class="lines">@@ -2122,13 +2122,13 @@
</span><span class="cx">             set options(ports_info_depends_run) yes
</span><span class="cx">             set options(ports_info_depends_test) yes
</span><span class="cx">         }
</span><del>-                
</del><ins>+
</ins><span class="cx">         # Set up our field separators
</span><span class="cx">         set show_label 1
</span><span class="cx">         set field_sep &quot;\n&quot;
</span><span class="cx">         set subfield_sep &quot;, &quot;
</span><span class="cx">         set pretty_print 0
</span><del>-        
</del><ins>+
</ins><span class="cx">         # For human-readable summary, which is the default with no options
</span><span class="cx">         if {[llength [array get options ports_info_*]] == 0} {
</span><span class="cx">             set pretty_print 1
</span><span class="lines">@@ -2145,7 +2145,7 @@
</span><span class="cx">             set field_sep &quot;\t&quot;
</span><span class="cx">             set subfield_sep &quot;,&quot;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Figure out whether to show field name
</span><span class="cx">         set quiet [macports::ui_isset ports_quiet]
</span><span class="cx">         if {$quiet} {
</span><span class="lines">@@ -2165,9 +2165,9 @@
</span><span class="cx">             set opts_todo {ports_info_heading
</span><span class="cx">                 ports_info_replaced_by
</span><span class="cx">                 ports_info_subports
</span><del>-                ports_info_variants 
</del><ins>+                ports_info_variants
</ins><span class="cx">                 ports_info_skip_line
</span><del>-                ports_info_long_description ports_info_homepage 
</del><ins>+                ports_info_long_description ports_info_homepage
</ins><span class="cx">                 ports_info_skip_line ports_info_depends_fetch
</span><span class="cx">                 ports_info_depends_extract ports_info_depends_build
</span><span class="cx">                 ports_info_depends_lib ports_info_depends_run
</span><span class="lines">@@ -2201,7 +2201,7 @@
</span><span class="cx">             } else {
</span><span class="cx">                 # Map from friendly name
</span><span class="cx">                 set ropt [map_friendly_field_names $opt]
</span><del>-                
</del><ins>+
</ins><span class="cx">                 # If there's no such info, move on
</span><span class="cx">                 if {![info exists portinfo($ropt)]} {
</span><span class="cx">                     set inf &quot;&quot;
</span><span class="lines">@@ -2221,7 +2221,7 @@
</span><span class="cx">             } elseif {$show_label} {
</span><span class="cx">                 set label &quot;$opt: &quot;
</span><span class="cx">             }
</span><del>-            
</del><ins>+
</ins><span class="cx">             # Format the data
</span><span class="cx">             if { $ropt eq &quot;maintainers&quot; } {
</span><span class="cx">                 set inf [unobscure_maintainers $inf]
</span><span class="lines">@@ -2257,7 +2257,7 @@
</span><span class="cx">                         }
</span><span class="cx">                         lappend inf &quot;$varmodifier$v&quot;
</span><span class="cx">                     }
</span><del>-                } elseif {[string match &quot;depend*&quot; $ropt] 
</del><ins>+                } elseif {[string match &quot;depend*&quot; $ropt]
</ins><span class="cx">                           &amp;&amp; ![macports::ui_isset ports_verbose]} {
</span><span class="cx">                     set pi_deps $inf
</span><span class="cx">                     set inf {}
</span><span class="lines">@@ -2265,14 +2265,14 @@
</span><span class="cx">                         lappend inf [lindex [split $d :] end]
</span><span class="cx">                     }
</span><span class="cx">                 }
</span><del>-            } 
</del><ins>+            }
</ins><span class="cx">             #End of special pretty-print formatting for certain fields
</span><span class="cx">             if {[info exists list_map($ropt)]} {
</span><span class="cx">                 set field [join $inf $subfield_sep]
</span><span class="cx">             } else {
</span><span class="cx">                 set field $inf
</span><span class="cx">             }
</span><del>-            
</del><ins>+
</ins><span class="cx">             # Assemble the entry
</span><span class="cx">             if {$pretty_print} {
</span><span class="cx">                 # The two special fields are considered headings and are
</span><span class="lines">@@ -2320,7 +2320,7 @@
</span><span class="cx">             set separator &quot;--\n&quot;
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $status
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2349,7 +2349,7 @@
</span><span class="cx">         ui_notice &quot;Port $portname ${version}_${revision}${variants} is installed as an image in:&quot;
</span><span class="cx">         puts $imagedir
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $status
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2377,15 +2377,15 @@
</span><span class="cx">             array set portinfo [lindex $result 1]
</span><span class="cx">             set porturl $portinfo(porturl)
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Add any global_variations to the variations
</span><span class="cx">         # specified for the port
</span><span class="cx">         array unset merged_variations
</span><span class="cx">         array set merged_variations [array get variations]
</span><del>-        foreach { variation value } [array get global_variations] { 
-            if { ![info exists merged_variations($variation)] } { 
-                set merged_variations($variation) $value 
-            } 
</del><ins>+        foreach { variation value } [array get global_variations] {
+            if { ![info exists merged_variations($variation)] } {
+                set merged_variations($variation) $value
+            }
</ins><span class="cx">         }
</span><span class="cx">         if {![info exists options(subport)]} {
</span><span class="cx">             if {[info exists portinfo(name)]} {
</span><span class="lines">@@ -2457,7 +2457,7 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     registry::close_file_map
</span><del>-    
</del><ins>+
</ins><span class="cx">     return 0
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2489,7 +2489,7 @@
</span><span class="cx">             ui_msg &quot;Skipping activate $portname (dry run)&quot;
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $status
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2526,7 +2526,7 @@
</span><span class="cx">             ui_msg &quot;Skipping deactivate $portname (dry run)&quot;
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $status
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2548,7 +2548,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     set group [lindex $portlist 0]
</span><del>-    
</del><ins>+
</ins><span class="cx">     # If no command (--set, --show, --list, --summary) is specified *but*
</span><span class="cx">     #  more than one argument is specified, default to the set command.
</span><span class="cx">     if {[llength $commands] &lt; 1 &amp;&amp; [llength $portlist] &gt; 1} {
</span><span class="lines">@@ -2710,7 +2710,7 @@
</span><span class="cx">         }
</span><span class="cx">         fatal &quot;port selfupdate failed: $result&quot;
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     if {$base_updated} {
</span><span class="cx">         # exit immediately if in batch/interactive mode
</span><span class="cx">         return -999
</span><span class="lines">@@ -2741,7 +2741,7 @@
</span><span class="cx">             break_softcontinue &quot;$result&quot; 1 status
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $status
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2757,7 +2757,7 @@
</span><span class="cx">     if {[prefix_unwritable]} {
</span><span class="cx">         return 1
</span><span class="cx">     }
</span><del>-    macports::reclaim_main  
</del><ins>+    macports::reclaim_main
</ins><span class="cx">     return 0
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2780,7 +2780,7 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     if {$status != 0 &amp;&amp; $status != 2 &amp;&amp; $status != 3} {
</span><span class="cx">         print_tickets_url
</span><span class="cx">     } elseif {$status == 0} {
</span><span class="lines">@@ -2857,7 +2857,7 @@
</span><span class="cx">             set irevision [lindex $ilist $index 2]
</span><span class="cx">             set ivariants [lindex $ilist $index 3]
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         set deplist [registry::list_dependents $portname $iversion $irevision $ivariants]
</span><span class="cx">         if { [llength $deplist] &gt; 0 } {
</span><span class="cx">             if {$action eq &quot;rdependents&quot;} {
</span><span class="lines">@@ -2993,10 +2993,10 @@
</span><span class="cx">             # specified for the port, so we get dependencies right
</span><span class="cx">             array unset merged_variations
</span><span class="cx">             array set merged_variations [array get variations]
</span><del>-            foreach { variation value } [array get global_variations] { 
-                if { ![info exists merged_variations($variation)] } { 
-                    set merged_variations($variation) $value 
-                } 
</del><ins>+            foreach { variation value } [array get global_variations] {
+                if { ![info exists merged_variations($variation)] } {
+                    set merged_variations($variation) $value
+                }
</ins><span class="cx">             }
</span><span class="cx">             if {![info exists options(subport)]} {
</span><span class="cx">                 if {[info exists portinfo(name)]} {
</span><span class="lines">@@ -3071,7 +3071,7 @@
</span><span class="cx">                 set depname [lindex [split $dep :] end]
</span><span class="cx">                 if {![info exists seen($depname)]} {
</span><span class="cx">                     set seen($depname) 1
</span><del>-                    
</del><ins>+
</ins><span class="cx">                     # look up the dep
</span><span class="cx">                     if {[catch {mportlookup $depname} result]} {
</span><span class="cx">                         ui_debug &quot;$::errorInfo&quot;
</span><span class="lines">@@ -3084,7 +3084,7 @@
</span><span class="cx">                     array set portinfo [lindex $result 1]
</span><span class="cx">                     set porturl $portinfo(porturl)
</span><span class="cx">                     set options(subport) $portinfo(name)
</span><del>-                    
</del><ins>+
</ins><span class="cx">                     # open the portfile if requested
</span><span class="cx">                     if {!([info exists options(ports_${action}_index)] &amp;&amp; $options(ports_${action}_index) eq &quot;yes&quot;)} {
</span><span class="cx">                         if {[catch {set mport [mportopen $porturl [array get options] [array get merged_variations]]} result]} {
</span><span class="lines">@@ -3095,7 +3095,7 @@
</span><span class="cx">                         array set portinfo [mportinfo $mport]
</span><span class="cx">                         mportclose $mport
</span><span class="cx">                     }
</span><del>-                    
</del><ins>+
</ins><span class="cx">                     # get list of the dep's deps
</span><span class="cx">                     set rdeplist {}
</span><span class="cx">                     foreach type $deptypes {
</span><span class="lines">@@ -3222,7 +3222,7 @@
</span><span class="cx">     set status 0
</span><span class="cx">     set restrictedList 0
</span><span class="cx">     set ilist {}
</span><del>-    
</del><ins>+
</ins><span class="cx">     if { [llength $portlist] || (![info exists private_options(ports_no_args)] || $private_options(ports_no_args) eq &quot;no&quot;)} {
</span><span class="cx">         set restrictedList 1
</span><span class="cx">         foreachport $portlist {
</span><span class="lines">@@ -3322,7 +3322,7 @@
</span><span class="cx">     set num_outdated 0
</span><span class="cx">     if { [llength $ilist] &gt; 0 } {
</span><span class="cx">         foreach i [portlist_sortint $ilist] {
</span><del>-        
</del><ins>+
</ins><span class="cx">             # Get information about the installed port
</span><span class="cx">             set portname [lindex $i 0]
</span><span class="cx">             set installed_version [lindex $i 1]
</span><span class="lines">@@ -3349,7 +3349,7 @@
</span><span class="cx">             }
</span><span class="cx">             array unset portinfo
</span><span class="cx">             array set portinfo [lindex $res 1]
</span><del>-            
</del><ins>+
</ins><span class="cx">             # Get information about latest available version and revision
</span><span class="cx">             if {![info exists portinfo(version)]} {
</span><span class="cx">                 ui_warn &quot;$portname has no version field&quot;
</span><span class="lines">@@ -3357,15 +3357,15 @@
</span><span class="cx">             }
</span><span class="cx">             set latest_version $portinfo(version)
</span><span class="cx">             set latest_revision 0
</span><del>-            if {[info exists portinfo(revision)] &amp;&amp; $portinfo(revision) &gt; 0} { 
</del><ins>+            if {[info exists portinfo(revision)] &amp;&amp; $portinfo(revision) &gt; 0} {
</ins><span class="cx">                 set latest_revision $portinfo(revision)
</span><span class="cx">             }
</span><span class="cx">             set latest_compound &quot;${latest_version}_${latest_revision}&quot;
</span><span class="cx">             set latest_epoch 0
</span><del>-            if {[info exists portinfo(epoch)]} { 
</del><ins>+            if {[info exists portinfo(epoch)]} {
</ins><span class="cx">                 set latest_epoch $portinfo(epoch)
</span><span class="cx">             }
</span><del>-            
</del><ins>+
</ins><span class="cx">             # Compare versions, first checking epoch, then version, then revision
</span><span class="cx">             set epoch_comp_result [expr {$installed_epoch - $latest_epoch}]
</span><span class="cx">             set comp_result [vercmp $installed_version $latest_version]
</span><span class="lines">@@ -3389,10 +3389,10 @@
</span><span class="cx">                     set reason { (platform $os_platform_installed $os_major_installed != ${macports::os_platform} ${macports::os_major})}
</span><span class="cx">                 }
</span><span class="cx">             }
</span><del>-            
</del><ins>+
</ins><span class="cx">             # Report outdated (or, for verbose, predated) versions
</span><span class="cx">             if { $comp_result != 0 } {
</span><del>-                            
</del><ins>+
</ins><span class="cx">                 # Form a relation between the versions
</span><span class="cx">                 set flag &quot;&quot;
</span><span class="cx">                 if { $comp_result &gt; 0 } {
</span><span class="lines">@@ -3401,10 +3401,10 @@
</span><span class="cx">                 } else {
</span><span class="cx">                     set relation &quot;&lt;&quot;
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 # Emit information
</span><span class="cx">                 if {$comp_result &lt; 0 || [macports::ui_isset ports_verbose]} {
</span><del>-                
</del><ins>+
</ins><span class="cx">                     if {$num_outdated == 0} {
</span><span class="cx">                         ui_notice &quot;The following installed ports are outdated:&quot;
</span><span class="cx">                     }
</span><span class="lines">@@ -3412,10 +3412,10 @@
</span><span class="cx"> 
</span><span class="cx">                     puts [format &quot;%-30s %-24s %1s&quot; $portname &quot;$installed_compound $relation $latest_compound [subst $reason]&quot; $flag]
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">             }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         if {$num_outdated == 0} {
</span><span class="cx">             ui_notice &quot;No installed ports are outdated.&quot;
</span><span class="cx">         }
</span><span class="lines">@@ -3424,7 +3424,7 @@
</span><span class="cx">     } else {
</span><span class="cx">         ui_notice &quot;No ports are installed.&quot;
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $status
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3805,12 +3805,12 @@
</span><span class="cx"> proc action_list { action portlist opts } {
</span><span class="cx">     global private_options
</span><span class="cx">     set status 0
</span><del>-    
</del><ins>+
</ins><span class="cx">     # Default to list all ports if no portnames are supplied
</span><span class="cx">     if { ![llength $portlist] &amp;&amp; [info exists private_options(ports_no_args)] &amp;&amp; $private_options(ports_no_args) eq &quot;yes&quot;} {
</span><span class="cx">         add_to_portlist portlist [list name &quot;-all-&quot;]
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     foreachport $portlist {
</span><span class="cx">         if {$portname eq &quot;-all-&quot;} {
</span><span class="cx">            if {[catch {set res [mportlistall]} result]} {
</span><span class="lines">@@ -3841,7 +3841,7 @@
</span><span class="cx">             puts [format &quot;%-30s @%-14s %s&quot; $portinfo(name) $portinfo(version) $outdir]
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $status
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3880,7 +3880,7 @@
</span><span class="cx">     global env boot_env current_portdir
</span><span class="cx"> 
</span><span class="cx">     array set local_options $opts
</span><del>-    
</del><ins>+
</ins><span class="cx">     set status 0
</span><span class="cx">     if {[require_portlist portlist]} {
</span><span class="cx">         return 1
</span><span class="lines">@@ -3889,7 +3889,7 @@
</span><span class="cx">         array unset portinfo
</span><span class="cx">         # If we have a url, use that, since it's most specific, otherwise try to map the portname to a url
</span><span class="cx">         if {$porturl eq &quot;&quot;} {
</span><del>-        
</del><ins>+
</ins><span class="cx">             # Verify the portname, getting portinfo to map to a porturl
</span><span class="cx">             if {[catch {set res [mportlookup $portname]} result]} {
</span><span class="cx">                 global errorInfo
</span><span class="lines">@@ -3903,13 +3903,13 @@
</span><span class="cx">             set porturl $portinfo(porturl)
</span><span class="cx">             set portname $portinfo(name)
</span><span class="cx">         }
</span><del>-        
-        
</del><ins>+
+
</ins><span class="cx">         # Calculate portdir, porturl, and portfile from initial porturl
</span><span class="cx">         set portdir [file normalize [macports::getportdir $porturl]]
</span><span class="cx">         set porturl &quot;file://${portdir}&quot;;    # Rebuild url so it's fully qualified
</span><span class="cx">         set portfile &quot;${portdir}/Portfile&quot;
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Now execute the specific action
</span><span class="cx">         if {[file readable $portfile]} {
</span><span class="cx">             switch -- $action {
</span><span class="lines">@@ -3921,17 +3921,17 @@
</span><span class="cx">                     }
</span><span class="cx">                     close $f
</span><span class="cx">                 }
</span><del>-                
</del><ins>+
</ins><span class="cx">                 edit {
</span><span class="cx">                     # Edit the port's portfile with the user's editor
</span><del>-                    
</del><ins>+
</ins><span class="cx">                     # Restore our entire environment from start time.
</span><span class="cx">                     # We need it to evaluate the editor, and the editor
</span><span class="cx">                     # may want stuff from it as well, like TERM.
</span><span class="cx">                     array unset env_save; array set env_save [array get env]
</span><span class="cx">                     array unset env *
</span><span class="cx">                     array set env [array get boot_env]
</span><del>-                    
</del><ins>+
</ins><span class="cx">                     # Find an editor to edit the portfile
</span><span class="cx">                     set editor &quot;&quot;
</span><span class="cx">                     set editor_var &quot;ports_${action}_editor&quot;
</span><span class="lines">@@ -3945,17 +3945,17 @@
</span><span class="cx">                             }
</span><span class="cx">                         }
</span><span class="cx">                     }
</span><del>-                    
</del><ins>+
</ins><span class="cx">                     # Use a reasonable canned default if no editor specified or set in env
</span><span class="cx">                     if { $editor eq &quot;&quot; } { set editor &quot;/usr/bin/vi&quot; }
</span><del>-                    
</del><ins>+
</ins><span class="cx">                     # Invoke the editor
</span><span class="cx">                     if {[catch {exec -ignorestderr &gt;@stdout &lt;@stdin {*}$editor $portfile} result]} {
</span><span class="cx">                         global errorInfo
</span><span class="cx">                         ui_debug &quot;$errorInfo&quot;
</span><span class="cx">                         break_softcontinue &quot;unable to invoke editor $editor: $result&quot; 1 status
</span><span class="cx">                     }
</span><del>-                    
</del><ins>+
</ins><span class="cx">                     # Restore internal MacPorts environment
</span><span class="cx">                     array unset env *
</span><span class="cx">                     array set env [array get env_save]
</span><span class="lines">@@ -4032,7 +4032,7 @@
</span><span class="cx">             break_softcontinue &quot;Could not read $portfile&quot; 1 status
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $status
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4047,7 +4047,7 @@
</span><span class="cx">         ui_msg &quot;port sync failed: $result&quot;
</span><span class="cx">         set status 1
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $status
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4136,14 +4136,14 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         mportclose $workername
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Process any error that wasn't thrown and handled already
</span><span class="cx">         if {$result} {
</span><span class="cx">             print_tickets_url
</span><span class="cx">             break_softcontinue &quot;Processing of port $portname failed&quot; 1 status
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     if {$status == 0 &amp;&amp; $action eq &quot;install&quot; &amp;&amp; ![macports::global_option_isset ports_dryrun]} {
</span><span class="cx">         array set options $opts
</span><span class="cx">         if {![info exists options(ports_nodeps)] &amp;&amp; ![info exists options(ports_install_no-rev-upgrade)] &amp;&amp; ${macports::revupgrade_autorun}} {
</span><span class="lines">@@ -4316,7 +4316,7 @@
</span><span class="cx"> # Returns an action proc, or a list of matching action procs, or the action passed in
</span><span class="cx"> proc find_action { action } {
</span><span class="cx">     global action_array
</span><del>-    
</del><ins>+
</ins><span class="cx">     if { ! [info exists action_array($action)] } {
</span><span class="cx">         set guess [guess_action $action]
</span><span class="cx">         if { [info exists action_array($guess)] } {
</span><span class="lines">@@ -4324,7 +4324,7 @@
</span><span class="cx">         }
</span><span class="cx">         return $guess
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $action
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4332,7 +4332,7 @@
</span><span class="cx"> # If there's more than one match, return the next possibility
</span><span class="cx"> proc find_action_proc { action } {
</span><span class="cx">     global action_array
</span><del>-    
</del><ins>+
</ins><span class="cx">     set action_proc &quot;&quot;
</span><span class="cx">     if { [info exists action_array($action)] } {
</span><span class="cx">         set action_proc [lindex $action_array($action) 0]
</span><span class="lines">@@ -4342,18 +4342,18 @@
</span><span class="cx">             set action_proc [lindex $action_array($action) 0]
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $action_proc
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> proc get_action_proc { action } {
</span><span class="cx">     global action_array
</span><del>-    
</del><ins>+
</ins><span class="cx">     set action_proc &quot;&quot;
</span><span class="cx">     if { [info exists action_array($action)] } {
</span><span class="cx">         set action_proc [lindex $action_array($action) 0]
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $action_proc
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4464,10 +4464,10 @@
</span><span class="cx">     upvar $ui_options_name ui_options
</span><span class="cx">     upvar $global_options_name global_options
</span><span class="cx">     global cmdname cmd_opts_array
</span><del>-    
</del><ins>+
</ins><span class="cx">     while {[moreargs]} {
</span><span class="cx">         set arg [lookahead]
</span><del>-        
</del><ins>+
</ins><span class="cx">         if {[string index $arg 0] ne &quot;-&quot;} {
</span><span class="cx">             break
</span><span class="cx">         } elseif {[string index $arg 1] eq &quot;-&quot;} {
</span><span class="lines">@@ -4528,7 +4528,7 @@
</span><span class="cx">                         # Ignore errors while processing within a command
</span><span class="cx">                         set ui_options(ports_processall) yes
</span><span class="cx">                     }
</span><del>-                    N { 
</del><ins>+                    N {
</ins><span class="cx">                         # Interactive mode is available or not
</span><span class="cx">                         set ui_options(ports_noninteractive) yes
</span><span class="cx">                     }
</span><span class="lines">@@ -4623,12 +4623,12 @@
</span><span class="cx">     while {($action_status == 0 || [macports::ui_isset ports_processall]) &amp;&amp; [moreargs]} {
</span><span class="cx">         set action [lookahead]
</span><span class="cx">         advance
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Handle command separator
</span><span class="cx">         if { $action == &quot;;&quot; } {
</span><span class="cx">             continue
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Handle a comment
</span><span class="cx">         if { [string index $action 0] == &quot;#&quot; } {
</span><span class="cx">             while { [moreargs] } { advance }
</span><span class="lines">@@ -4646,11 +4646,11 @@
</span><span class="cx">         }
</span><span class="cx">         # Always start out processing an action in current_portdir
</span><span class="cx">         cd $current_portdir
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Reset global_options from base before each action, as we munge it just below...
</span><span class="cx">         array unset global_options
</span><span class="cx">         array set global_options $global_options_base
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Find an action to execute
</span><span class="cx">         set actions [find_action $action]
</span><span class="cx">         if {[llength $actions] == 1} {
</span><span class="lines">@@ -4719,7 +4719,7 @@
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         # execute the action
</span><span class="cx">         set action_status [$action_proc $action $portlist [array get global_options]]
</span><span class="cx"> 
</span><span class="lines">@@ -4734,14 +4734,14 @@
</span><span class="cx">         # semaphore to exit
</span><span class="cx">         if {$action_status == -999} break
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $action_status
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-proc complete_portname { text state } { 
</del><ins>+proc complete_portname { text state } {
</ins><span class="cx">     global complete_choices complete_position
</span><del>-    
</del><ins>+
</ins><span class="cx">     if {$state == 0} {
</span><span class="cx">         set complete_position 0
</span><span class="cx">         set complete_choices {}
</span><span class="lines">@@ -4756,16 +4756,16 @@
</span><span class="cx">             lappend complete_choices $name
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     set word [lindex $complete_choices $complete_position]
</span><span class="cx">     incr complete_position
</span><del>-    
</del><ins>+
</ins><span class="cx">     return $word
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> # return text action beginning with $text
</span><del>-proc complete_action { text state } {   
</del><ins>+proc complete_action { text state } {
</ins><span class="cx">     global action_array complete_choices complete_position
</span><span class="cx"> 
</span><span class="cx">     if {$state == 0} {
</span><span class="lines">@@ -4780,7 +4780,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> # return all actions beginning with $text
</span><del>-proc guess_action { text } {   
</del><ins>+proc guess_action { text } {
</ins><span class="cx">     global action_array
</span><span class="cx"> 
</span><span class="cx">     return [array names action_array &quot;[string tolower $text]*&quot;]
</span><span class="lines">@@ -4801,14 +4801,14 @@
</span><span class="cx"> 
</span><span class="cx">     # Decide how to do completion based on where we are in the string
</span><span class="cx">     set prefix [string range $text 0 [expr {$start - 1}]]
</span><del>-    
</del><ins>+
</ins><span class="cx">     # If only whitespace characters preceed us, or if the
</span><span class="cx">     # previous non-whitespace character was a ;, then we're
</span><span class="cx">     # an action (the first word of a command)
</span><span class="cx">     if { [regexp {(^\s*$)|(;\s*$)} $prefix] } {
</span><span class="cx">         return complete_action
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     # Otherwise, do completion on portname
</span><span class="cx">     return complete_portname
</span><span class="cx"> }
</span><span class="lines">@@ -4816,7 +4816,7 @@
</span><span class="cx"> 
</span><span class="cx"> proc get_next_cmdline { in out use_readline prompt linename } {
</span><span class="cx">     upvar $linename line
</span><del>-    
</del><ins>+
</ins><span class="cx">     set line &quot;&quot;
</span><span class="cx">     while { $line eq &quot;&quot; } {
</span><span class="cx"> 
</span><span class="lines">@@ -4831,14 +4831,14 @@
</span><span class="cx">         if { $len &lt; 0 } {
</span><span class="cx">             return -1
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         set line [string trim $line]
</span><span class="cx"> 
</span><span class="cx">         if { $use_readline &amp;&amp; $line ne &quot;&quot; } {
</span><span class="cx">             rl_history add $line
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return [llength $line]
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4885,7 +4885,7 @@
</span><span class="cx"> 
</span><span class="cx">         # Process the command
</span><span class="cx">         set exit_status [process_cmd $line]
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Check for semaphore to exit
</span><span class="cx">         if {$exit_status == -999} {
</span><span class="cx">             set exit_status 0
</span><span class="lines">@@ -5330,7 +5330,7 @@
</span><span class="cx"> 
</span><span class="cx"> # Create namespace for questions
</span><span class="cx"> namespace eval portclient::questions {
</span><del>-    
</del><ins>+
</ins><span class="cx">     package require Tclx
</span><span class="cx">     ##
</span><span class="cx">     # Function that handles printing of a timeout.
</span><span class="lines">@@ -5361,7 +5361,7 @@
</span><span class="cx">         signal -restart error {TERM INT}
</span><span class="cx">         return $def
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     ##
</span><span class="cx">     # Main function that displays numbered choices for a multiple choice question.
</span><span class="cx">     #
</span><span class="lines">@@ -5374,7 +5374,7 @@
</span><span class="cx">     proc ui_choice {msg name ports} {
</span><span class="cx">         # Print the main message
</span><span class="cx">         puts $msg
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Print portname or port list suitably
</span><span class="cx">         set i 1
</span><span class="cx">         foreach port $ports {
</span><span class="lines">@@ -5383,9 +5383,9 @@
</span><span class="cx">             incr i
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     ##
</span><del>-    # Displays a question with 'yes' and 'no' as options. 
</del><ins>+    # Displays a question with 'yes' and 'no' as options.
</ins><span class="cx">     # Waits for user input indefinitely unless a timeout is specified.
</span><span class="cx">     # Shows the list of port passed to it without any numbers.
</span><span class="cx">     #
</span><span class="lines">@@ -5408,10 +5408,10 @@
</span><span class="cx">         } else {
</span><span class="cx">             set default 1
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         puts -nonewline $msg
</span><span class="cx">         set leftmargin &quot; &quot;
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Print portname or port list suitably
</span><span class="cx">         if {[llength $ports] == 1} {
</span><span class="cx">             puts -nonewline &quot; &quot;
</span><span class="lines">@@ -5420,17 +5420,17 @@
</span><span class="cx">         } else {
</span><span class="cx">             puts &quot;&quot;
</span><span class="cx">             foreach port $ports {
</span><del>-                puts -nonewline $leftmargin  
</del><ins>+                puts -nonewline $leftmargin
</ins><span class="cx">                 puts [string map {@ &quot; @&quot;} $port]
</span><span class="cx">             }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         # Check if timeout is set or not
</span><span class="cx">         if {$timeout &gt; 0} {
</span><span class="cx">             # Run ui_timeout and skip the rest of the stuff here
</span><del>-            return [ui_timeout $default $timeout] 
</del><ins>+            return [ui_timeout $default $timeout]
</ins><span class="cx">         }
</span><del>-                
</del><ins>+
</ins><span class="cx">         # Check for the default and print accordingly
</span><span class="cx">         if {$def == {y}} {
</span><span class="cx">             puts -nonewline &quot;${question} \[Y/n\]: &quot;
</span><span class="lines">@@ -5439,8 +5439,8 @@
</span><span class="cx">             puts -nonewline &quot;${question} \[y/N\]: &quot;
</span><span class="cx">             flush stdout
</span><span class="cx">         }
</span><del>-        
-        # User input (probably requires some input error checking code) 
</del><ins>+
+        # User input (probably requires some input error checking code)
</ins><span class="cx">         while 1 {
</span><span class="cx">             signal error {TERM INT}
</span><span class="cx">             if {[catch {set input [gets stdin]} err]} {
</span><span class="lines">@@ -5458,7 +5458,7 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     ##
</span><span class="cx">     # Displays a question with a list of numbered choices and asks the user to enter a number to specify their choice.
</span><span class="cx">     # Waits for user input indefinitely.
</span><span class="lines">@@ -5471,7 +5471,7 @@
</span><span class="cx">     #        The port/list of ports for which the question is being asked.
</span><span class="cx">     proc ui_ask_singlechoice {msg name ports} {
</span><span class="cx">         ui_choice $msg $name $ports
</span><del>-                
</del><ins>+
</ins><span class="cx">         # User Input (single input restriction)
</span><span class="cx">         while 1 {
</span><span class="cx">             puts -nonewline &quot;Enter a number to select an option: &quot;
</span><span class="lines">@@ -5488,7 +5488,7 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     ##
</span><span class="cx">     # Displays a question with a list of numbered choices and asks the user to enter a space separated string of numbers to specify their choice.
</span><span class="cx">     # Waits for user input indefinitely.
</span><span class="lines">@@ -5500,10 +5500,10 @@
</span><span class="cx">     # @param ports
</span><span class="cx">     #        The list of ports for which the question is being asked.
</span><span class="cx">     proc ui_ask_multichoice {msg name ports} {
</span><del>-        
</del><ins>+
</ins><span class="cx">         ui_choice $msg $name $ports
</span><del>-                
-        # User Input (with Multiple input parsing) 
</del><ins>+
+        # User Input (with Multiple input parsing)
</ins><span class="cx">         while 1 {
</span><span class="cx">             puts -nonewline &quot;Enter the numbers to select the options: &quot;
</span><span class="cx">             flush stdout
</span></span></pre>
</div>
</div>

</body>
</html>