<!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>[137086] trunk/base/src/macports1.0/macports.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/137086">137086</a></dd>
<dt>Author</dt> <dd>jmr@macports.org</dd>
<dt>Date</dt> <dd>2015-06-04 05:29:17 -0700 (Thu, 04 Jun 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>style cleanups, evaluate boolean variables directly rather than by string comparison with &quot;yes&quot;, use agreed-upon quoting style for string literals in conditional expressions</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbasesrcmacports10macportstcl">trunk/base/src/macports1.0/macports.tcl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbasesrcmacports10macportstcl"></a>
<div class="modfile"><h4>Modified: trunk/base/src/macports1.0/macports.tcl (137085 => 137086)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/macports1.0/macports.tcl        2015-06-04 11:25:45 UTC (rev 137085)
+++ trunk/base/src/macports1.0/macports.tcl        2015-06-04 12:29:17 UTC (rev 137086)
</span><span class="lines">@@ -115,9 +115,7 @@
</span><span class="cx"> # ui_options accessor
</span><span class="cx"> proc macports::ui_isset {val} {
</span><span class="cx">     if {[info exists macports::ui_options($val)]} {
</span><del>-        if {$macports::ui_options($val) eq {yes}} {
-            return 1
-        }
</del><ins>+        return [string is true -strict $macports::ui_options($val)]
</ins><span class="cx">     }
</span><span class="cx">     return 0
</span><span class="cx"> }
</span><span class="lines">@@ -126,9 +124,7 @@
</span><span class="cx"> # global_options accessor
</span><span class="cx"> proc macports::global_option_isset {val} {
</span><span class="cx">     if {[info exists macports::global_options($val)]} {
</span><del>-        if {$macports::global_options($val) eq {yes}} {
-            return 1
-        }
</del><ins>+        return [string is true -strict $macports::global_options($val)]
</ins><span class="cx">     }
</span><span class="cx">     return 0
</span><span class="cx"> }
</span><span class="lines">@@ -212,7 +208,7 @@
</span><span class="cx"> proc set_phase {phase} {
</span><span class="cx">     global macports::current_phase
</span><span class="cx">     set macports::current_phase $phase
</span><del>-    if {$phase ne {main}} {
</del><ins>+    if {$phase ne &quot;main&quot;} {
</ins><span class="cx">         set cur_time [clock format [clock seconds] -format  {%+}]
</span><span class="cx">         ui_debug &quot;$phase phase started at $cur_time&quot;
</span><span class="cx">     }
</span><span class="lines">@@ -227,7 +223,7 @@
</span><span class="cx">     switch [llength $args] {
</span><span class="cx">        0 - 1 {}
</span><span class="cx">        2 {
</span><del>-           if {[lindex $args 0] ne {-nonewline}} {
</del><ins>+           if {[lindex $args 0] ne &quot;-nonewline&quot;} {
</ins><span class="cx">                set hint &quot;error: when 5 arguments are given, 2nd last must be \&quot;-newnewline\&quot;&quot;
</span><span class="cx">                error &quot;$hint\nusage: ui_message priority prefix phase ?-nonewline? string&quot;
</span><span class="cx">            }
</span><span class="lines">@@ -239,20 +235,20 @@
</span><span class="cx">     } 
</span><span class="cx"> 
</span><span class="cx">     foreach chan $macports::channels($priority) {
</span><del>-        if {[info exists ::debuglog] &amp;&amp; ($chan eq {debuglog})} {
</del><ins>+        if {[info exists ::debuglog] &amp;&amp; ($chan eq &quot;debuglog&quot;)} {
</ins><span class="cx">             set chan $::debuglog
</span><span class="cx">             if {[info exists macports::current_phase]} {
</span><span class="cx">                 set phase $macports::current_phase
</span><span class="cx">             }
</span><span class="cx">             set strprefix &quot;:${priority}:$phase &quot;
</span><del>-            if {[lindex $args 0] eq {-nonewline}} {
</del><ins>+            if {[lindex $args 0] eq &quot;-nonewline&quot;} {
</ins><span class="cx">                 puts -nonewline $chan $strprefix[lindex $args 1]
</span><span class="cx">             } else {
</span><span class="cx">                 puts $chan $strprefix[lindex $args 0]
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">         } else {
</span><del>-            if {[lindex $args 0] eq {-nonewline}} {
</del><ins>+            if {[lindex $args 0] eq &quot;-nonewline&quot;} {
</ins><span class="cx">                 puts -nonewline $chan $prefix[lindex $args 1]
</span><span class="cx">             } else {
</span><span class="cx">                 puts $chan $prefix[lindex $args 0]
</span><span class="lines">@@ -366,7 +362,7 @@
</span><span class="cx"> # find a binary either in a path defined at MacPorts' configuration time
</span><span class="cx"> # or in the PATH environment variable through macports::binaryInPath (fallback)
</span><span class="cx"> proc macports::findBinary {prog {autoconf_hint {}}} {
</span><del>-    if {$autoconf_hint ne {} &amp;&amp; [file executable $autoconf_hint]} {
</del><ins>+    if {$autoconf_hint ne &quot;&quot; &amp;&amp; [file executable $autoconf_hint]} {
</ins><span class="cx">         return $autoconf_hint
</span><span class="cx">     } else {
</span><span class="cx">         if {[catch {set cmd_path [macports::binaryInPath $prog]} result] == 0} {
</span><span class="lines">@@ -632,8 +628,8 @@
</span><span class="cx"> 
</span><span class="cx">     # set up platform info variables
</span><span class="cx">     set os_arch $tcl_platform(machine)
</span><del>-    if {$os_arch eq {Power Macintosh}} {set os_arch &quot;powerpc&quot;}
-    if {$os_arch eq {i586} || $os_arch eq {i686} || $os_arch eq {x86_64}} {set os_arch &quot;i386&quot;}
</del><ins>+    if {$os_arch eq &quot;Power Macintosh&quot;} {set os_arch &quot;powerpc&quot;}
+    if {$os_arch eq &quot;i586&quot; || $os_arch eq &quot;i686&quot; || $os_arch eq &quot;x86_64&quot;} {set os_arch &quot;i386&quot;}
</ins><span class="cx">     set os_version $tcl_platform(osVersion)
</span><span class="cx">     set os_major [lindex [split $os_version .] 0]
</span><span class="cx">     set os_minor [lindex [split $os_version .] 1]
</span><span class="lines">@@ -661,10 +657,10 @@
</span><span class="cx">     if {[info exists env(HOME)]} {
</span><span class="cx">         set macports::user_home $env(HOME)
</span><span class="cx">         set macports::macports_user_dir [file normalize $macports::autoconf::macports_user_dir]
</span><del>-    } elseif {[info exists env(SUDO_USER)] &amp;&amp; $os_platform eq {darwin}} {
</del><ins>+    } elseif {[info exists env(SUDO_USER)] &amp;&amp; $os_platform eq &quot;darwin&quot;} {
</ins><span class="cx">         set macports::user_home [exec dscl -q . -read /Users/$env(SUDO_USER) NFSHomeDirectory | cut -d ' ' -f 2]
</span><span class="cx">         set macports::macports_user_dir [file join $macports::user_home [string range $macports::autoconf::macports_user_dir 2 end]]
</span><del>-    } elseif {[exec id -u] != 0 &amp;&amp; $os_platform eq {darwin}} {
</del><ins>+    } elseif {[exec id -u] != 0 &amp;&amp; $os_platform eq &quot;darwin&quot;} {
</ins><span class="cx">         set macports::user_home [exec dscl -q . -read /Users/[exec id -un] NFSHomeDirectory | cut -d ' ' -f 2]
</span><span class="cx">         set macports::macports_user_dir [file join $macports::user_home [string range $macports::autoconf::macports_user_dir 2 end]]
</span><span class="cx">     } else {
</span><span class="lines">@@ -732,7 +728,7 @@
</span><span class="cx">                     if {[lsearch -exact [list nosync default] $flag] == -1} {
</span><span class="cx">                         ui_warn &quot;$sources_conf source '$line' specifies invalid flag '$flag'&quot;
</span><span class="cx">                     }
</span><del>-                    if {$flag eq {default}} {
</del><ins>+                    if {$flag eq &quot;default&quot;} {
</ins><span class="cx">                         if {[info exists sources_default]} {
</span><span class="cx">                             ui_warn &quot;More than one default port source is defined.&quot;
</span><span class="cx">                         }
</span><span class="lines">@@ -820,7 +816,7 @@
</span><span class="cx"> 
</span><span class="cx">     # Format for receipts; currently only &quot;sqlite&quot; is allowed
</span><span class="cx">     # could previously be &quot;flat&quot;, so we switch that to sqlite
</span><del>-    if {![info exists portdbformat] || $portdbformat eq {flat} || $portdbformat eq {sqlite}} {
</del><ins>+    if {![info exists portdbformat] || $portdbformat eq &quot;flat&quot; || $portdbformat eq &quot;sqlite&quot;} {
</ins><span class="cx">         set registry.format receipt_sqlite
</span><span class="cx">     } else {
</span><span class="cx">         return -code error &quot;unknown registry format '$portdbformat' set in macports.conf&quot;
</span><span class="lines">@@ -858,13 +854,13 @@
</span><span class="cx">     if {![info exists macports::global_options(ports_binary_only)]
</span><span class="cx">         &amp;&amp; ![info exists macports::global_options(ports_source_only)]
</span><span class="cx">         &amp;&amp; [info exists macports::buildfromsource]} {
</span><del>-        if {$macports::buildfromsource eq {never}} {
</del><ins>+        if {$macports::buildfromsource eq &quot;never&quot;} {
</ins><span class="cx">             set macports::global_options(ports_binary_only) yes
</span><span class="cx">             set temp_options(ports_binary_only) yes
</span><del>-        } elseif {$macports::buildfromsource eq {always}} {
</del><ins>+        } elseif {$macports::buildfromsource eq &quot;always&quot;} {
</ins><span class="cx">             set macports::global_options(ports_source_only) yes
</span><span class="cx">             set temp_options(ports_source_only) yes
</span><del>-        } elseif {$macports::buildfromsource ne {ifneeded}} {
</del><ins>+        } elseif {$macports::buildfromsource ne &quot;ifneeded&quot;} {
</ins><span class="cx">             ui_warn &quot;'buildfromsource' set to unknown value '$macports::buildfromsource', using 'ifneeded' instead&quot;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -986,7 +982,7 @@
</span><span class="cx"> 
</span><span class="cx">     # Default arch to build for
</span><span class="cx">     if {![info exists macports::build_arch]} {
</span><del>-        if {$os_platform eq {darwin}} {
</del><ins>+        if {$os_platform eq &quot;darwin&quot;} {
</ins><span class="cx">             if {$os_major &gt;= 10} {
</span><span class="cx">                 if {[sysctl hw.cpu64bit_capable] == 1} {
</span><span class="cx">                     set macports::build_arch x86_64
</span><span class="lines">@@ -994,7 +990,7 @@
</span><span class="cx">                     set macports::build_arch i386
</span><span class="cx">                 }
</span><span class="cx">             } else {
</span><del>-                if {$os_arch eq {powerpc}} {
</del><ins>+                if {$os_arch eq &quot;powerpc&quot;} {
</ins><span class="cx">                     set macports::build_arch ppc
</span><span class="cx">                 } else {
</span><span class="cx">                     set macports::build_arch i386
</span><span class="lines">@@ -1076,7 +1072,7 @@
</span><span class="cx">     # don't keep unusable TMPDIR/TMP values
</span><span class="cx">     foreach var {TMP TMPDIR} {
</span><span class="cx">         if {[info exists env($var)] &amp;&amp; [file writable $env($var)] &amp;&amp;
</span><del>-            ([getuid] != 0 || $macportsuser eq {root} ||
</del><ins>+            ([getuid] != 0 || $macportsuser eq &quot;root&quot; ||
</ins><span class="cx">              [file attributes $env($var) -owner] eq $macportsuser)} {
</span><span class="cx">             lappend keepenvkeys $var
</span><span class="cx">         }
</span><span class="lines">@@ -1090,7 +1086,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     # unset environment an extra time, to work around bugs in Leopard Tcl
</span><del>-    if {$macosx_version eq {10.5}} {
</del><ins>+    if {$macosx_version eq &quot;10.5&quot;} {
</ins><span class="cx">         foreach envkey $env_names {
</span><span class="cx">             if {[lsearch -exact $keepenvkeys $envkey] == -1} {
</span><span class="cx">                 unsetenv $envkey
</span><span class="lines">@@ -1105,20 +1101,20 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if {![info exists developer_dir]} {
</span><del>-        if {$os_platform eq {darwin}} {
</del><ins>+        if {$os_platform eq &quot;darwin&quot;} {
</ins><span class="cx">             trace add variable macports::developer_dir read macports::set_developer_dir
</span><span class="cx">         } else {
</span><span class="cx">             set macports::developer_dir {}
</span><span class="cx">         }
</span><span class="cx">     } else {
</span><del>-        if {$os_platform eq {darwin} &amp;&amp; ![file isdirectory $developer_dir]} {
</del><ins>+        if {$os_platform eq &quot;darwin&quot; &amp;&amp; ![file isdirectory $developer_dir]} {
</ins><span class="cx">             ui_warn &quot;Your developer_dir setting in macports.conf points to a non-existing directory.\
</span><span class="cx">                 Since this is known to cause problems, please correct the setting or comment it and let\
</span><span class="cx">                 macports auto-discover the correct path.&quot;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if {[getuid] == 0 &amp;&amp; $os_major &gt;= 11 &amp;&amp; $os_platform eq {darwin} &amp;&amp;
</del><ins>+    if {[getuid] == 0 &amp;&amp; $os_major &gt;= 11 &amp;&amp; $os_platform eq &quot;darwin&quot; &amp;&amp;
</ins><span class="cx">             [file isfile &quot;${macports::user_home}/Library/Preferences/com.apple.dt.Xcode.plist&quot;]} {
</span><span class="cx">         macports::copy_xcode_plist $env(HOME)
</span><span class="cx">     }
</span><span class="lines">@@ -1139,39 +1135,39 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     # Proxy handling (done this late since Pextlib is needed)
</span><del>-    if {![info exists proxy_override_env]} {
</del><ins>+    if {![info exists proxy_override_env] || ![string is true -strict $proxy_override_env]} {
</ins><span class="cx">         set proxy_override_env no
</span><span class="cx">     }
</span><span class="cx">     if {[catch {array set sysConfProxies [get_systemconfiguration_proxies]} result]} {
</span><span class="cx">         return -code error &quot;Unable to get proxy configuration from system: $result&quot;
</span><span class="cx">     }
</span><del>-    if {![info exists env(http_proxy)] || $proxy_override_env eq {yes}} {
</del><ins>+    if {![info exists env(http_proxy)] || $proxy_override_env} {
</ins><span class="cx">         if {[info exists proxy_http]} {
</span><span class="cx">             set env(http_proxy) $proxy_http
</span><span class="cx">         } elseif {[info exists sysConfProxies(proxy_http)]} {
</span><span class="cx">             set env(http_proxy) $sysConfProxies(proxy_http)
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    if {![info exists env(HTTPS_PROXY)] || $proxy_override_env eq {yes}} {
</del><ins>+    if {![info exists env(HTTPS_PROXY)] || $proxy_override_env} {
</ins><span class="cx">         if {[info exists proxy_https]} {
</span><span class="cx">             set env(HTTPS_PROXY) $proxy_https
</span><span class="cx">         } elseif {[info exists sysConfProxies(proxy_https)]} {
</span><span class="cx">             set env(HTTPS_PROXY) $sysConfProxies(proxy_https)
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    if {![info exists env(FTP_PROXY)] || $proxy_override_env eq {yes}} {
</del><ins>+    if {![info exists env(FTP_PROXY)] || $proxy_override_env} {
</ins><span class="cx">         if {[info exists proxy_ftp]} {
</span><span class="cx">             set env(FTP_PROXY) $proxy_ftp
</span><span class="cx">         } elseif {[info exists sysConfProxies(proxy_ftp)]} {
</span><span class="cx">             set env(FTP_PROXY) $sysConfProxies(proxy_ftp)
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    if {![info exists env(RSYNC_PROXY)] || $proxy_override_env eq {yes}} {
</del><ins>+    if {![info exists env(RSYNC_PROXY)] || $proxy_override_env} {
</ins><span class="cx">         if {[info exists proxy_rsync]} {
</span><span class="cx">             set env(RSYNC_PROXY) $proxy_rsync
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    if {![info exists env(NO_PROXY)] || $proxy_override_env eq {yes}} {
</del><ins>+    if {![info exists env(NO_PROXY)] || $proxy_override_env} {
</ins><span class="cx">         if {[info exists proxy_skip]} {
</span><span class="cx">             set env(NO_PROXY) $proxy_skip
</span><span class="cx">         } elseif {[info exists sysConfProxies(proxy_skip)]} {
</span><span class="lines">@@ -1205,7 +1201,7 @@
</span><span class="cx"> 
</span><span class="cx">     if {![info exists macports::ui_options(ports_no_old_index_warning)]} {
</span><span class="cx">         set default_source_url [lindex $sources_default 0]
</span><del>-        if {[macports::getprotocol $default_source_url] eq {file} || [macports::getprotocol $default_source_url] eq {rsync}} {
</del><ins>+        if {[macports::getprotocol $default_source_url] eq &quot;file&quot; || [macports::getprotocol $default_source_url] eq &quot;rsync&quot;} {
</ins><span class="cx">             set default_portindex [macports::getindex $default_source_url]
</span><span class="cx">             if {[file exists $default_portindex] &amp;&amp; [clock seconds] - [file mtime $default_portindex] &gt; 1209600} {
</span><span class="cx">                 ui_warn &quot;port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.&quot;
</span><span class="lines">@@ -1504,7 +1500,7 @@
</span><span class="cx">         ui_msg &quot;$macports::ui_prefix Fetching port $url&quot;
</span><span class="cx">         set fetchfile [file tail $url]
</span><span class="cx">         set progressflag {}
</span><del>-        if {$macports::portverbose eq {yes}} {
</del><ins>+        if {$macports::portverbose} {
</ins><span class="cx">             set progressflag &quot;--progress builtin&quot;
</span><span class="cx">         } elseif {[info exists macports::ui_options(progress_download)]} {
</span><span class="cx">             set progressflag &quot;--progress ${macports::ui_options(progress_download)}&quot;
</span><span class="lines">@@ -1654,7 +1650,7 @@
</span><span class="cx">     # append requested path
</span><span class="cx">     set proposedpath [file join $proposedpath _resources $path]
</span><span class="cx"> 
</span><del>-    if {$fallback eq {yes} &amp;&amp; ![file exists $proposedpath]} {
</del><ins>+    if {$fallback &amp;&amp; ![file exists $proposedpath]} {
</ins><span class="cx">         return [getdefaultportresourcepath $path]
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1670,7 +1666,7 @@
</span><span class="cx">     global macports::sources_default
</span><span class="cx"> 
</span><span class="cx">     set default_source_url [lindex $sources_default 0]
</span><del>-    if {[getprotocol $default_source_url] eq {file}} {
</del><ins>+    if {[getprotocol $default_source_url] eq &quot;file&quot;} {
</ins><span class="cx">         set proposedpath [getportdir $default_source_url]
</span><span class="cx">     } else {
</span><span class="cx">         set proposedpath [getsourcepath $default_source_url]
</span><span class="lines">@@ -1709,12 +1705,12 @@
</span><span class="cx"> 
</span><span class="cx">     # Look for an already-open MPort with the same URL.
</span><span class="cx">     # if found, return the existing reference and bump the refcount.
</span><del>-    if {$nocache ne {}} {
-        set mport {}
</del><ins>+    if {$nocache ne &quot;&quot;} {
+        set mport &quot;&quot;
</ins><span class="cx">     } else {
</span><span class="cx">         set mport [dlist_match_multi $macports::open_mports [list porturl $porturl variations $variations options $options]]
</span><span class="cx">     }
</span><del>-    if {$mport ne {}} {
</del><ins>+    if {$mport ne &quot;&quot;} {
</ins><span class="cx">         # just in case more than one somehow matches
</span><span class="cx">         set mport [lindex $mport 0]
</span><span class="cx">         set refcnt [ditem_key $mport refcnt]
</span><span class="lines">@@ -1788,7 +1784,7 @@
</span><span class="cx">     foreach pg [$regref groups_used] {
</span><span class="cx">         lappend pgdirlist [file join ${registry.path} registry portgroups [$pg sha256]-[$pg size]]
</span><span class="cx">     }
</span><del>-    if {$pgdirlist ne {}} {
</del><ins>+    if {$pgdirlist ne &quot;&quot;} {
</ins><span class="cx">         set options_array(_portgroup_search_dirs) [list $pgdirlist]
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1817,7 +1813,7 @@
</span><span class="cx">     foreach category [lsort -increasing -unique [readdir $root]] {
</span><span class="cx">         set pathToCategory [file join $root $category]
</span><span class="cx">         # process the category dirs but not _resources
</span><del>-        if {[file isdirectory $pathToCategory] &amp;&amp; [string index [file tail $pathToCategory] 0] ne {_}} {
</del><ins>+        if {[file isdirectory $pathToCategory] &amp;&amp; [string index [file tail $pathToCategory] 0] ne &quot;_&quot;} {
</ins><span class="cx">             # Iterate on port directories.
</span><span class="cx">             foreach port [lsort -increasing -unique [readdir $pathToCategory]] {
</span><span class="cx">                 set pathToPort [file join $pathToCategory $port]
</span><span class="lines">@@ -1994,7 +1990,7 @@
</span><span class="cx">         ![catch {$workername eval check_supported_archs} result] &amp;&amp; $result == 0 &amp;&amp;
</span><span class="cx">         ![catch {$workername eval eval_targets $target} result] &amp;&amp; $result == 0} {
</span><span class="cx">         # If auto-clean mode, clean-up after dependency install
</span><del>-        if {$macports::portautoclean eq {yes}} {
</del><ins>+        if {$macports::portautoclean} {
</ins><span class="cx">             # Make sure we are back in the port path before clean
</span><span class="cx">             # otherwise if the current directory had been changed to
</span><span class="cx">             # inside the port,  the next port may fail when trying to
</span><span class="lines">@@ -2032,7 +2028,7 @@
</span><span class="cx">         return 1
</span><span class="cx">     }
</span><span class="cx">     set portname [_mportkey $mport subport]
</span><del>-    if {$target ne {clean}} {
</del><ins>+    if {$target ne &quot;clean&quot;} {
</ins><span class="cx">         macports::push_log $mport
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -2110,7 +2106,7 @@
</span><span class="cx"> 
</span><span class="cx">         registry::exclusive_unlock
</span><span class="cx"> 
</span><del>-        if {$result ne {}} {
</del><ins>+        if {$result ne &quot;&quot;} {
</ins><span class="cx">             ##
</span><span class="cx">             # When this happens, the failing port usually already printed an
</span><span class="cx">             # error message. Omit this one to avoid cluttering the output and
</span><span class="lines">@@ -2133,13 +2129,13 @@
</span><span class="cx">         }
</span><span class="cx">     } else {
</span><span class="cx">         # No dependencies, but we still need to check for conflicts.
</span><del>-        if {$target eq {} || $target eq {install} || $target eq {activate}} {
</del><ins>+        if {$target eq &quot;&quot; || $target eq &quot;install&quot; || $target eq &quot;activate&quot;} {
</ins><span class="cx">             _mporterrorifconflictsinstalled $mport
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     set clean 0
</span><del>-    if {$macports::portautoclean eq {yes} &amp;&amp; ($target eq {install} || $target eq {activate})} {
</del><ins>+    if {$macports::portautoclean &amp;&amp; ($target eq &quot;install&quot; || $target eq &quot;activate&quot;)} {
</ins><span class="cx">         # If we're doing an install, check if we should clean after
</span><span class="cx">         set clean 1
</span><span class="cx">     }
</span><span class="lines">@@ -2188,13 +2184,13 @@
</span><span class="cx">         }
</span><span class="cx">         foreach depspec $portinfo($deptype) {
</span><span class="cx">             set dep_portname [$workername eval _get_dep_port $depspec]
</span><del>-            if {$dep_portname ne {} &amp;&amp; ![info exists depscache(port:$dep_portname)] &amp;&amp; [$test $dep_portname]} {
</del><ins>+            if {$dep_portname ne &quot;&quot; &amp;&amp; ![info exists depscache(port:$dep_portname)] &amp;&amp; [$test $dep_portname]} {
</ins><span class="cx">                 set variants {}
</span><span class="cx"> 
</span><span class="cx">                 # check that the dep has the required archs
</span><span class="cx">                 set active_archs [_get_registry_archs $dep_portname]
</span><span class="cx">                 if {$deptype ni {depends_fetch depends_extract} &amp;&amp; $active_archs ni {{} noarch}
</span><del>-                    &amp;&amp; $required_archs ne {noarch} &amp;&amp; $dep_portname ni $depends_skip_archcheck} {
</del><ins>+                    &amp;&amp; $required_archs ne &quot;noarch&quot; &amp;&amp; $dep_portname ni $depends_skip_archcheck} {
</ins><span class="cx">                     set missing {}
</span><span class="cx">                     foreach arch $required_archs {
</span><span class="cx">                         if {$arch ni $active_archs} {
</span><span class="lines">@@ -2325,7 +2321,7 @@
</span><span class="cx"> 
</span><span class="cx"> proc macports::getindex {source} {
</span><span class="cx">     # Special case file:// sources
</span><del>-    if {[macports::getprotocol $source] eq {file}} {
</del><ins>+    if {[macports::getprotocol $source] eq &quot;file&quot;} {
</ins><span class="cx">         return [file join [macports::getportdir $source] PortIndex]
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -2465,7 +2461,7 @@
</span><span class="cx">                     set destdir [file dirname $destdir]
</span><span class="cx">                 } else {
</span><span class="cx">                     # Keep rsync happy with a trailing slash
</span><del>-                    if {[string index $source end] ne {/}} {
</del><ins>+                    if {[string index $source end] ne &quot;/&quot;} {
</ins><span class="cx">                         append source /
</span><span class="cx">                     }
</span><span class="cx">                     # don't sync PortIndex yet; we grab the platform specific one afterwards
</span><span class="lines">@@ -2606,7 +2602,7 @@
</span><span class="cx">                     }
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                if {(![info exists options(ports_force)] || $options(ports_force) ne {yes}) &amp;&amp; $updated &lt;= 0} {
</del><ins>+                if {(![info exists options(ports_force)] || !$options(ports_force)) &amp;&amp; $updated &lt;= 0} {
</ins><span class="cx">                     ui_info &quot;No updates for $source&quot;
</span><span class="cx">                     continue
</span><span class="cx">                 }
</span><span class="lines">@@ -2614,7 +2610,7 @@
</span><span class="cx">                 file mkdir $destdir
</span><span class="cx"> 
</span><span class="cx">                 set progressflag {}
</span><del>-                if {$macports::portverbose eq {yes}} {
</del><ins>+                if {$macports::portverbose} {
</ins><span class="cx">                     set progressflag &quot;--progress builtin&quot;
</span><span class="cx">                     set verboseflag &quot;-v&quot;
</span><span class="cx">                 } elseif {[info exists macports::ui_options(progress_download)]} {
</span><span class="lines">@@ -2740,7 +2736,7 @@
</span><span class="cx"> proc mportsearch {pattern {case_sensitive yes} {matchstyle regexp} {field name}} {
</span><span class="cx">     global macports::sources
</span><span class="cx">     set matches [list]
</span><del>-    set easy [expr {$field eq {name}}]
</del><ins>+    set easy [expr {$field eq &quot;name&quot;}]
</ins><span class="cx"> 
</span><span class="cx">     set found 0
</span><span class="cx">     foreach source $sources {
</span><span class="lines">@@ -2769,7 +2765,7 @@
</span><span class="cx"> 
</span><span class="cx">                     switch -- $matchstyle {
</span><span class="cx">                         exact {
</span><del>-                            if {$case_sensitive eq &quot;yes&quot;} {
</del><ins>+                            if {$case_sensitive} {
</ins><span class="cx">                                 set compres [string compare $pattern $target]
</span><span class="cx">                             } else {
</span><span class="cx">                                 set compres [string compare -nocase $pattern $target]
</span><span class="lines">@@ -2777,14 +2773,14 @@
</span><span class="cx">                             set matchres [expr {0 == $compres}]
</span><span class="cx">                         }
</span><span class="cx">                         glob {
</span><del>-                            if {$case_sensitive eq &quot;yes&quot;} {
</del><ins>+                            if {$case_sensitive} {
</ins><span class="cx">                                 set matchres [string match $pattern $target]
</span><span class="cx">                             } else {
</span><span class="cx">                                 set matchres [string match -nocase $pattern $target]
</span><span class="cx">                             }
</span><span class="cx">                         }
</span><span class="cx">                         regexp {
</span><del>-                            if {$case_sensitive eq &quot;yes&quot;} {
</del><ins>+                            if {$case_sensitive} {
</ins><span class="cx">                                 set matchres [regexp -- $pattern $target]
</span><span class="cx">                             } else {
</span><span class="cx">                                 set matchres [regexp -nocase -- $pattern $target]
</span><span class="lines">@@ -3193,7 +3189,7 @@
</span><span class="cx">                 set nrequired [llength $required_archs]
</span><span class="cx">                 foreach key $prev_seenkeys {
</span><span class="cx">                     set key_archs [lrange [split $key ,] 1 end]
</span><del>-                    if {$key_archs eq {noarch} || $required_archs eq {noarch} || [llength $key_archs] &gt; $nrequired} {
</del><ins>+                    if {$key_archs eq &quot;noarch&quot; || $required_archs eq &quot;noarch&quot; || [llength $key_archs] &gt; $nrequired} {
</ins><span class="cx">                         set seen 1
</span><span class="cx">                         set seenkey $key
</span><span class="cx">                         break
</span><span class="lines">@@ -3212,12 +3208,12 @@
</span><span class="cx">             # If we don't skip or if it is not, add it to the list.
</span><span class="cx">             set present [_mportispresent $mport $depspec]
</span><span class="cx"> 
</span><del>-            if {!$skipSatisfied &amp;&amp; $dep_portname eq {}} {
</del><ins>+            if {!$skipSatisfied &amp;&amp; $dep_portname eq &quot;&quot;} {
</ins><span class="cx">                 set dep_portname [lindex [split $depspec :] end]
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             set check_archs 0
</span><del>-            if {$dep_portname ne {} &amp;&amp; $deptype ni {depends_fetch depends_extract}
</del><ins>+            if {$dep_portname ne &quot;&quot; &amp;&amp; $deptype ni {depends_fetch depends_extract}
</ins><span class="cx">                 &amp;&amp; $dep_portname ni $depends_skip_archcheck} {
</span><span class="cx">                 set check_archs 1
</span><span class="cx">             }
</span><span class="lines">@@ -3260,7 +3256,7 @@
</span><span class="cx">                     # because mportexec only closes each open mport once.
</span><span class="cx">                     set depport [dlist_match_multi $macports::open_mports [list porturl $dep_portinfo(porturl) options $dep_options]]
</span><span class="cx"> 
</span><del>-                    if {$depport eq {}} {
</del><ins>+                    if {$depport eq &quot;&quot;} {
</ins><span class="cx">                         # We haven't opened this one yet.
</span><span class="cx">                         set depport [mportopen $dep_portinfo(porturl) $dep_options $variations]
</span><span class="cx">                     }
</span><span class="lines">@@ -3280,7 +3276,7 @@
</span><span class="cx">                 if {[info exists dep_portinfo(variants)] &amp;&amp; {universal} in $dep_portinfo(variants)} {
</span><span class="cx">                     # a universal variant is offered
</span><span class="cx">                     set has_universal 1
</span><del>-                    if {![info exists variation_array(universal)] || $variation_array(universal) ne {+}} {
</del><ins>+                    if {![info exists variation_array(universal)] || $variation_array(universal) ne &quot;+&quot;} {
</ins><span class="cx">                         set variation_array(universal) +
</span><span class="cx">                         # try again with +universal
</span><span class="cx">                         set depport [mportopen $dep_portinfo(porturl) $dep_options [array get variation_array]]
</span><span class="lines">@@ -3306,7 +3302,7 @@
</span><span class="cx">                 ditem_append_unique $mport requires $depport_provides
</span><span class="cx">                 # record actual archs we ended up getting
</span><span class="cx">                 set port_seen(${dep_portname},[join [macports::_mport_archs $depport] ,]) $depport_provides
</span><del>-            } elseif {$present &amp;&amp; $dep_portname ne {}} {
</del><ins>+            } elseif {$present &amp;&amp; $dep_portname ne &quot;&quot;} {
</ins><span class="cx">                 # record actual installed archs
</span><span class="cx">                 set port_seen(${dep_portname},[join [macports::_active_archs $dep_portname] ,]) 0
</span><span class="cx">             }
</span><span class="lines">@@ -3319,7 +3315,7 @@
</span><span class="cx">         foreach depport $depPorts {
</span><span class="cx">             # Any of these may have been closed by a previous recursive call
</span><span class="cx">             # and replaced by a universal version. This is fine, just skip.
</span><del>-            if {[ditem_key $depport] ne {}} {
</del><ins>+            if {[ditem_key $depport] ne &quot;&quot;} {
</ins><span class="cx">                 set res [mportdepends $depport {} $recurseDeps $skipSatisfied 1]
</span><span class="cx">                 if {$res != 0} {
</span><span class="cx">                     return $res
</span><span class="lines">@@ -3333,11 +3329,11 @@
</span><span class="cx"> 
</span><span class="cx"> # check if the given mport can support dependents with the given archs
</span><span class="cx"> proc macports::_mport_supports_archs {mport required_archs} {
</span><del>-    if {$required_archs eq {noarch}} {
</del><ins>+    if {$required_archs eq &quot;noarch&quot;} {
</ins><span class="cx">         return 1
</span><span class="cx">     }
</span><span class="cx">     set provided_archs [_mport_archs $mport]
</span><del>-    if {$provided_archs eq {noarch}} {
</del><ins>+    if {$provided_archs eq &quot;noarch&quot;} {
</ins><span class="cx">         return 1
</span><span class="cx">     }
</span><span class="cx">     foreach arch $required_archs {
</span><span class="lines">@@ -3356,14 +3352,14 @@
</span><span class="cx"> 
</span><span class="cx"> # check if the active version of a port supports the given archs
</span><span class="cx"> proc macports::_active_supports_archs {portname required_archs} {
</span><del>-    if {$required_archs eq {noarch}} {
</del><ins>+    if {$required_archs eq &quot;noarch&quot;} {
</ins><span class="cx">         return 1
</span><span class="cx">     }
</span><span class="cx">     if {[catch {registry::active $portname}]} {
</span><span class="cx">         return 0
</span><span class="cx">     }
</span><span class="cx">     set provided_archs [_active_archs $portname]
</span><del>-    if {$provided_archs eq {noarch} || $provided_archs eq {} || $provided_archs == 0} {
</del><ins>+    if {$provided_archs eq &quot;noarch&quot; || $provided_archs eq &quot;&quot; || $provided_archs == 0} {
</ins><span class="cx">         return 1
</span><span class="cx">     }
</span><span class="cx">     foreach arch $required_archs {
</span><span class="lines">@@ -3394,7 +3390,7 @@
</span><span class="cx">     set s [expr {[llength $required_archs] == 1 ? &quot;&quot; : &quot;s&quot;}]
</span><span class="cx"> 
</span><span class="cx">     ui_error &quot;Cannot install $port for the arch${s} '$required_archs' because&quot;
</span><del>-    if {$supported_archs ne {}} {
</del><ins>+    if {$supported_archs ne &quot;&quot;} {
</ins><span class="cx">         set ss [expr {[llength $supported_archs] == 1 ? &quot;&quot; : &quot;s&quot;}]
</span><span class="cx">         foreach arch $required_archs {
</span><span class="cx">             if {[lsearch -exact $supported_archs $arch] == -1} {
</span><span class="lines">@@ -3422,7 +3418,7 @@
</span><span class="cx"> proc macports::_mport_has_deptypes {mport deptypes} {
</span><span class="cx">     array set portinfo [mportinfo $mport]
</span><span class="cx">     foreach type $deptypes {
</span><del>-        if {[info exists portinfo($type)] &amp;&amp; $portinfo($type) ne {}} {
</del><ins>+        if {[info exists portinfo($type)] &amp;&amp; $portinfo($type) ne &quot;&quot;} {
</ins><span class="cx">             return 1
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -3497,18 +3493,18 @@
</span><span class="cx">     array set options $optionslist
</span><span class="cx"> 
</span><span class="cx">     # variable that indicates whether we actually updated base
</span><del>-    if {$updatestatusvar ne {}} {
</del><ins>+    if {$updatestatusvar ne &quot;&quot;} {
</ins><span class="cx">         upvar $updatestatusvar updatestatus
</span><span class="cx">         set updatestatus no
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     # are we syncing a tarball? (implies detached signature)
</span><span class="cx">     set is_tarball 0
</span><del>-    if {[string range $rsync_dir end-3 end] eq {.tar}} {
</del><ins>+    if {[string range $rsync_dir end-3 end] eq &quot;.tar&quot;} {
</ins><span class="cx">         set is_tarball 1
</span><span class="cx">         set mp_source_path [file join $portdbpath sources $rsync_server [file dirname $rsync_dir]]
</span><span class="cx">     } else {
</span><del>-        if {[string index $rsync_dir end] ne {/}} {
</del><ins>+        if {[string index $rsync_dir end] ne &quot;/&quot;} {
</ins><span class="cx">             append rsync_dir /
</span><span class="cx">         }
</span><span class="cx">         set mp_source_path [file join $portdbpath sources $rsync_server $rsync_dir]
</span><span class="lines">@@ -3567,7 +3563,7 @@
</span><span class="cx">     # echo current MacPorts version
</span><span class="cx">     ui_msg &quot;MacPorts base version $macports::autoconf::macports_version installed,&quot;
</span><span class="cx"> 
</span><del>-    if {[info exists options(ports_force)] &amp;&amp; $options(ports_force) eq {yes}} {
</del><ins>+    if {[info exists options(ports_force)] &amp;&amp; $options(ports_force)} {
</ins><span class="cx">         set use_the_force_luke yes
</span><span class="cx">         ui_debug &quot;Forcing a rebuild and reinstallation of MacPorts&quot;
</span><span class="cx">     } else {
</span><span class="lines">@@ -3592,7 +3588,7 @@
</span><span class="cx">     set comp [vercmp $macports_version_new $macports::autoconf::macports_version]
</span><span class="cx"> 
</span><span class="cx">     # syncing ports tree.
</span><del>-    if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) ne {yes}} {
</del><ins>+    if {![info exists options(ports_selfupdate_nosync)] || !$options(ports_selfupdate_nosync)} {
</ins><span class="cx">         if {$comp &gt; 0} {
</span><span class="cx">             # updated portfiles potentially need new base to parse - tell sync to try to
</span><span class="cx">             # use prefabricated PortIndex files and signal if it couldn't
</span><span class="lines">@@ -3603,8 +3599,8 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if {$use_the_force_luke eq {yes} || $comp &gt; 0} {
-        if {[info exists options(ports_dryrun)] &amp;&amp; $options(ports_dryrun) eq {yes}} {
</del><ins>+    if {$use_the_force_luke || $comp &gt; 0} {
+        if {[info exists options(ports_dryrun)] &amp;&amp; $options(ports_dryrun)} {
</ins><span class="cx">             ui_msg &quot;$macports::ui_prefix MacPorts base is outdated, selfupdate would install $macports_version_new (dry run)&quot;
</span><span class="cx">         } else {
</span><span class="cx">             ui_msg &quot;$macports::ui_prefix MacPorts base is outdated, installing new version $macports_version_new&quot;
</span><span class="lines">@@ -3613,27 +3609,27 @@
</span><span class="cx">             set owner [file attributes $prefix -owner]
</span><span class="cx">             set group [file attributes $prefix -group]
</span><span class="cx">             set perms [string range [file attributes $prefix -permissions] end-3 end]
</span><del>-            if {$tcl_platform(user) ne {root} &amp;&amp; $tcl_platform(user) ne $owner} {
</del><ins>+            if {$tcl_platform(user) ne &quot;root&quot; &amp;&amp; $tcl_platform(user) ne $owner} {
</ins><span class="cx">                 return -code error &quot;User $tcl_platform(user) does not own $prefix - try using sudo&quot;
</span><span class="cx">             }
</span><span class="cx">             ui_debug &quot;Permissions OK&quot;
</span><span class="cx"> 
</span><span class="cx">             set configure_args &quot;--prefix=[macports::shellescape $prefix] --with-install-user=[macports::shellescape $owner] --with-install-group=[macports::shellescape $group] --with-directory-mode=[macports::shellescape $perms]&quot;
</span><span class="cx">             # too many users have an incompatible readline in /usr/local, see ticket #10651
</span><del>-            if {$tcl_platform(os) ne {Darwin} || $prefix eq {/usr/local}
-                || ([glob -nocomplain /usr/local/lib/lib{readline,history}*] eq {} &amp;&amp; [glob -nocomplain /usr/local/include/readline/*.h] eq {})} {
</del><ins>+            if {$tcl_platform(os) ne &quot;Darwin&quot; || $prefix eq &quot;/usr/local&quot;
+                || ([glob -nocomplain /usr/local/lib/lib{readline,history}*] eq &quot;&quot; &amp;&amp; [glob -nocomplain /usr/local/include/readline/*.h] eq &quot;&quot;)} {
</ins><span class="cx">                 append configure_args &quot; --enable-readline&quot;
</span><span class="cx">             } else {
</span><span class="cx">                 ui_warn &quot;Disabling readline support due to readline in /usr/local&quot;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            if {$prefix eq {/usr/local} || $prefix eq {/usr}} {
</del><ins>+            if {$prefix eq &quot;/usr/local&quot; || $prefix eq &quot;/usr&quot;} {
</ins><span class="cx">                 append configure_args &quot; --with-unsupported-prefix&quot;
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             # Choose a sane compiler
</span><span class="cx">             set cc_arg {}
</span><del>-            if {$::macports::os_platform eq {darwin}} {
</del><ins>+            if {$::macports::os_platform eq &quot;darwin&quot;} {
</ins><span class="cx">                 set cc_arg &quot;CC=/usr/bin/cc OBJC=/usr/bin/cc &quot;
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="lines">@@ -3659,7 +3655,7 @@
</span><span class="cx">         return -code error &quot;Couldn't change permissions of the MacPorts sources at $mp_source_path to ${sources_owner}: $result&quot;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if {![info exists options(ports_selfupdate_nosync)] || $options(ports_selfupdate_nosync) ne {yes}} {
</del><ins>+    if {![info exists options(ports_selfupdate_nosync)] || !$options(ports_selfupdate_nosync)} {
</ins><span class="cx">         if {[info exists needed_portindex]} {
</span><span class="cx">             ui_msg &quot;Not all sources could be fully synced using the old version of MacPorts.&quot;
</span><span class="cx">             ui_msg &quot;Please run selfupdate again now that MacPorts base has been updated.&quot;
</span><span class="lines">@@ -3684,7 +3680,7 @@
</span><span class="cx">         ui_error &quot;$portname is not installed&quot;
</span><span class="cx">         return 3
</span><span class="cx">     }
</span><del>-    if {$depscachename ne {}} {
</del><ins>+    if {$depscachename ne &quot;&quot;} {
</ins><span class="cx">         upvar $depscachename depscache
</span><span class="cx">     } else {
</span><span class="cx">         array set depscache {}
</span><span class="lines">@@ -3711,13 +3707,13 @@
</span><span class="cx">     global macports::global_variations
</span><span class="cx">     array set options $optionslist
</span><span class="cx"> 
</span><del>-    if {$depscachename ne {}} {
</del><ins>+    if {$depscachename ne &quot;&quot;} {
</ins><span class="cx">         upvar $depscachename depscache
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     # Is this a dry run?
</span><span class="cx">     set is_dryrun no
</span><del>-    if {[info exists options(ports_dryrun)] &amp;&amp; $options(ports_dryrun) eq {yes}} {
</del><ins>+    if {[info exists options(ports_dryrun)] &amp;&amp; $options(ports_dryrun)} {
</ins><span class="cx">         set is_dryrun yes
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -3745,7 +3741,7 @@
</span><span class="cx">         return 1
</span><span class="cx">     }
</span><span class="cx">     # argh! port doesnt exist!
</span><del>-    if {$result eq {}} {
</del><ins>+    if {$result eq &quot;&quot;} {
</ins><span class="cx">         ui_warn &quot;No port $portname found in the index.&quot;
</span><span class="cx">         return 2
</span><span class="cx">     }
</span><span class="lines">@@ -3840,7 +3836,7 @@
</span><span class="cx">         set version [lindex $i 1]
</span><span class="cx">         set revision [lindex $i 2]
</span><span class="cx">         set epoch [lindex $i 5]
</span><del>-        if {$version_installed eq {} || ($epoch &gt; $epoch_installed &amp;&amp; $version ne $version_installed) ||
</del><ins>+        if {$version_installed eq &quot;&quot; || ($epoch &gt; $epoch_installed &amp;&amp; $version ne $version_installed) ||
</ins><span class="cx">                 ($epoch &gt;= $epoch_installed &amp;&amp; [vercmp $version $version_installed] &gt; 0)
</span><span class="cx">                 || ($epoch &gt;= $epoch_installed
</span><span class="cx">                     &amp;&amp; [vercmp $version $version_installed] == 0
</span><span class="lines">@@ -3937,7 +3933,7 @@
</span><span class="cx">             ui_error &quot;port lookup failed: $result&quot;
</span><span class="cx">             return 1
</span><span class="cx">         }
</span><del>-        if {$result eq {}} {
</del><ins>+        if {$result eq &quot;&quot;} {
</ins><span class="cx">             ui_error &quot;No port $portinfo(replaced_by) found.&quot;
</span><span class="cx">             return 1
</span><span class="cx">         }
</span><span class="lines">@@ -3989,10 +3985,10 @@
</span><span class="cx">         } elseif {$epoch_installed &lt; $epoch_in_tree &amp;&amp; $version_installed ne $version_in_tree} {
</span><span class="cx">             set build_override 1
</span><span class="cx">             ui_debug &quot;epoch override ... upgrading!&quot;
</span><del>-        } elseif {[info exists options(ports_upgrade_enforce-variants)] &amp;&amp; $options(ports_upgrade_enforce-variants) eq {yes}
</del><ins>+        } elseif {[info exists options(ports_upgrade_enforce-variants)] &amp;&amp; $options(ports_upgrade_enforce-variants)
</ins><span class="cx">                   &amp;&amp; [info exists portinfo(canonical_active_variants)] &amp;&amp; $portinfo(canonical_active_variants) ne $oldvariant} {
</span><span class="cx">             ui_debug &quot;variant override ... upgrading!&quot;
</span><del>-        } elseif {$os_platform_installed ne {} &amp;&amp; $os_major_installed ne {} &amp;&amp; $os_platform_installed != 0
</del><ins>+        } elseif {$os_platform_installed ne &quot;&quot; &amp;&amp; $os_major_installed ne &quot;&quot; &amp;&amp; $os_platform_installed != 0
</ins><span class="cx">                   &amp;&amp; ([_mportkey $mport {{os.platform}}] ne $os_platform_installed
</span><span class="cx">                   || [_mportkey $mport {{os.major}}] != $os_major_installed)} {
</span><span class="cx">             ui_debug &quot;platform mismatch ... upgrading!&quot;
</span><span class="lines">@@ -4121,7 +4117,7 @@
</span><span class="cx">         set options(ports_force) yes
</span><span class="cx">         set existing_epoch [lindex [registry::installed $newname ${version_in_tree}_${revision_in_tree}$portinfo(canonical_active_variants)] 0 5]
</span><span class="cx">         set newregref [registry::open_entry $newname $version_in_tree $revision_in_tree $portinfo(canonical_active_variants) $existing_epoch]
</span><del>-        if {$is_dryrun eq {yes}} {
</del><ins>+        if {$is_dryrun} {
</ins><span class="cx">             ui_msg &quot;Skipping uninstall $newname @${version_in_tree}_${revision_in_tree}$portinfo(canonical_active_variants) (dry run)&quot;
</span><span class="cx">         } elseif {![registry::run_target $newregref uninstall [array get options]]
</span><span class="cx">                   &amp;&amp; [catch {registry_uninstall::uninstall $newname $version_in_tree $revision_in_tree $portinfo(canonical_active_variants) [array get options]} result]} {
</span><span class="lines">@@ -4144,7 +4140,7 @@
</span><span class="cx">         # we have to force the deactivate in case of dependents
</span><span class="cx">         set force_cur [info exists options(ports_force)]
</span><span class="cx">         set options(ports_force) yes
</span><del>-        if {$is_dryrun eq {yes}} {
</del><ins>+        if {$is_dryrun} {
</ins><span class="cx">             ui_msg &quot;Skipping deactivate $portname @${version_active}_${revision_active}$variant_active (dry run)&quot;
</span><span class="cx">         } elseif {![catch {registry::active $portname}] &amp;&amp;
</span><span class="cx">                   ![registry::run_target $regref deactivate [array get options]]
</span><span class="lines">@@ -4166,7 +4162,7 @@
</span><span class="cx">         set uninstall_later yes
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if {$is_dryrun eq {yes}} {
</del><ins>+    if {$is_dryrun} {
</ins><span class="cx">         if {$anyactive} {
</span><span class="cx">             ui_msg &quot;Skipping deactivate $portname @${version_active}_${revision_active}$variant_active (dry run)&quot;
</span><span class="cx">         }
</span><span class="lines">@@ -4210,7 +4206,7 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if {[info exists uninstall_later] &amp;&amp; $uninstall_later eq &quot;yes&quot;} {
</del><ins>+    if {[info exists uninstall_later] &amp;&amp; $uninstall_later} {
</ins><span class="cx">         foreach i $ilist {
</span><span class="cx">             set version [lindex $i 1]
</span><span class="cx">             set revision [lindex $i 2]
</span><span class="lines">@@ -4221,7 +4217,7 @@
</span><span class="cx">             set epoch [lindex $i 5]
</span><span class="cx">             ui_debug &quot;Uninstalling $portname ${version}_${revision}$variant&quot;
</span><span class="cx">             set regref [registry::open_entry $portname $version $revision $variant $epoch]
</span><del>-            if {$is_dryrun eq {yes}} {
</del><ins>+            if {$is_dryrun} {
</ins><span class="cx">                 ui_msg &quot;Skipping uninstall $portname @${version}_${revision}$variant (dry run)&quot;
</span><span class="cx">             } elseif {![registry::run_target $regref uninstall $optionslist]
</span><span class="cx">                       &amp;&amp; [catch {registry_uninstall::uninstall $portname $version $revision $variant $optionslist} result]} {
</span><span class="lines">@@ -4277,7 +4273,7 @@
</span><span class="cx">             foreach i $portinfo($dtype) {
</span><span class="cx">                 set d [$parentworker eval _get_dep_port $i]
</span><span class="cx">                 if {![llength [array get depscache port:$d]] &amp;&amp; ![llength [array get depscache $i]]} {
</span><del>-                    if {$d ne {}} {
</del><ins>+                    if {$d ne &quot;&quot;} {
</ins><span class="cx">                         set dspec port:$d
</span><span class="cx">                     } else {
</span><span class="cx">                         set dspec $i
</span><span class="lines">@@ -4325,7 +4321,7 @@
</span><span class="cx">             foreach v $versions {
</span><span class="cx">                 # Only the file name corresponds to the version name.
</span><span class="cx">                 set v [file tail $v]
</span><del>-                if {$v eq {base} || $v eq {current}} {
</del><ins>+                if {$v eq &quot;base&quot; || $v eq &quot;current&quot;} {
</ins><span class="cx">                     continue
</span><span class="cx">                 }
</span><span class="cx">                 lappend lversions [file tail $v]
</span><span class="lines">@@ -4344,7 +4340,7 @@
</span><span class="cx">         }
</span><span class="cx">         set {
</span><span class="cx">             # Use ${conf_path}/$version to read in sources.
</span><del>-            if {$version eq {} || $version eq {base} || $version eq {current}
</del><ins>+            if {$version eq &quot;&quot; || $version eq &quot;base&quot; || $version eq &quot;current&quot;
</ins><span class="cx">                     || [catch {set src_file [open &quot;${conf_path}/$version&quot;]} result]} {
</span><span class="cx">                 global errorInfo
</span><span class="cx">                 ui_debug &quot;${result}: $errorInfo&quot;
</span><span class="lines">@@ -4432,12 +4428,12 @@
</span><span class="cx"> # check if the system we're on can run code of the given architecture
</span><span class="cx"> proc macports::arch_runnable {arch} {
</span><span class="cx">     global macports::os_major macports::os_arch macports::os_platform
</span><del>-    if {$macports::os_platform eq {darwin}} {
</del><ins>+    if {$macports::os_platform eq &quot;darwin&quot;} {
</ins><span class="cx">         if {$macports::os_major &gt;= 11 &amp;&amp; [string first ppc $arch] == 0} {
</span><span class="cx">             return no
</span><del>-        } elseif {$macports::os_arch eq {i386} &amp;&amp; $arch eq {ppc64}} {
</del><ins>+        } elseif {$macports::os_arch eq &quot;i386&quot; &amp;&amp; $arch eq &quot;ppc64&quot;} {
</ins><span class="cx">             return no
</span><del>-        } elseif {$macports::os_major &lt;= 8 &amp;&amp; $arch eq {x86_64}} {
</del><ins>+        } elseif {$macports::os_major &lt;= 8 &amp;&amp; $arch eq &quot;x86_64&quot;} {
</ins><span class="cx">             return no
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -4578,7 +4574,7 @@
</span><span class="cx">     if {$binary_count &gt; 0} {
</span><span class="cx">         ui_msg &quot;$macports::ui_prefix Scanning binaries for linking errors&quot;
</span><span class="cx">         set handle [machista::create_handle]
</span><del>-        if {$handle eq {NULL}} {
</del><ins>+        if {$handle eq &quot;NULL&quot;} {
</ins><span class="cx">             error &quot;Error creating libmachista handle&quot;
</span><span class="cx">         }
</span><span class="cx">         array unset files_warned_about
</span><span class="lines">@@ -4619,15 +4615,15 @@
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 set architecture [$result cget -mt_archs]
</span><del>-                while {$architecture ne {NULL}} {
-                    if {[info exists options(ports_rev-upgrade_id-loadcmd-check)] &amp;&amp; $options(ports_rev-upgrade_id-loadcmd-check) eq {yes}} {
-                        if {[$architecture cget -mat_install_name] ne {NULL} &amp;&amp; [$architecture cget -mat_install_name] ne {}} {
</del><ins>+                while {$architecture ne &quot;NULL&quot;} {
+                    if {[info exists options(ports_rev-upgrade_id-loadcmd-check)] &amp;&amp; $options(ports_rev-upgrade_id-loadcmd-check)} {
+                        if {[$architecture cget -mat_install_name] ne &quot;NULL&quot; &amp;&amp; [$architecture cget -mat_install_name] ne &quot;&quot;} {
</ins><span class="cx">                             # check if this lib's install name actually refers to this file itself
</span><span class="cx">                             # if this is not the case software linking against this library might have erroneous load commands
</span><span class="cx">                             if {0 == [catch {set idloadcmdpath [revupgrade_handle_special_paths $bpath [$architecture cget -mat_install_name]]}]} {
</span><del>-                                if {[string index $idloadcmdpath 0] ne {/}} {
</del><ins>+                                if {[string index $idloadcmdpath 0] ne &quot;/&quot;} {
</ins><span class="cx">                                     set port [registry::entry owner $bpath]
</span><del>-                                    if {$port ne {}} {
</del><ins>+                                    if {$port ne &quot;&quot;} {
</ins><span class="cx">                                         set portname [$port name]
</span><span class="cx">                                     } else {
</span><span class="cx">                                         set portname &lt;unknown-port&gt;
</span><span class="lines">@@ -4638,7 +4634,7 @@
</span><span class="cx">                                     ui_warn &quot;ID load command in ${bpath}, arch [machista::get_arch_name [$architecture cget -mat_arch]] (belonging to port $portname) contains relative path&quot;
</span><span class="cx">                                 } elseif {![file exists $idloadcmdpath]} {
</span><span class="cx">                                     set port [registry::entry owner $bpath]
</span><del>-                                    if {$port ne {}} {
</del><ins>+                                    if {$port ne &quot;&quot;} {
</ins><span class="cx">                                         set portname [$port name]
</span><span class="cx">                                     } else {
</span><span class="cx">                                         set portname &lt;unknown-port&gt;
</span><span class="lines">@@ -4654,7 +4650,7 @@
</span><span class="cx"> 
</span><span class="cx">                                     if {$hash_this ne $hash_idloadcmd} {
</span><span class="cx">                                         set port [registry::entry owner $bpath]
</span><del>-                                        if {$port ne {}} {
</del><ins>+                                        if {$port ne &quot;&quot;} {
</ins><span class="cx">                                             set portname [$port name]
</span><span class="cx">                                         } else {
</span><span class="cx">                                             set portname &lt;unknown-port&gt;
</span><span class="lines">@@ -4679,7 +4675,7 @@
</span><span class="cx"> 
</span><span class="cx">                     set loadcommand [$architecture cget -mat_loadcmds]
</span><span class="cx"> 
</span><del>-                    while {$loadcommand ne {NULL}} {
</del><ins>+                    while {$loadcommand ne &quot;NULL&quot;} {
</ins><span class="cx">                         if {0 != [catch {set filepath [revupgrade_handle_special_paths $bpath [$loadcommand cget -mlt_install_name]]}]} {
</span><span class="cx">                             set loadcommand [$loadcommand cget -next]
</span><span class="cx">                             continue;
</span><span class="lines">@@ -4710,7 +4706,7 @@
</span><span class="cx"> 
</span><span class="cx">                         set libarchitecture [$libresult cget -mt_archs]
</span><span class="cx">                         set libarch_found false;
</span><del>-                        while {$libarchitecture ne {NULL}} {
</del><ins>+                        while {$libarchitecture ne &quot;NULL&quot;} {
</ins><span class="cx">                             if {[$architecture cget -mat_arch] ne [$libarchitecture cget -mat_arch]} {
</span><span class="cx">                                 set libarchitecture [$libarchitecture cget -next]
</span><span class="cx">                                 continue;
</span><span class="lines">@@ -4729,7 +4725,7 @@
</span><span class="cx">                             break;
</span><span class="cx">                         }
</span><span class="cx"> 
</span><del>-                        if {$libarch_found eq &quot;false&quot;} {
</del><ins>+                        if {!$libarch_found} {
</ins><span class="cx">                             ui_debug &quot;Missing architecture [machista::get_arch_name [$architecture cget -mat_arch]] in file $filepath&quot;
</span><span class="cx">                             if {[path_is_in_prefix $filepath]} {
</span><span class="cx">                                 ui_debug &quot;Marking $bpath as broken&quot;
</span><span class="lines">@@ -4769,7 +4765,7 @@
</span><span class="cx">         set broken_files [lsort -unique $broken_files]
</span><span class="cx">         foreach file $broken_files {
</span><span class="cx">             set port [registry::entry owner $file]
</span><del>-            if {$port ne {}} {
</del><ins>+            if {$port ne &quot;&quot;} {
</ins><span class="cx">                 lappend broken_ports $port
</span><span class="cx">                 lappend broken_files_by_port($port) $file
</span><span class="cx">             } else {
</span><span class="lines">@@ -4778,7 +4774,7 @@
</span><span class="cx">         }
</span><span class="cx">         set broken_ports [lsort -unique $broken_ports]
</span><span class="cx"> 
</span><del>-        if {$macports::revupgrade_mode eq {rebuild}} {
</del><ins>+        if {$macports::revupgrade_mode eq &quot;rebuild&quot;} {
</ins><span class="cx">             # don't try to rebuild ports that don't exist in the tree
</span><span class="cx">             set temp_broken_ports {}
</span><span class="cx">             foreach port $broken_ports {
</span><span class="lines">@@ -4829,7 +4825,7 @@
</span><span class="cx">         set num_broken_ports [llength $broken_ports]
</span><span class="cx">         set s [expr {$num_broken_ports == 1 ? &quot;&quot; : &quot;s&quot;}]
</span><span class="cx"> 
</span><del>-        if {$macports::revupgrade_mode ne {rebuild}} {
</del><ins>+        if {$macports::revupgrade_mode ne &quot;rebuild&quot;} {
</ins><span class="cx">             ui_msg &quot;$macports::ui_prefix Found $num_broken_ports broken port${s}:&quot;
</span><span class="cx">             foreach port $broken_ports {
</span><span class="cx">                 ui_msg &quot;     [$port name] @[$port version] [$port variants][$port negated_variants]&quot;
</span><span class="lines">@@ -4962,7 +4958,7 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if {[info exists options(ports_dryrun)] &amp;&amp; $options(ports_dryrun) eq {yes}} {
</del><ins>+        if {[info exists options(ports_dryrun)] &amp;&amp; $options(ports_dryrun)} {
</ins><span class="cx">             ui_warn &quot;If this was no dry run, rev-upgrade would now run the checks again to find unresolved and newly created problems&quot;
</span><span class="cx">             return 0
</span><span class="cx">         }
</span><span class="lines">@@ -5089,12 +5085,12 @@
</span><span class="cx">             while {[gets $fd line] &gt;= 0} {
</span><span class="cx">                 if {[regexp {^(\w+)([ \t]+(.*))?$} $line match option ignore val] == 1} {
</span><span class="cx">                     if {[lsearch -exact $conf_options $option] &gt;= 0} {
</span><del>-                        if {$option eq {name}} {
</del><ins>+                        if {$option eq &quot;name&quot;} {
</ins><span class="cx">                             set cur_name $val
</span><span class="cx">                             lappend all_names $val
</span><span class="cx">                         } elseif {[info exists cur_name]} {
</span><span class="cx">                             set trimmedval [string trim $val]
</span><del>-                            if {$option eq {urls}} {
</del><ins>+                            if {$option eq &quot;urls&quot;} {
</ins><span class="cx">                                 set processed_urls {}
</span><span class="cx">                                 foreach url $trimmedval {
</span><span class="cx">                                     lappend processed_urls ${url}:nosubdir
</span></span></pre>
</div>
</div>

</body>
</html>