<!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>[122996] trunk/doc-new/guide/xml/using.xml</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/122996">122996</a></dd>
<dt>Author</dt> <dd>cal@macports.org</dd>
<dt>Date</dt> <dd>2014-08-03 05:54:13 -0700 (Sun, 03 Aug 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>guide: Refactor the complete &quot;using&quot; section, add undocumented stuff, remove outdated information (e.g., rpm packaging), add standard modeline (except the tcl stuff), reformat.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdocnewguidexmlusingxml">trunk/doc-new/guide/xml/using.xml</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdocnewguidexmlusingxml"></a>
<div class="modfile"><h4>Modified: trunk/doc-new/guide/xml/using.xml (122995 => 122996)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/doc-new/guide/xml/using.xml        2014-08-03 12:52:53 UTC (rev 122995)
+++ trunk/doc-new/guide/xml/using.xml        2014-08-03 12:54:13 UTC (rev 122996)
</span><span class="lines">@@ -1,916 +1,1511 @@
</span><span class="cx"> &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
</span><ins>+&lt;!-- -*- coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4:tw=120
+--&gt;
</ins><span class="cx"> &lt;!DOCTYPE chapter PUBLIC &quot;-//OASIS//DTD DocBook XML V4.5//EN&quot;
</span><span class="cx"> &quot;http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd&quot;[
</span><span class="cx"> &lt;!ENTITY macports-prev-version &quot;2.3.0&quot;&gt;
</span><span class="cx"> &lt;!ENTITY macports-version &quot;2.3.1&quot;&gt;
</span><span class="cx"> ]&gt;
</span><span class="cx"> &lt;chapter id=&quot;using&quot;&gt;
</span><del>-  &lt;title&gt;Using MacPorts&lt;/title&gt;
</del><ins>+    &lt;title&gt;Using MacPorts&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-  &lt;para&gt;This chapter describes using the &lt;command&gt;port&lt;/command&gt; command, port
-  variants, common tasks and port binaries&lt;!--, and setting up an rsync
-  replication server--&gt;.&lt;/para&gt;
</del><ins>+    &lt;para&gt;This chapter describes using the &lt;command&gt;port&lt;/command&gt; command, port variants, common tasks and port
+    binaries.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-  &lt;section id=&quot;using.port&quot;&gt;
-    &lt;title&gt;The port Command&lt;/title&gt;
</del><ins>+    &lt;section id=&quot;using.port&quot;&gt;
+        &lt;title&gt;The port Command&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-    &lt;para&gt;The MacPorts &lt;command&gt;port&lt;/command&gt; command is the main utility
-    used to interact with MacPorts. It is used to update
-    &lt;filename&gt;Portfile&lt;/filename&gt;s and the MacPorts infrastructure, and
-    install and manage ports.&lt;/para&gt;
</del><ins>+        &lt;para&gt;The MacPorts &lt;command&gt;port&lt;/command&gt; command is the main utility used to interact with MacPorts. It is
+            used to update &lt;filename&gt;Portfile&lt;/filename&gt;s and the MacPorts infrastructure, and install and manage
+            ports.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.help&quot;&gt;
-      &lt;title&gt;help&lt;/title&gt;
</del><ins>+        &lt;section id=&quot;using.port.help&quot;&gt;
+            &lt;title&gt;port help&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The &lt;option&gt;help&lt;/option&gt; action shows some brief information about
-      the specified action, or if no action is specified, shows basic usage
-      information for the &lt;command&gt;port&lt;/command&gt; command in general.&lt;/para&gt;
</del><ins>+            &lt;para&gt;The &lt;option&gt;help&lt;/option&gt; action shows some brief information about the specified action, or if no
+                action is specified, shows basic usage information for the &lt;command&gt;port&lt;/command&gt; command in
+                general.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port help selfupdate&lt;/userinput&gt;&lt;/programlisting&gt;
-      &lt;screen&gt;Usage: selfupdate --nosync
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$&lt;/prompt&gt; &lt;userinput&gt;port help selfupdate&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-Upgrade MacPorts itself and run the sync target&lt;/screen&gt;
-    &lt;/section&gt;
</del><ins>+            &lt;screen&gt;
+Usage: selfupdate --nosync
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.selfupdate&quot;&gt;
-      &lt;title&gt;selfupdate&lt;/title&gt;
</del><ins>+Upgrade MacPorts itself and run the sync target
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The &lt;option&gt;selfupdate&lt;/option&gt; action should be used regularly to
-      &lt;option&gt;sync&lt;/option&gt; the local ports tree with the global MacPorts
-      ports repository so you will have the latest port versions. It also
-      checks for new revisions of the MacPorts infrastructure, called MacPorts
-      base, and upgrades it when necessary.&lt;/para&gt;
</del><ins>+--nosync   Do not run the sync target, i.e. do not update the ports tree.
+           Only checks for (and installs, if available) new versions of
+           MacPorts.&lt;/screen&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-      &lt;note&gt;
-        &lt;para&gt;Selfupdate is only tested on OS X. If you are running MacPorts on
-          another platform, &lt;option&gt;selfupdate&lt;/option&gt; may not work correctly.
-          In this case, you should use the &lt;link
-            linkend=&quot;using.port.sync&quot;&gt;sync&lt;/link&gt; action to update the ports
-          tree; to update MacPorts base you must manually install a newer
-          version from source.&lt;/para&gt;
-      &lt;/note&gt;
</del><ins>+        &lt;section id=&quot;using.port.selfupdate&quot;&gt;
+            &lt;title&gt;port selfupdate&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port selfupdate&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;para&gt;The &lt;option&gt;selfupdate&lt;/option&gt; action should be used regularly to update the local ports tree with
+                the global MacPorts ports repository so you will have the latest versions of software packages
+                available. It also checks for new releases of MacPorts itself, and upgrades it when necessary.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;
----&gt;  Updating MacPorts base sources using rsync
-MacPorts base version &amp;macports-version; installed,
-MacPorts base version &amp;macports-version; downloaded.
----&gt;  Updating the ports tree
----&gt;  MacPorts base is already the latest version
-&lt;/screen&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$&lt;/prompt&gt; &lt;userinput&gt;sudo port selfupdate&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;As always, you can use the debug flag for verbose output. This is
-        useful to debug problems with &lt;option&gt;selfupdate&lt;/option&gt;.&lt;/para&gt;
</del><ins>+            &lt;screen&gt;
+&lt;!--        --&gt;---&amp;gt; Updating MacPorts base sources using rsync
+&lt;!--        --&gt;MacPorts base version &amp;macports-version; installed,
+&lt;!--        --&gt;MacPorts base version &amp;macports-version; downloaded.
+&lt;!--        --&gt;---&amp;gt; Updating the ports tree
+&lt;!--        --&gt;---&amp;gt; MacPorts base is already the latest version&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port -d selfupdate&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;para&gt;If &lt;option&gt;selfupdate&lt;/option&gt; detects that a newer version of MacPorts is available, it automatically
+                updates the installed copy of MacPorts base to the latest released version. In that case, you will see
+                this message:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;If &lt;option&gt;selfupdate&lt;/option&gt; detects that a newer version of
-      MacPorts base is available, it automatically updates the installed copy
-      of MacPorts base to the latest released version. In that case, you will
-      see this message:&lt;/para&gt;
</del><ins>+            &lt;screen&gt;
+&lt;!--        --&gt;---&amp;gt; Updating MacPorts base sources using rsync
+&lt;!--        --&gt;MacPorts base version &amp;macports-prev-version; installed,
+&lt;!--        --&gt;MacPorts base version &amp;macports-version; downloaded.
+&lt;!--        --&gt;---&amp;gt; Updating the ports tree
+&lt;!--        --&gt;---&amp;gt; MacPorts base is outdated, installing new version &amp;macports-version;
+&lt;!--        --&gt;Installing new MacPorts release in /opt/local as root:admin; permissions 755&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;
----&gt;  Updating MacPorts base sources using rsync
-MacPorts base version &amp;macports-prev-version; installed,
-MacPorts base version &amp;macports-version; downloaded.
----&gt;  Updating the ports tree
----&gt;  MacPorts base is outdated, installing new version &amp;macports-version;
-Installing new MacPorts release in /opt/local as root:admin; permissions 755
-&lt;/screen&gt;
</del><ins>+            &lt;para&gt;If the &lt;option&gt;selfupdate&lt;/option&gt; procedure fails you'll see a message like this:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;If the &lt;option&gt;selfupdate&lt;/option&gt; procedure fails you'll see
-      a message like this:&lt;/para&gt;
</del><ins>+            &lt;screen&gt;Error installing new MacPorts base: command execution failed&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;Error installing new MacPorts base: command execution failed&lt;/screen&gt;
</del><ins>+            &lt;para&gt;As always, you can use the debug flag &lt;option&gt;-d&lt;/option&gt; to enable verbose output. If your
+                &lt;option&gt;selfupdate&lt;/option&gt; failed, re-run it with debug output enabled to see all output generated by
+                the build system.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;Re-run &lt;option&gt;selfupdate&lt;/option&gt; with the &lt;option&gt;-d&lt;/option&gt;
-      flag to see all output generated by the build system. The output may give
-      you an idea why the build failed. If it doesn't, please &lt;link
-        linkend=&quot;project.tickets&quot;&gt;file a ticket&lt;/link&gt; and attach the output
-      generated by &lt;command&gt;sudo port -d selfupdate&lt;/command&gt;.&lt;/para&gt;
-    &lt;/section&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$&lt;/prompt&gt; &lt;userinput&gt;sudo port -d selfupdate&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.sync&quot;&gt;
-      &lt;title&gt;sync&lt;/title&gt;
</del><ins>+            &lt;para&gt;The output may give you an idea why the build failed. Look for the first occurances of
+                &lt;quote&gt;error&lt;/quote&gt;. If you cannot figure out what's wrong yourself, feel free to ask on the
+                &lt;email&gt;macports-users@lists.macosforge.org&lt;/email&gt; mailing list and attach the output generated by
+                &lt;command&gt;sudo port -d selfupdate&lt;/command&gt;.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The &lt;option&gt;sync&lt;/option&gt; action performs a subset of
-      &lt;option&gt;selfupdate&lt;/option&gt; actions. It synchronizes the ports tree, as
-      does &lt;option&gt;selfupdate&lt;/option&gt;, but it does not check for upgrades to
-      MacPorts base. On OS X, unless there is a special reason not to do
-      so, you should run &lt;link
-      linkend=&quot;using.port.selfupdate&quot;&gt;selfupdate&lt;/link&gt;.&lt;/para&gt;
</del><ins>+            &lt;para&gt;&lt;option&gt;selfupdate&lt;/option&gt; accepts a single switch:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;note&gt;
-        &lt;para&gt;For platforms other than OS X, &lt;option&gt;sync&lt;/option&gt; is the
-        only way to get port updates because &lt;option&gt;selfupdate&lt;/option&gt; is
-        supported only on OS X.&lt;/para&gt;
-      &lt;/note&gt;
-    &lt;/section&gt;
</del><ins>+            &lt;variablelist&gt;
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--nosync&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Only update MacPorts itself, do not update the tree of &lt;filename&gt;Portfile&lt;/filename&gt;s.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+            &lt;/variablelist&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.list&quot;&gt;
-      &lt;title&gt;list&lt;/title&gt;
</del><ins>+        &lt;section id=&quot;using.port.sync&quot;&gt;
+            &lt;title&gt;port sync&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The &lt;option&gt;list&lt;/option&gt; action lists the currently available version of
-      the specified ports, or if no ports are specified, displays a list of all available
-      ports. The list of available ports is very long, so use &lt;link
-      linkend=&quot;using.port.search&quot;&gt;search&lt;/link&gt; if you know a port's name or
-      part of it.&lt;/para&gt;
</del><ins>+            &lt;para&gt;The &lt;option&gt;sync&lt;/option&gt; action performs a subset of &lt;option&gt;selfupdate&lt;/option&gt;. It synchronizes the
+                ports tree, as does &lt;option&gt;selfupdate&lt;/option&gt;, but it does not check for MacPorts upgrades. On OS X,
+                unless there is a special reason not to do so, you should alawys run &lt;link
+                    linkend=&quot;using.port.selfupdate&quot;&gt;selfupdate&lt;/link&gt;.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port list&lt;/userinput&gt;&lt;/programlisting&gt;
-    &lt;/section&gt;
</del><ins>+            &lt;para&gt;&lt;option&gt;sync&lt;/option&gt; does not accept any switches.&lt;/para&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.search&quot;&gt;
-      &lt;title&gt;search&lt;/title&gt;
</del><ins>+        &lt;section id=&quot;using.port.list&quot;&gt;
+            &lt;title&gt;port list&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The &lt;option&gt;search&lt;/option&gt; action allows finding ports
-      by partial matches of the name or description. Other fields can be matched
-      against, and matched in different ways, by using options. Run &lt;userinput&gt;port help search&lt;/userinput&gt;
-      for details.&lt;/para&gt;
</del><ins>+            &lt;para&gt;The &lt;option&gt;list&lt;/option&gt; action lists the currently available version of the specified ports, or if
+                no ports are specified, displays a list of all available ports. The list of available ports is very
+                long, so use &lt;link linkend=&quot;using.port.search&quot;&gt;search&lt;/link&gt; if you are looking for a specific
+                port.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port search rrd&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$&lt;/prompt&gt; &lt;userinput&gt;port list&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;php5-rrdtool @1.0 (php, net, devel)
-    PHP 5 glue for rrdtool
</del><ins>+            &lt;note&gt;
+                &lt;para&gt;&lt;command&gt;port list&lt;/command&gt; always lists the most recent version available in MacPorts, which is
+                    not necessarily the version you have installed. For this reason, &lt;command&gt;port list
+                        installed&lt;/command&gt; likely produces unexpected output. In most cases where you would
+                    &lt;option&gt;list&lt;/option&gt;, using &lt;option&gt;installed&lt;/option&gt; or &lt;option&gt;echo&lt;/option&gt; is the better
+                    choice instead. Both &lt;command&gt;port installed&lt;/command&gt; and &lt;command&gt;port echo installed&lt;/command&gt;
+                    would produce the output you might expect from the command, &lt;command&gt;port list installed&lt;/command&gt;
+                    will not (and, to make matters worse, will be slow).&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-rrdtool @1.4.4 (net)
</del><ins>+                &lt;para&gt;You will hardly need &lt;command&gt;port list&lt;/command&gt; at all to work with MacPorts. When searching,
+                    &lt;command&gt;port search&lt;/command&gt; is the better choice and when trying to list ports, &lt;command&gt;port
+                        installed&lt;/command&gt; and &lt;command&gt;port echo&lt;/command&gt; are much more useful.&lt;/para&gt;
+            &lt;/note&gt;
+        &lt;/section&gt;
+
+        &lt;section id=&quot;using.port.search&quot;&gt;
+            &lt;title&gt;port search&lt;/title&gt;
+
+            &lt;para&gt;The &lt;option&gt;search&lt;/option&gt; action allows finding ports by partial matches of the name or description.
+                Other fields can be matched against, and matched in different ways, by using options. &lt;command&gt;port
+                    search&lt;/command&gt; is the tool of choice if you are looking for a specific software in MacPorts. We
+                recommend you read up on some of its flags to improve your efficiency when searching for ports. Run
+                &lt;command&gt;port help search&lt;/command&gt; for an exhaustive list of possible switches.&lt;/para&gt;
+
+            &lt;para&gt;Suppose you are looking for PHP in MacPorts. You might start with &lt;command&gt;port search php&lt;/command&gt;
+                and notice your query produces a lot of output. In fact, at the time of writing this, this search
+                produces 661 matches. By default, &lt;command&gt;port search&lt;/command&gt; searches both name and description of
+                a port. While we're looking for PHP, we can reduce the number of hits by using the
+                &lt;option&gt;--name&lt;/option&gt; flag. Furthermore, we only want ports whose name starts with &lt;quote&gt;php&lt;/quote&gt;,
+                so we add the &lt;option&gt;--glob&lt;/option&gt; flag (actually, we could leave it out because it is the default)
+                and modify the search term to &lt;userinput&gt;php*&lt;/userinput&gt;:&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port search --name --glob 'php*'&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;para&gt;Furthermore, we can enable compact output by using the &lt;option&gt;--line&lt;/option&gt; switch. This causes only
+                a single line to be printed for each match:&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port search --name --line --glob 'php*'&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;para&gt;Among a large number of PHP modules you will find the main PHP ports, which are named
+                php&lt;varname&gt;&amp;lt;version&amp;gt;&lt;/varname&gt;. Choose one to install.&lt;/para&gt;
+
+            &lt;para&gt;If you know regex and know about the format of the PHP versions, you can further reduce the output of
+                &lt;command&gt;port search&lt;/command&gt;:&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port search --name --line --regex '^php\d*$'&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;screen&gt;&lt;!--
+            --&gt;php     5.5       lang www    PHP: Hypertext Preprocessor
+&lt;!--        --&gt;php4    4.4.9     lang www    PHP: Hypertext Preprocessor
+&lt;!--        --&gt;php5    5.3.28    lang www    PHP: Hypertext Preprocessor
+&lt;!--        --&gt;php52   5.2.17    lang www    PHP: Hypertext Preprocessor
+&lt;!--        --&gt;php53   5.3.28    lang www    PHP: Hypertext Preprocessor
+&lt;!--        --&gt;php54   5.4.31    lang www    PHP: Hypertext Preprocessor
+&lt;!--        --&gt;php55   5.5.15    lang www    PHP: Hypertext Preprocessor
+&lt;!--        --&gt;php56   5.6.0RC2  lang www    PHP: Hypertext Preprocessor&lt;/screen&gt;
+
+            &lt;para&gt;Let us look at another example that is less complicated. Assuming you are looking for
+                &lt;userinput&gt;rrdtool&lt;/userinput&gt;, a popular system to store and graph time-series data, the simple search
+                approach works well:&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port search rrd&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;screen&gt;
+cacti @0.8.8b (net)
+    Cacti is a complete RRDtool network graphing solution.
+
+jrrd @1.0.4 (java)
+    Java interface to RRDTool
+
+netmrg @0.20 (net)
+    An RRDtool frontend for network monitoring, reporting, and graphing that generates day/week/month
+    MRTG style graphs.
+
+network-weathermap @0.97c (net)
+    Weathermap is a network visualisation tool, to take graphs you already have and display an
+    overview of your network as a map. It supports RRD, MRTG (RRD and old log-format), and
+    tab-delimited text files. Other sources are via plugins or external scripts.
+
+php-rrd @1.1.3 (php, net, devel)
+    PHP rrdtool extension
+
+php5-rrd @1.1.3 (php, net, devel)
+    PHP rrdtool extension
+
+php5-rrdtool @1.0.5 (php, net, devel)
+    this port is only a stub and has been made obsolete by php5-rrd
+
+php53-rrd @1.1.3 (php, net, devel)
+    PHP rrdtool extension
+
+php54-rrd @1.1.3 (php, net, devel)
+    PHP rrdtool extension
+
+php55-rrd @1.1.3 (php, net, devel)
+    PHP rrdtool extension
+
+rrdtool @1.4.7_5 (net)
</ins><span class="cx">     Round Robin Database
</span><span class="cx"> 
</span><del>-Found 2 ports.&lt;/screen&gt;
-    &lt;/section&gt;
</del><ins>+Found 11 ports.&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.info&quot;&gt;
-      &lt;title&gt;info&lt;/title&gt;
</del><ins>+            &lt;para&gt;The possible switches to &lt;option&gt;search&lt;/option&gt; and their meaning are:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The &lt;option&gt;info&lt;/option&gt; action is used to get information about
-      a port: description, maintainer, etc.&lt;/para&gt;
</del><ins>+            &lt;variablelist&gt;
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--case-sensitive&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Match the search string in a case-sensitive manner.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port info flowd&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--exact&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Match the literal search string exactly.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;flowd @0.9 (net)
</del><ins>+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--glob&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Treat the given search string as glob search string (i.e., expand wildcards
+                            &lt;option&gt;*&lt;/option&gt;, &lt;option&gt;?&lt;/option&gt;, and &lt;option&gt;[&lt;varname&gt;chars&lt;/varname&gt;]&lt;/option&gt;).
+                            This is the default behavior.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--regex&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Treat the given search string as regular expression.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--&lt;varname&gt;&amp;lt;field&amp;gt;&lt;/varname&gt;&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Test the search string against &lt;varname&gt;&amp;lt;field&amp;gt;&lt;/varname&gt;. Can be specified multiple
+                            times to test against multiple fields. The default is &lt;option&gt;--name --description&lt;/option&gt;.
+                            Possible values for &lt;varname&gt;&amp;lt;field&amp;gt;&lt;/varname&gt; are&lt;/para&gt;
+
+                        &lt;variablelist&gt;
+                            &lt;varlistentry&gt;
+                                &lt;term&gt;&lt;option&gt;--category&lt;/option&gt;, &lt;option&gt;--categories&lt;/option&gt;&lt;/term&gt;
+                                &lt;listitem&gt;
+                                    &lt;para&gt;Search for ports in a given category.&lt;/para&gt;
+                                &lt;/listitem&gt;
+                            &lt;/varlistentry&gt;
+
+                            &lt;varlistentry&gt;
+                                &lt;term&gt;
+                                    &lt;option&gt;--depends&lt;/option&gt;,
+                                    &lt;option&gt;--depends_build&lt;/option&gt;,
+                                    &lt;option&gt;--depends_extract&lt;/option&gt;,
+                                    &lt;option&gt;--depends_fetch&lt;/option&gt;,
+                                    &lt;option&gt;--depends_lib&lt;/option&gt;,
+                                    &lt;option&gt;--depends_run&lt;/option&gt;&lt;/term&gt;
+                                &lt;listitem&gt;
+                                    &lt;para&gt;Search for ports that depend on the port given as search string. The
+                                        &lt;option&gt;--depends&lt;/option&gt; is an alias for all other &lt;option&gt;--depends_&lt;/option&gt;
+                                        options combined. Note that only dependencies specified in default variants will
+                                        be found.&lt;/para&gt;
+                                &lt;/listitem&gt;
+                            &lt;/varlistentry&gt;
+
+                            &lt;varlistentry&gt;
+                                &lt;term&gt;&lt;option&gt;--description&lt;/option&gt;, &lt;option&gt;--long_description&lt;/option&gt;&lt;/term&gt;
+                                &lt;listitem&gt;
+                                    &lt;para&gt;Test the search string against ports' descriptions.&lt;/para&gt;
+                                &lt;/listitem&gt;
+                            &lt;/varlistentry&gt;
+
+                            &lt;varlistentry&gt;
+                                &lt;term&gt;&lt;option&gt;--homepage&lt;/option&gt;&lt;/term&gt;
+                                &lt;listitem&gt;
+                                    &lt;para&gt;Test the search string against the homepage field of all ports.&lt;/para&gt;
+                                &lt;/listitem&gt;
+                            &lt;/varlistentry&gt;
+
+                            &lt;varlistentry&gt;
+                                &lt;term&gt;&lt;option&gt;--maintainer&lt;/option&gt;, &lt;option&gt;--maintainer&lt;/option&gt;&lt;/term&gt;
+                                &lt;listitem&gt;
+                                    &lt;para&gt;Search for ports maintained by a specific maintainer.&lt;/para&gt;
+                                &lt;/listitem&gt;
+                            &lt;/varlistentry&gt;
+
+                            &lt;varlistentry&gt;
+                                &lt;term&gt;&lt;option&gt;--name&lt;/option&gt;&lt;/term&gt;
+                                &lt;listitem&gt;
+                                    &lt;para&gt;Search only ports' names.&lt;/para&gt;
+                                &lt;/listitem&gt;
+                            &lt;/varlistentry&gt;
+
+                            &lt;varlistentry&gt;
+                                &lt;term&gt;&lt;option&gt;--portdir&lt;/option&gt;&lt;/term&gt;
+                                &lt;listitem&gt;
+                                    &lt;para&gt;Test the search string against the path of the directory that contains the port.&lt;/para&gt;
+                                &lt;/listitem&gt;
+                            &lt;/varlistentry&gt;
+
+                            &lt;varlistentry&gt;
+                                &lt;term&gt;&lt;option&gt;--variant&lt;/option&gt;, &lt;option&gt;--variants&lt;/option&gt;&lt;/term&gt;
+                                &lt;listitem&gt;
+                                    &lt;para&gt;Search for variant names.&lt;/para&gt;
+                                &lt;/listitem&gt;
+                            &lt;/varlistentry&gt;
+                        &lt;/variablelist&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+            &lt;/variablelist&gt;
+        &lt;/section&gt;
+
+        &lt;section id=&quot;using.port.info&quot;&gt;
+            &lt;title&gt;port info&lt;/title&gt;
+
+            &lt;para&gt;The &lt;option&gt;info&lt;/option&gt; action is used to get information about a port: name, version, description,
+                variants, homepage, dependencies, license, and maintainers.&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port info yubico-pam&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;screen&gt;
+yubico-pam @2.16 (security)
</ins><span class="cx"> Variants:             universal
</span><span class="cx"> 
</span><del>-Description:          flowd is a small, fast and secure NetFlow collector.
-Homepage:             http://www.mindrot.org/flowd.html
</del><ins>+Description:          The Yubico PAM module provides an easy way to integrate the YubiKey into your
+                      existing user authentication infrastructure. The module can be configured to
+                      validate YubiKeys against Yubico's YubiCloud infrastructure, a custom YubiKey
+                      validation server or it can be used for offline authentication with newer
+                      YubiKeys supporting a challenge-response protocol.
+Homepage:             https://github.com/Yubico/yubico-pam
</ins><span class="cx"> 
</span><ins>+Build Dependencies:   pkgconfig, autoconf, automake, libtool
+Library Dependencies: ykpers, yubico-c-client
</ins><span class="cx"> Platforms:            darwin
</span><del>-License:              unknown
-Maintainers:          nomaintainer@macports.org&lt;/screen&gt;
-    &lt;/section&gt;
</del><ins>+License:              BSD
+Maintainers:          cal@macports.org&lt;/screen&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.deps&quot;&gt;
-      &lt;title&gt;deps&lt;/title&gt;
</del><ins>+        &lt;section id=&quot;using.port.deps&quot;&gt;
+            &lt;title&gt;port deps&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The &lt;option&gt;deps&lt;/option&gt; action shows you the dependencies of a
-      port; dependencies are explicitly declared in
-      &lt;filename&gt;Portfile&lt;/filename&gt;s.&lt;/para&gt;
</del><ins>+            &lt;para&gt;The &lt;option&gt;deps&lt;/option&gt; action lists the dependencies of a port. Dependencies are the packages are
+                required by a port at runtime (library and runtime dependencies) or required to install it (build,
+                fetch, and extract dependencies).&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port deps apache2&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port deps apache2&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;Full Name: apache2 @2.2.17_0+preforkmpm
-Library Dependencies: apr, apr-util, expat, openssl, pcre&lt;/screen&gt;
-    &lt;/section&gt;
</del><ins>+            &lt;screen&gt;Full Name: apache2 @2.2.27_0+preforkmpm
+&lt;!--        --&gt;Library Dependencies: apr, apr-util, expat, openssl, pcre, perl5, zlib&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.variants&quot;&gt;
-      &lt;title&gt;variants&lt;/title&gt;
</del><ins>+            &lt;para&gt;Note that the list of dependencies might depend on the variants you chose. For example, choosing the
+                &lt;option&gt;+openldap&lt;/option&gt; variant of &lt;option&gt;apache2&lt;/option&gt; adds a dependency on
+                &lt;option&gt;openldap&lt;/option&gt;:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The &lt;option&gt;variants&lt;/option&gt; action allows you to check what
-      variations of a port are available before you install it. Variants are a
-      way for port authors to provide options that may be invoked at install
-      time. See &lt;link linkend=&quot;using.variants.invoking&quot;&gt;Invoking Port
-      Variants&lt;/link&gt; below to install ports that have variants.&lt;/para&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port deps apache2 +openldap&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port variants nmap&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;screen&gt;Full Name: apache2 @2.2.27_0+openldap+preforkmpm
+&lt;!--        --&gt;Library Dependencies: apr, apr-util, expat, openssl, pcre, perl5, zlib, openldap&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;nmap has the variants:
-   no_pcre: build without pcre support
-   no_ssl: build without ssl support
</del><ins>+            &lt;para&gt;&lt;option&gt;deps&lt;/option&gt; accepts two switches:&lt;/para&gt;
+
+            &lt;variablelist&gt;
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--index&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Do not read the &lt;filename&gt;Portfile&lt;/filename&gt; to determine dependencies. Instead, rely on
+                            the information cached in the port index. Note that (despite specifying them), this option
+                            will ignore any effects of variants. It is, however, much faster.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--no-build&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Exclude dependencies only required at build time, i.e. fetch, extract, and build
+                            dependencies.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+            &lt;/variablelist&gt;
+
+        &lt;/section&gt;
+
+        &lt;section id=&quot;using.port.variants&quot;&gt;
+            &lt;title&gt;port variants&lt;/title&gt;
+
+            &lt;para&gt;The &lt;option&gt;variants&lt;/option&gt; action allows you to check what variations of a port are available
+                before you install it. Variants are a way for port authors to provide options you can use to customize
+                your build at install time. See &lt;link linkend=&quot;using.variants.invoking&quot;&gt;Invoking Port Variants&lt;/link&gt;
+                below to install ports that have variants.&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port variants apache2&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;screen&gt;
+apache2 has the variants:
+   eventmpm: Use event MPM (experimental)
+     * conflicts with preforkmpm workermpm
+   openldap: Enable LDAP support through OpenLDAP
+[+]preforkmpm: Use prefork MPM
+     * conflicts with eventmpm workermpm
</ins><span class="cx">    universal: Build for multiple architectures
</span><del>-   zenmap: build zenmap in addition to nmap&lt;/screen&gt;
-    &lt;/section&gt;
</del><ins>+   workermpm: Use worker MPM
+     * conflicts with eventmpm preforkmpm&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.install&quot;&gt;
-      &lt;title&gt;install&lt;/title&gt;
</del><ins>+            &lt;para&gt;This output lists all variants followed by their description. If a variant depends on or conflicts
+                with other variants, a line with the details on that follows. Variant lines that start with
+                &lt;option&gt;[+]&lt;/option&gt; are enabled by default by the &lt;filename&gt;Portfile&lt;/filename&gt;. Variants that are
+                marked with &lt;option&gt;(+)&lt;/option&gt; are selected because of your configuration in
+                &lt;filename&gt;$prefix/etc/macports/variants.conf&lt;/filename&gt;. See &lt;xref
+                    linkend=&quot;internals.configuration-files.variants-conf&quot; /&gt; for more information on the
+                &lt;filename&gt;variants.conf&lt;/filename&gt; file.&lt;/para&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The action &lt;option&gt;install&lt;/option&gt; is used to install a port. See
-      &lt;link linkend=&quot;using.variants.invoking&quot;&gt;Invoking Port Variants&lt;/link&gt;
-      below to install ports that have variants.&lt;/para&gt;
</del><ins>+        &lt;section id=&quot;using.port.install&quot;&gt;
+            &lt;title&gt;port install&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port install nmap&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;para&gt;The action &lt;option&gt;install&lt;/option&gt; is used to install a port. Once you determined the name of a port
+                you want (possibly using &lt;link linkend=&quot;using.port.search&quot;&gt;&lt;command&gt;port search&lt;/command&gt;&lt;/link&gt;), you
+                can install it using this command. See &lt;xref linkend=&quot;using.variants.invoking&quot; /&gt; on how to choose
+                variants when installing a new port. For example,&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;note&gt;
-        &lt;para&gt;You may break up a port's installation into smaller steps for
-        troubleshooting by passing &lt;command&gt;port&lt;/command&gt; a prior
-        installation phase such as fetch, configure, build, or destroot. See
-        section &lt;link linkend=&quot;reference.phases&quot;&gt;Port Phases&lt;/link&gt; for a
-        complete list of phases.&lt;/para&gt;
-      &lt;/note&gt;
-    &lt;/section&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port install apache2 -preforkmpm +workermpm&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.clean&quot;&gt;
-      &lt;title&gt;clean&lt;/title&gt;
</del><ins>+            &lt;para&gt;installs the &lt;option&gt;apache2&lt;/option&gt; port without the &lt;option&gt;preforkmpm&lt;/option&gt;, but with the
+                &lt;option&gt;workermpm&lt;/option&gt; variant.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The action &lt;option&gt;clean&lt;/option&gt; deletes all intermediate files
-      that MacPorts creates while building a port. A &lt;userinput&gt;port
-      clean&lt;/userinput&gt; is also often necessary to remove corrupted tarballs
-      after a failed &lt;userinput&gt;fetch&lt;/userinput&gt; phase.&lt;/para&gt;
</del><ins>+            &lt;para&gt;If the installation of a port fails, you can enable verbose or debug output by giving the
+                &lt;option&gt;-v&lt;/option&gt; or &lt;option&gt;-d&lt;/option&gt; flag to port:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port clean --all vile&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port -v install apache2&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;note&gt;
-        &lt;para&gt;You may also clean files selectively by using options
-        &lt;option&gt;--dist&lt;/option&gt;, &lt;option&gt;--archive&lt;/option&gt;, or
-        &lt;option&gt;--work&lt;/option&gt;.&lt;/para&gt;
-      &lt;/note&gt;
-    &lt;/section&gt;
</del><ins>+            &lt;para&gt;All debug information is also kept in the &lt;filename&gt;main.log&lt;/filename&gt; file for the port you
+                installed. Its path will be printed automatically if the installation fails. You can manually get the
+                path using &lt;command&gt;port logfile &lt;varname&gt;&amp;lt;portname&amp;gt;&lt;/varname&gt;&lt;/command&gt;. Note that logfiles will
+                automatically be deleted on successful installation.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.uninstall&quot;&gt;
-      &lt;title&gt;uninstall&lt;/title&gt;
</del><ins>+            &lt;para&gt;If the installation of a port fails, you should always clean and try again, i.e., run&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The &lt;option&gt;uninstall&lt;/option&gt; action will remove an installed
-      port.&lt;/para&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port clean &lt;varname&gt;&amp;lt;portname&amp;gt;&lt;/varname&gt;&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port uninstall vile&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;para&gt;and re-execute the command you ran before.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;note&gt;
-        &lt;para&gt;To also recursively uninstall the ports that the given port depends on,
-        use the &lt;option&gt;&amp;#x2011;&amp;#x2011;follow&amp;#x2011;dependencies&lt;/option&gt; flag. This will not uninstall
-        dependencies that are marked as requested or that have other dependents.&lt;/para&gt;
-        &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port uninstall --follow-dependencies vile&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;para&gt;You might also want to try enabling trace mode, which can prevent conflicts caused by files installed
+                by other ports or in common system locations, such as &lt;filename&gt;/usr/local&lt;/filename&gt;. To do that,
+                re-run the installation with the &lt;option&gt;-t&lt;/option&gt; flag, i.e.,&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-        &lt;para&gt;To recursively uninstall all ports that depend on the given port before uninstalling
-        the port itself, use the &lt;option&gt;&amp;#x2011;&amp;#x2011;follow&amp;#x2011;dependents&lt;/option&gt; flag.&lt;/para&gt;
-        &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port uninstall --follow-dependents ncurses&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port -t install &lt;varname&gt;&amp;lt;portname&amp;gt;&lt;/varname&gt;&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-        &lt;para&gt;If a port is a dependency of another installed port,
-        uninstall will not remove it unless you remove the dependent port(s)
-        first. To override this behavior, use the &lt;option&gt;-f&lt;/option&gt; (force)
-        switch. This will obviously break the dependents. Don't force uninstall ports
-        unless you know what you are doing.&lt;/para&gt;
</del><ins>+            &lt;para&gt;If the port still fails to install after you have followed these steps, please &lt;link
+                    linkend=&quot;project.tickets&quot;&gt;file a ticket&lt;/link&gt; and attach the &lt;filename&gt;main.log&lt;/filename&gt; of
+                a clean attempt.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-        &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port -f uninstall ncurses&lt;/userinput&gt;&lt;/programlisting&gt;
-      &lt;/note&gt;
-    &lt;/section&gt;
</del><ins>+            &lt;note&gt;
+                &lt;para&gt;The installation of a single port consists of multiple phases. These phases are fetch, extract,
+                    patch, configure, build, destroot, archive, and finally install. You may break up a port's
+                    installation into smaller steps for troubleshooting by using the name of one of these phases as
+                    action rather than &lt;option&gt;install&lt;/option&gt;. For example&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.contents&quot;&gt;
-      &lt;title&gt;contents&lt;/title&gt;
</del><ins>+                &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port destroot apache2&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The &lt;option&gt;contents&lt;/option&gt; action displays the files that have
-      been installed by a given port. Uninstalled ports cannot have their
-      contents listed.&lt;/para&gt;
</del><ins>+                &lt;para&gt;will run the installation of &lt;option&gt;apache2&lt;/option&gt; until the destroot phase. See &lt;xref
+                    linkend=&quot;reference.phases&quot; /&gt; for a complete list of phases and a detailed description.&lt;/para&gt;
+            &lt;/note&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port contents xorg-renderproto&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;para&gt;&lt;option&gt;install&lt;/option&gt; takes the following switches:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;Port xorg-renderproto contains:
</del><ins>+            &lt;variablelist&gt;
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--no-rev-upgrade&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;By default, a binary sanity check called &lt;option&gt;rev-upgrade&lt;/option&gt; is run automatically
+                            after each successful installation. Pass this flag, if you want to avoid running this step,
+                            for example if you want to run it explicitly later after a number of installations using
+                            &lt;command&gt;sudo port rev-upgrade&lt;/command&gt;, or if you know it will detect problems but want to
+                            defer dealing with them.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--unrequested&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;By default, each port you install using the &lt;option&gt;install&lt;/option&gt; (vs. as a dependency
+                            of a different port) is marked as &lt;quote&gt;requested&lt;/quote&gt;. If you want MacPorts to treat
+                            a port you installed manually as if it was automatically installed as a dependency (e.g., if
+                            a dependency failed to build and you re-tried installing the dependency only), pass this
+                            flag.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+            &lt;/variablelist&gt;
+        &lt;/section&gt;
+
+        &lt;section id=&quot;using.port.clean&quot;&gt;
+            &lt;title&gt;port clean&lt;/title&gt;
+
+            &lt;para&gt;The action &lt;option&gt;clean&lt;/option&gt; deletes intermediate files created by MacPorts while installing
+                a port. A &lt;command&gt;port clean&lt;/command&gt; is often necessary when builds fail and should be the first
+                thing to try after a failed installation attempt.&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port clean &lt;varname&gt;&amp;lt;portname&amp;gt;&lt;/varname&gt;&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;para&gt;&lt;command&gt;port clean&lt;/command&gt; can also be used to remove corrupted downloads after a failed
+                &lt;option&gt;fetch&lt;/option&gt; phase, by specifying the &lt;option&gt;--dist&lt;/option&gt; flag:&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port clean --dist &lt;varname&gt;&amp;lt;portname&amp;gt;&lt;/varname&gt;&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;para&gt;deletes all files that have been downloaded for the given port.&lt;/para&gt;
+
+            &lt;para&gt;&lt;option&gt;clean&lt;/option&gt; accepts the following options:&lt;/para&gt;
+
+            &lt;variablelist&gt;
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--archive&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Remove temporary archives.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--dist&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Remove downloaded files.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--logs&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Remove log files.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--work&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Remove the &lt;filename&gt;work&lt;/filename&gt; directory, i.e., the directory used by MacPorts to
+                            build a software. This removes all traces of an attempted build and is the default
+                            operation.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--all&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;All of the above combined.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+            &lt;/variablelist&gt;
+        &lt;/section&gt;
+
+        &lt;section id=&quot;using.port.uninstall&quot;&gt;
+            &lt;title&gt;port uninstall&lt;/title&gt;
+
+            &lt;para&gt;The &lt;option&gt;uninstall&lt;/option&gt; action will remove an installed port. It is one of the actions you will
+                use fairly often in MacPorts.&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port uninstall &lt;varname&gt;&amp;lt;portname&amp;gt;&lt;/varname&gt;&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;para&gt;MacPorts will refuse to uninstall ports that are still needed by other ports. For example:&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port uninstall libcomerr&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;screen&gt;
+---&amp;gt;  Unable to uninstall libcomerr @1.42.9_0, the following ports depend on it:
+---&amp;gt;    kerberos5 @1.11.3_0
+---&amp;gt;    subversion @1.8.9_0
+---&amp;gt;    subversion-perlbindings-5.16 @1.8.9_0
+Error: port uninstall failed: Please uninstall the ports that depend on libcomerr first.&lt;/screen&gt;
+
+            &lt;para&gt;You can recursively uninstall all ports that depend on the given port before uninstalling the port
+                itself to work around this. To do that, use the &lt;option&gt;--follow-dependents&lt;/option&gt; flag.&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port uninstall --follow-dependents libcomerr&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;para&gt;You can also override this safety check using the &lt;option&gt;-f&lt;/option&gt; (force) flag. &lt;emphasis&gt;Since
+                    this will obviously break the dependents you shouldn't do this unless you know what you are
+                    doing.&lt;/emphasis&gt;&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port -f uninstall libcomerr&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;para&gt;Uninstalling a port will not uninstall ports that have been automatically installed as dependencies of
+                the uninstalled port and are otherwise unused. You can trigger this behavior by passing the
+                &lt;option&gt;--follow-dependencies&lt;/option&gt; flag. Ports that were manually installed (i.e., are marked as
+                &lt;quote&gt;requested&lt;/quote&gt;) or have other dependents will not be removed. You can manually uninstall the
+                unneeded ports later using the &lt;option&gt;leaves&lt;/option&gt; pseudo-port, e.g., using &lt;command&gt;sudo port
+                    uninstall leaves&lt;/command&gt;.&lt;/para&gt;
+
+            &lt;para&gt;&lt;option&gt;uninstall&lt;/option&gt; supports the following switches:&lt;/para&gt;
+
+            &lt;variablelist&gt;
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--follow-dependents&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Recursively uninstall ports that depend on the specified port before uninstalling the port
+                            itself. See also the textual description above.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--follow-dependencies&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Also uninstall ports that were automatically installed as dependencies of the removed port
+                            and are no longer needed.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--no-exec&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Avoid running any uninstall hooks, such as commands that update cache files.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+            &lt;/variablelist&gt;
+        &lt;/section&gt;
+
+        &lt;section id=&quot;using.port.contents&quot;&gt;
+            &lt;title&gt;port contents&lt;/title&gt;
+
+            &lt;para&gt;The &lt;option&gt;contents&lt;/option&gt; action displays a list of all files that have been installed by a given
+                port. You can only use &lt;option&gt;contents&lt;/option&gt; for ports you installed.&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port contents xorg-renderproto&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;screen&gt;
+Port xorg-renderproto contains:
</ins><span class="cx">   /opt/local/include/X11/extensions/render.h
</span><span class="cx">   /opt/local/include/X11/extensions/renderproto.h
</span><span class="cx">   /opt/local/lib/pkgconfig/renderproto.pc
</span><span class="cx">   /opt/local/share/doc/renderproto/renderproto.txt&lt;/screen&gt;
</span><del>-    &lt;/section&gt;
</del><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.installed&quot;&gt;
-      &lt;title&gt;installed&lt;/title&gt;
</del><ins>+            &lt;para&gt;Common uses for &lt;option&gt;contents&lt;/option&gt; are finding the location of a port's executable after
+                installing it. The following line is usually helpful in this case:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The &lt;option&gt;installed&lt;/option&gt; action displays the installed versions,
-      variants and activation status of the
-      specified ports, or if no ports are specified, all installed
-      ports. Use the &lt;option&gt;-v&lt;/option&gt; option to also display the platform and
-      CPU architecture(s) for which the ports were built, and any variants which were
-      explicitly negated.&lt;/para&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port -q contents &lt;varname&gt;&amp;lt;portname&amp;gt;&lt;/varname&gt; | grep -E '/s?bin/'&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port installed&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;para&gt;The &lt;option&gt;-q&lt;/option&gt; (quiet) flag supresses the header line in this case, but is not strictly necessary.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;The following ports are currently installed:
-  aalib @1.4rc5_2 (active)
-  apr @1.2.8_0 (active)
-  apr-util @1.2.8_2 (active)
-  atk @1.18.0_0 (active)
</del><ins>+            &lt;para&gt;&lt;option&gt;contents&lt;/option&gt; accepts:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-[ ... trimmed ...]
</del><ins>+            &lt;variablelist&gt;
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--size&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Prints a human-readable representation of the files' sizes.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
</ins><span class="cx"> 
</span><del>-  wxWidgets @2.8.4_2 (active)
-  Xft2 @2.1.7_0 (active)
-  xrender @0.9.0_0 (active)
-  zlib @1.2.3_1 (active)&lt;/screen&gt;
</del><ins>+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--units=UNIT&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Used in conjunction with &lt;option&gt;--size&lt;/option&gt; to choose the unit of the file size.
+                            Valid parameters for &lt;option&gt;UNIT&lt;/option&gt; are&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-    &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port -v installed atlas&lt;/userinput&gt;&lt;/programlisting&gt;
-    &lt;screen&gt;The following ports are currently installed:
-  atlas @3.8.3_4+gcc44-gcc43 (active) platform='darwin 10' archs='x86_64'&lt;/screen&gt;
-    &lt;/section&gt;
</del><ins>+                        &lt;variablelist&gt;
+                            &lt;varlistentry&gt;
+                                &lt;term&gt;&lt;option&gt;B&lt;/option&gt;&lt;/term&gt;
+                                &lt;listitem&gt;
+                                    &lt;para&gt;List sizes in bytes.&lt;/para&gt;
+                                &lt;/listitem&gt;
+                            &lt;/varlistentry&gt;
+                            &lt;varlistentry&gt;
+                                &lt;term&gt;&lt;option&gt;K&lt;/option&gt;, &lt;option&gt;Ki&lt;/option&gt;, or &lt;option&gt;KiB&lt;/option&gt;&lt;/term&gt;
+                                &lt;listitem&gt;
+                                    &lt;para&gt;List sizes in &lt;option&gt;KiB&lt;/option&gt;, i.e., 1024 bytes.&lt;/para&gt;
+                                &lt;/listitem&gt;
+                            &lt;/varlistentry&gt;
+                            &lt;varlistentry&gt;
+                                &lt;term&gt;&lt;option&gt;Mi&lt;/option&gt;, or &lt;option&gt;MiB&lt;/option&gt;&lt;/term&gt;
+                                &lt;listitem&gt;
+                                    &lt;para&gt;List sizes in &lt;option&gt;MiB&lt;/option&gt;, i.e., 1024 * 1024 bytes.&lt;/para&gt;
+                                &lt;/listitem&gt;
+                            &lt;/varlistentry&gt;
+                            &lt;varlistentry&gt;
+                                &lt;term&gt;&lt;option&gt;Gi&lt;/option&gt;, or &lt;option&gt;GiB&lt;/option&gt;&lt;/term&gt;
+                                &lt;listitem&gt;
+                                    &lt;para&gt;List sizes in &lt;option&gt;GiB&lt;/option&gt;, i.e., 1024 * 1024 * 1024 bytes.&lt;/para&gt;
+                                &lt;/listitem&gt;
+                            &lt;/varlistentry&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.outdated&quot;&gt;
-      &lt;title&gt;outdated&lt;/title&gt;
</del><ins>+                            &lt;varlistentry&gt;
+                                &lt;term&gt;&lt;option&gt;k&lt;/option&gt;, or &lt;option&gt;kB&lt;/option&gt;&lt;/term&gt;
+                                &lt;listitem&gt;
+                                    &lt;para&gt;List sizes in &lt;option&gt;kB&lt;/option&gt;, i.e., 1000 bytes.&lt;/para&gt;
+                                &lt;/listitem&gt;
+                            &lt;/varlistentry&gt;
+                            &lt;varlistentry&gt;
+                                &lt;term&gt;&lt;option&gt;M&lt;/option&gt;, or &lt;option&gt;MB&lt;/option&gt;&lt;/term&gt;
+                                &lt;listitem&gt;
+                                    &lt;para&gt;List sizes in &lt;option&gt;MB&lt;/option&gt;, i.e., 1000 * 1000 bytes.&lt;/para&gt;
+                                &lt;/listitem&gt;
+                            &lt;/varlistentry&gt;
+                            &lt;varlistentry&gt;
+                                &lt;term&gt;&lt;option&gt;G&lt;/option&gt;, or &lt;option&gt;GB&lt;/option&gt;&lt;/term&gt;
+                                &lt;listitem&gt;
+                                    &lt;para&gt;List sizes in &lt;option&gt;GB&lt;/option&gt;, i.e., 1000 * 1000 * 1000 bytes.&lt;/para&gt;
+                                &lt;/listitem&gt;
+                            &lt;/varlistentry&gt;
+                        &lt;/variablelist&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+            &lt;/variablelist&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The &lt;option&gt;outdated&lt;/option&gt; action checks your installed ports
-      against the current ports tree to see if updated Portfiles have been
-      released since your ports were installed. Note that you will not see new
-      versions unless you have updated your ports tree using &lt;option&gt;selfupdate&lt;/option&gt;
-      or &lt;option&gt;sync&lt;/option&gt;.&lt;/para&gt;
</del><ins>+        &lt;section id=&quot;using.port.installed&quot;&gt;
+            &lt;title&gt;port installed&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port outdated&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;para&gt;The &lt;option&gt;installed&lt;/option&gt; action displays the installed versions and variants of the specified
+                ports, or if no ports are specified, all installed ports. It also displays whether a port is
+                &lt;quote&gt;active&lt;/quote&gt;, i.e., whether the files belonging to this port are currently present on disk or
+                inactive, i.e., stashed away in a compressed tarball.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;apr                            1.2.8_0 &amp;lt; 1.2.9_0
-autoconf                       2.61_0 &amp;lt; 2.61_1
-gimp                           2.2.14_0 &amp;lt; 2.2.16_0
-libtool                        1.5.22_0 &amp;lt; 1.5.24_0
-pkgconfig                      0.21_0 &amp;lt; 0.22_0&lt;/screen&gt;
-    &lt;/section&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port installed&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.upgrade&quot;&gt;
-      &lt;title&gt;upgrade&lt;/title&gt;
</del><ins>+            &lt;screen&gt;
+The following ports are currently installed:
+  a52dec @0.7.4_0 (active)
+  adns @1.4_0 (active)
+  apache2 @2.2.27_0+preforkmpm (active)
+  apr @1.5.1_0 (active)
+  apr-util @1.5.3_0 (active)
+  aquaterm @1.1.1_0 (active)
+  asciidoc @8.6.9_1+python27 (active)
+  …
+  XviD @1.3.3_0 (active)
+  xz @5.0.5_0 (active)
+  yasm @1.2.0_0 (active)
+  ykpers @1.12.0_0 (active)
+  youtube-dl @2014.07.25.1_0+python27 (active)
+  yubico-c-client @2.12_0 (active)
+  yubico-pam @2.16_0 (active)
+  zlib @1.2.8_0 (active)&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The &lt;option&gt;upgrade&lt;/option&gt; action upgrades installed ports and
-      their dependencies when a &lt;filename&gt;Portfile&lt;/filename&gt; in the
-      repository has been updated after a port was installed.&lt;/para&gt;
</del><ins>+            &lt;para&gt;Use the &lt;option&gt;-v&lt;/option&gt; option to also display the platform and CPU architecture(s) for which the
+                ports were built, and any variants which were explicitly negated.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port upgrade gnome&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port -v installed libsdl&lt;/userinput&gt;&lt;/programlisting&gt;
+            &lt;screen&gt;
+The following ports are currently installed:
+  libsdl @1.2.15_3-x11 (active) platform='darwin 13' archs='x86_64'&lt;/screen&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;If you wish not to upgrade a port's dependencies, use the
-      &lt;option&gt;-n&lt;/option&gt; switch. Note that this will often cause problems.&lt;/para&gt;
</del><ins>+        &lt;section id=&quot;using.port.outdated&quot;&gt;
+            &lt;title&gt;port outdated&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port -n upgrade gnome&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;para&gt;The &lt;option&gt;outdated&lt;/option&gt; action checks your installed ports against the current ports tree to see
+                they have been updated since you installed them. Note that you will only get new versions by updating
+                your ports tree using &lt;option&gt;&lt;link linkend=&quot;using.port.selfupdate&quot;&gt;selfupdate&lt;/link&gt;&lt;/option&gt; (or
+                &lt;option&gt;sync&lt;/option&gt;).&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;If you'd like to upgrade all outdated ports, use this
-      command.&lt;/para&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port outdated&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port upgrade outdated&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;screen&gt;
+The following installed ports are outdated:
+gnupg                          1.4.16_0 &amp;lt; 1.4.18_0
+gnupg2                         2.0.22_2 &amp;lt; 2.0.25_0
+gpg-agent                      2.0.22_1 &amp;lt; 2.0.25_0
+gpgme                          1.5.0_0 &amp;lt; 1.5.1_0
+HexFiend                       2.1.2_1 &amp;lt; 2.3.0_0
+libksba                        1.0.8_0 &amp;lt; 1.3.0_0
+p5.16-class-methodmaker        2.180.0_1 &amp;lt; 2.210.0_0
+p5.16-gnupg-interface          0.330.0_3 &amp;lt; 0.500.0_1
+p5.16-ipc-run                  0.910.0_1 &amp;lt; 0.920.0_0&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-      &lt;note&gt;
-        &lt;para&gt;The &lt;option&gt;upgrade&lt;/option&gt; action by default does not
-        uninstall an upgraded port —it deactivates it. See section &lt;link
-        linkend=&quot;internals.images&quot;&gt;Port Images&lt;/link&gt;, and also Destroot and
-        Activate phases in &lt;link linkend=&quot;reference.phases&quot;&gt;Port
-        Phases&lt;/link&gt;. If you wish to uninstall the old version, use the
-        &lt;option&gt;-u&lt;/option&gt; option.&lt;/para&gt;
</del><ins>+            &lt;para&gt;&lt;command&gt;port outdated&lt;/command&gt; lists the ports for which an upgrade is available and on the second
+                column, why MacPorts thinks the port needs an upgrade. In most cases, this will be an increase in the
+                version number. If it isn't, more details will be given.&lt;/para&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-        &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port -u upgrade vile&lt;/userinput&gt;&lt;/programlisting&gt;
-      &lt;/note&gt;
-    &lt;/section&gt;
</del><ins>+        &lt;section id=&quot;using.port.upgrade&quot;&gt;
+            &lt;title&gt;port upgrade&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.dependents&quot;&gt;
-      &lt;title&gt;dependents&lt;/title&gt;
</del><ins>+            &lt;para&gt;The &lt;option&gt;upgrade&lt;/option&gt; action upgrades installed ports and their dependencies to the latest
+                version available in MacPorts. In most cases, you will run&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The &lt;option&gt;dependents&lt;/option&gt; action reports what ports depend
-      upon a given port, if any. MacPorts learns about dependents during port
-      installation, so uninstalled ports will always report that there are no
-      dependents.&lt;/para&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port upgrade outdated&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port dependents openssl&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;para&gt;to update all ports that have an upgrade available. You can, however, selectively upgrade ports if you
+                want to delay other upgrades until later. To do that, specify the name(s) of the port(s) to upgrade:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;neon depends on openssl
-gnome-vfs depends on openssl
-libdap depends on openssl&lt;/screen&gt;
-    &lt;/section&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port upgrade gnupg2&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.livecheck&quot;&gt;
-      &lt;title&gt;livecheck&lt;/title&gt;
</del><ins>+            &lt;para&gt;Note that MacPorts may decide to upgrade other dependent ports before upgrading the port you requested
+                to be updated. Do not attempt to prevent this, since it will very likely lead to problems later.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The livecheck action checks to see if the application
-      corresponding to a given port has been updated at the developer's
-      download site. It's especially useful for port maintainers, but others
-      may also wish to see if a port has the latest available distribution
-      source. See section &lt;link linkend=&quot;reference.livecheck&quot;&gt;Livecheck&lt;/link&gt;
-      for more information.&lt;/para&gt;
</del><ins>+            &lt;note&gt;
+                &lt;para&gt;&lt;option&gt;upgrade&lt;/option&gt; does not uninstall the old version of a port. Instead, it deactivates it,
+                    i.e., it stashes the files belonging to the older version away in a tarball. This allows you to go
+                    back to the older version if there happens to be a problem with the updated one. To do that,
+                    run&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port livecheck rrdtool&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+                &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port installed &lt;varname&gt;&amp;lt;portname&amp;gt;&lt;/varname&gt;&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;rrdtool seems to have been updated (port version: 1.2.23, new version: 1.3beta1)&lt;/screen&gt;
</del><ins>+                &lt;para&gt;to determine the version number of the old version you want to re-activate, and run&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;note&gt;
-        &lt;para&gt;If livecheck finds no higher version at the port's download
-        site, it prints nothing. The option &lt;option&gt;-d&lt;/option&gt; (debug) may be
-        used for detailed livecheck processing information.&lt;/para&gt;
-      &lt;/note&gt;
</del><ins>+                &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port activate &lt;varname&gt;&amp;lt;portname&amp;gt;&lt;/varname&gt; @&lt;varname&gt;&amp;lt;old-version&amp;gt;&lt;/varname&gt;&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;&lt;/para&gt;
-    &lt;/section&gt;
</del><ins>+                &lt;para&gt;to go back to the old version.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.port.lint&quot;&gt;
-      &lt;title&gt;lint&lt;/title&gt;
</del><ins>+                &lt;para&gt;If you do not want to keep the old versions around while upgrading, you can pass the
+                    &lt;option&gt;-u&lt;/option&gt; option when upgrading:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The lint action checks if the Portfile conforms to the MacPorts
-      standards specified in &lt;link linkend=&quot;development&quot;&gt;Portfile
-      Development&lt;/link&gt;.&lt;/para&gt;
</del><ins>+                &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port -u upgrade outdated&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;If a Portfile validates fine the following message is
-      shown.&lt;/para&gt;
</del><ins>+                &lt;para&gt;However, we instead recommend keeping the older versions around for a while and running&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port lint chemtool&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+                &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port uninstall inactive&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;---&gt;  Verifying Portfile for chemtool
----&gt;  0 errors and 0 warnings found.&lt;/screen&gt;
</del><ins>+                &lt;para&gt;once in a while.&lt;/para&gt;
+            &lt;/note&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;Otherwise the warnings and errors are listed.&lt;/para&gt;
</del><ins>+            &lt;para&gt;&lt;option&gt;upgrade&lt;/option&gt; accepts a number of switches:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port lint KeyArcher&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;variablelist&gt;
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--force&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Always consider the given ports outdated, regardless of whether they actually are.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;---&gt;  Verifying Portfile for KeyArcher
-Warning: Line 2 should be a newline (after RCS tag)
-Warning: Line 5 has trailing whitespace before newline
-Error: Missing required variable: platforms
----&gt;  1 errors and 2 warnings found.
-&lt;/screen&gt;
-    &lt;/section&gt;
-  &lt;/section&gt;
</del><ins>+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--enforce-variants&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;If the installed variants do not match those requested, upgrade (and change variants) even
+                            if the port is not outdated. You can use this to switch the variant selection on an
+                            installed port, e.g. using&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-  &lt;section id=&quot;using.variants&quot;&gt;
-    &lt;title&gt;Port Variants&lt;/title&gt;
</del><ins>+                        &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port upgrade --enforce-variants apache2 -preforkmpm +workermpm&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-    &lt;para&gt;Variants are a way for port authors to provide options for a port
-    that may be chosen during the port install. To display the available
-    variants, if any, use this command:&lt;/para&gt;
</del><ins>+                        &lt;para&gt;Note that &lt;option&gt;--enforce-variants&lt;/option&gt; will also enforce your variant selection in
+                            all dependencies. If you know this is not necessary, you can avoid processing dependencies
+                            using the global &lt;option&gt;-n&lt;/option&gt; flag:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-    &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port variants fetchmail&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+                        &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port -n upgrade --enforce-variants apache2 -preforkmpm +workermpm&lt;/userinput&gt;&lt;/programlisting&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
</ins><span class="cx"> 
</span><del>-    &lt;screen&gt;fetchmail has the variants:
-        universal
-        ssl: Support secure connections using OpenSSL
-        fetchmailconf: Install a graphical configurator
-        ntlm: Enable NTLM authentication&lt;/screen&gt;
</del><ins>+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--no-replace&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Do not automatically install replacement ports for a port that you have installed, but was
+                            replaced with a different one.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+            &lt;/variablelist&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-    &lt;note&gt;
-      &lt;para&gt;In some ports, you may find variants for which descriptions have
-      not yet been written.&lt;/para&gt;
-    &lt;/note&gt;
</del><ins>+        &lt;section id=&quot;using.port.dependents&quot;&gt;
+            &lt;title&gt;port dependents&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.variants.invoking&quot;&gt;
-      &lt;title&gt;Invoking Variants&lt;/title&gt;
</del><ins>+            &lt;para&gt;The &lt;option&gt;dependents&lt;/option&gt; action reports what ports depend upon a given (installed) port, if
+                any.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;A variant can only be invoked when a port is installed. After you
-      have determined what variants a given port has, if any, you may install
-      a port using the variant as shown.&lt;/para&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port dependents openssl&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port install fetchmail +ssl&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;screen&gt;apache2 depends on openssl
+curl depends on openssl
+cyrus-sasl2 depends on openssl
+git depends on openssl
+kerberos5 depends on openssl
+lftp depends on openssl
+libssh depends on openssl
+mosh depends on openssl
+openldap depends on openssl
+p5.16-net-ssleay depends on openssl
+python27 depends on openssl
+python32 depends on openssl
+qt4-mac depends on openssl
+ruby19 depends on openssl
+serf1 depends on openssl
+textmate2 depends on openssl
+wireshark depends on openssl&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;Port variant execution may be verified using the
-      &lt;command&gt;port&lt;/command&gt; command with the verbose switch.&lt;/para&gt;
</del><ins>+            &lt;para&gt;Note that &lt;option&gt;dependents&lt;/option&gt; does not work for ports that are not installed on your system.
+                If you want to find out, which ports depend on a port that you have not installed, you can use&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port -v install fetchmail +ssl&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port echo depends:&lt;varname&gt;&amp;lt;portname&amp;gt;&lt;/varname&gt;&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;When a port is installed using a valid variant and specified
-      correctly, the verbose output will contain:&lt;/para&gt;
</del><ins>+            &lt;para&gt;This command will, however, not cover dependencies that are only present in non-default variants.&lt;/para&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;DEBUG: Executing variant ssl provides ssl&lt;/screen&gt;
-    &lt;/section&gt;
</del><ins>+        &lt;section id=&quot;using.port.livecheck&quot;&gt;
+            &lt;title&gt;port livecheck&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.variants.negating&quot;&gt;
-      &lt;title&gt;Negating Default Variants&lt;/title&gt;
</del><ins>+            &lt;para&gt;The &lt;option&gt;livecheck&lt;/option&gt; action checks to see if the application corresponding to a given port
+                has been updated at the developer's download site. This action is mostly useful for port maintainers to
+                determine whether their port needs to be updated, but other may also wish to see if a port packages the
+                latest available version. See &lt;xref linkend=&quot;reference.livecheck&quot; /&gt; for more information on
+                livecheck.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;For an explanation of default variants see &lt;link
-      linkend=&quot;development.variants&quot;&gt;Port Variants&lt;/link&gt;. Default variants
-      are optional, and not all ports using variants have them. For ports with
-      default variants, you may install a port without them by negating
-      default variants using &lt;quote&gt;-&lt;/quote&gt; as shown.&lt;/para&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port livecheck rb19-sass&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port install fetchmail -ssl&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;screen&gt;rb19-sass seems to have been updated (port version: 3.3.10, new version: 3.3.14)&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;To verify that you have properly negated a default variant, you
-      may want to use verbose mode. But negated variants are simply not
-      reported in any way by the &lt;command&gt;port&lt;/command&gt; command, as if they
-      did not exist. You will know you have successfully negated the default
-      variant in the example above if you do &lt;emphasis&gt;not&lt;/emphasis&gt; see this
-      line in the verbose output.&lt;/para&gt;
</del><ins>+            &lt;note&gt;
+                &lt;para&gt;If &lt;option&gt;livecheck&lt;/option&gt; finds no higher version at the port's download site, it prints
+                    nothing. The option &lt;option&gt;-d&lt;/option&gt; (debug) may be used for detailed livecheck processing
+                    information.&lt;/para&gt;
+            &lt;/note&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;DEBUG: Executing variant ssl provides ssl&lt;/screen&gt;
-    &lt;/section&gt;
-  &lt;/section&gt;
</del><ins>+        &lt;section id=&quot;using.port.lint&quot;&gt;
+            &lt;title&gt;port lint&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-  &lt;section id=&quot;using.common-tasks&quot;&gt;
-    &lt;title&gt;Common Tasks&lt;/title&gt;
</del><ins>+            &lt;para&gt;The lint action checks if the &lt;filename&gt;Portfile&lt;/filename&gt; conforms to the MacPorts standards
+                    specified in &lt;link linkend=&quot;development&quot;&gt;Portfile Development&lt;/link&gt;. You should use this if you
+                    modified a &lt;filename&gt;Portfile&lt;/filename&gt; before submitting patches back to MacPorts.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-    &lt;para&gt;This section lists common operations you may want to perform when managing a MacPorts
-    installation. Some commands are described in further details elsewhere in the guide.&lt;/para&gt;
</del><ins>+            &lt;para&gt;If a &lt;filename&gt;Portfile&lt;/filename&gt; validates fine the following message is shown.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-    &lt;para&gt;Mind the 'sudo' for some of the subsequent examples, which is necessary if you have a
-    root-MacPorts-installation.&lt;/para&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port lint rb19-sass&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.common-tasks.updating&quot;&gt;
-      &lt;title&gt;Updating your ports tree&lt;/title&gt;
</del><ins>+            &lt;screen&gt;
+---&amp;gt;  Verifying Portfile for rb19-sass
+---&amp;gt;  0 errors and 0 warnings found.&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;is essential to stay up-to-date with MacPorts:&lt;/para&gt;
</del><ins>+            &lt;para&gt;Otherwise the warnings and errors are listed.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port selfupdate&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port lint abiword&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;Password:
----&gt;  Updating the ports tree
----&gt;  Updating MacPorts base sources using rsync
-MacPorts base version 1.9.1 installed,
-MacPorts base version 1.9.1 downloaded.
----&gt;  MacPorts base is already the latest version
</del><ins>+            &lt;screen&gt;
+---&amp;gt;  Verifying Portfile for abiword
+Warning: Variant use_binary does not have a description
+Warning: Variant use_source does not have a description
+Warning: no license set
+---&amp;gt;  0 errors and 3 warnings found.&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-The ports tree has been updated. To upgrade your installed ports, you should run
-  port upgrade outdated&lt;/screen&gt;
</del><ins>+            &lt;para&gt;&lt;option&gt;lint&lt;/option&gt; has the following flag:&lt;/para&gt;
+
+            &lt;variablelist&gt;
+                &lt;varlistentry&gt;
+                    &lt;term&gt;&lt;option&gt;--nitpick&lt;/option&gt;&lt;/term&gt;
+                    &lt;listitem&gt;
+                        &lt;para&gt;Enables additional checks that are mostly whitespace-related and best practices.&lt;/para&gt;
+                    &lt;/listitem&gt;
+                &lt;/varlistentry&gt;
+            &lt;/variablelist&gt;
+        &lt;/section&gt;
</ins><span class="cx">     &lt;/section&gt;
</span><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.common-tasks.showports&quot;&gt;
-      &lt;title&gt;Show all ports which actually need updating&lt;/title&gt;
</del><ins>+    &lt;section id=&quot;using.variants&quot;&gt;
+        &lt;title&gt;Port Variants&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;is often useful, in case you don't have time to wait for port upgrades
-          (Every port needs to be downloaded, configured, built and installed, which can be -
-          depending on your systems resources - a very time consuming procedure.):&lt;/para&gt;
</del><ins>+        &lt;para&gt;Variants are a way for port authors to provide options for a port that may be chosen at installation.
+            Typically, variants are optional features that can be enabled, but are not necessarily useful for all users
+            and are thus not enabled by default. To display the available variants for a port, if any, use this
+            command:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port outdated&lt;/userinput&gt;&lt;/programlisting&gt;
-      &lt;screen&gt;The following installed ports are outdated:
-makedepend                     1.0.2_0 &amp;lt; 1.0.3_0         
-Xft2                           2.1.14_0 &amp;lt; 2.2.0_0        
-xorg-bigreqsproto              1.1.0_0 &amp;lt; 1.1.1_0         
-xorg-compositeproto            0.4.1_0 &amp;lt; 0.4.2_0         
-xorg-damageproto               1.2.0_0 &amp;lt; 1.2.1_0         
-xorg-fixesproto                4.1.1_0 &amp;lt; 4.1.2_0         
-xorg-libXdmcp                  1.0.3_0 &amp;lt; 1.1.0_0         
-xorg-libXmu                    1.0.5_0 &amp;lt; 1.1.0_0         
-xorg-libXScrnSaver             1.2.0_0 &amp;lt; 1.2.1_0         
-xorg-randrproto                1.3.1_0 &amp;lt; 1.3.2_0         
-xorg-scrnsaverproto            1.2.0_0 &amp;lt; 1.2.1_0         
-xorg-xcmiscproto               1.2.0_0 &amp;lt; 1.2.1_0         
-xpm                            3.5.8_0 &amp;lt; 3.5.9_0         
-xorg-util-macros               1.10.1_0 &amp;lt; 1.11.0_0&lt;/screen&gt;
-    &lt;/section&gt;
</del><ins>+        &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port variants &lt;varname&gt;&amp;lt;portname&amp;gt;&lt;/varname&gt;&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.common-tasks.upgrading&quot;&gt;
-      &lt;title&gt;Upgrading outdated ports&lt;/title&gt;
</del><ins>+        &lt;para&gt;For example:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;is usually done with the following command:&lt;/para&gt;
</del><ins>+        &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port variants apache2&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port upgrade outdated&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+        &lt;screen&gt;
+apache2 has the variants:
+   eventmpm: Use event MPM (experimental)
+     * conflicts with preforkmpm workermpm
+   openldap: Enable LDAP support through OpenLDAP
+[+]preforkmpm: Use prefork MPM
+     * conflicts with eventmpm workermpm
+   universal: Build for multiple architectures
+   workermpm: Use worker MPM
+     * conflicts with eventmpm preforkmpm&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;In case you want to upgrade only a specific port (for whatever reason):&lt;/para&gt;
</del><ins>+        &lt;para&gt;This output lists all variants followed by their description. If a variant depends on or conflicts with
+            other variants, a line with the details on that follows. Variant lines that start with &lt;option&gt;[+]&lt;/option&gt;
+            are enabled by default by the &lt;filename&gt;Portfile&lt;/filename&gt;. Variants that are marked with
+            &lt;option&gt;(+)&lt;/option&gt; are selected because of your configuration in
+            &lt;filename&gt;$prefix/etc/macports/variants.conf&lt;/filename&gt;. See &lt;xref
+                linkend=&quot;internals.configuration-files.variants-conf&quot; /&gt; for more information on the
+            &lt;filename&gt;variants.conf&lt;/filename&gt; file.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port upgrade makedepend&lt;/userinput&gt;&lt;/programlisting&gt;
-      &lt;screen&gt;Password:
----&gt;  Computing dependencies for makedepend
----&gt;  Fetching makedepend
----&gt;  Attempting to fetch makedepend-1.0.3.tar.bz2 from http://lil.fr.distfiles.macports.org/makedepend
----&gt;  Verifying checksum(s) for makedepend
----&gt;  Extracting makedepend
----&gt;  Configuring makedepend
----&gt;  Building makedepend
----&gt;  Staging makedepend into destroot
----&gt;  Computing dependencies for makedepend
----&gt;  Installing makedepend @1.0.3_0
----&gt;  Deactivating makedepend @1.0.2_0
----&gt;  Activating makedepend @1.0.3_0
----&gt;  Cleaning makedepend&lt;/screen&gt;
-    &lt;/section&gt;
</del><ins>+        &lt;section id=&quot;using.variants.invoking&quot;&gt;
+            &lt;title&gt;Invoking Variants&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.common-tasks.removeinactive&quot;&gt;
-      &lt;title&gt;Removing inactive version(s) of upgraded port(s)&lt;/title&gt;
-      
-      &lt;para&gt;makes sense if you are sure that you won't change back to the older version(s)
-            (which could be necessary in case of newly introduced bugs in the upgraded port
-            version):&lt;/para&gt;
</del><ins>+            &lt;para&gt;A variant can only be invoked when a port is installed. After you have determined what variants
+                a given port has, if any, you may install a port using the variant by specifying its name preceeded by
+                a plus or minus sign on the command line, for example&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port installed inactive&lt;/userinput&gt;&lt;/programlisting&gt;
-      &lt;screen&gt;The following ports are currently installed:
-  makedepend @1.0.2_0&lt;/screen&gt;
-  
-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port uninstall inactive&lt;/userinput&gt;&lt;/programlisting&gt;
-      &lt;screen&gt;Password:
----&gt;  Uninstalling makedepend @1.0.2_0&lt;/screen&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port install apache2 +openldap&lt;/userinput&gt;&lt;/programlisting&gt;
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port install apache2 -preforkmpm +workermpm&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;Of course one could also select only a specific inactive port,
-            but that requires to specify the exact version:&lt;/para&gt;
-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port uninstall makedepend @1.0.2_0&lt;/userinput&gt;&lt;/programlisting&gt;
-      &lt;screen&gt;Password:
----&gt;  Uninstalling makedepend @1.0.2_0&lt;/screen&gt;
-    &lt;/section&gt;
</del><ins>+            &lt;para&gt;Note that you will not see any confirmation of successful variant selection and MacPorts will not warn
+                you if you misspelled a variant's name. If your installation is successful, but the chosen feature still
+                seems to be missing, check for possible typos. You can use &lt;command&gt;&lt;link
+                        linkend=&quot;using.port.installed&quot;&gt;port installed&lt;/link&gt;&lt;/command&gt; to verify that the port has been
+                installed with the chosen variant.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.common-tasks.finddepending&quot;&gt;
-      &lt;title&gt;Finding ports depending on a certain port&lt;/title&gt;
</del><ins>+            &lt;para&gt;This happens because MacPorts will also use the specified variants for any dependencies. For example,&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;can sometimes be very helpful (example: find ports depending on 'xorg-util-macros'):&lt;/para&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port install apache2 +mariadb&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port echo depends:xorg-util-macros&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;para&gt;even though &lt;option&gt;apache2&lt;/option&gt; does not have a &lt;option&gt;+mariadb&lt;/option&gt; variant. Instead, this
+                will cause the &lt;option&gt;apr-util&lt;/option&gt; port to be installed with the &lt;option&gt;+mariadb&lt;/option&gt;
+                variant.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;mkfontscale
-xorg-libAppleWM
-xorg-libX11
-xorg-libXaw
-xorg-libXevie
-xorg-libXp
-xorg-libXt
-xorg-server
-xorg-server-devel
-xscope
-xtrap&lt;/screen&gt;
</del><ins>+            &lt;para&gt;MacPorts will remember the variants that were used when installing a port. If you upgrade a port
+                later, the same variants will be used, unless you use manually specify different variants and use the
+                &lt;option&gt;--enforce-variants&lt;/option&gt; flag of &lt;option&gt;upgrade&lt;/option&gt;.&lt;/para&gt;
+        &lt;/section&gt;
+
+        &lt;section id=&quot;using.variants.negating&quot;&gt;
+            &lt;title&gt;Negating Default Variants&lt;/title&gt;
+
+            &lt;para&gt;A &lt;filename&gt;Portfile&lt;/filename&gt; can specify a default set of variants that will be used when you do
+                not manually override it. Not all ports specify default variants – if there are no default variants, no
+                variants are chosen by default.&lt;/para&gt;
+
+            &lt;para&gt;If you wish to disable a variant that has been enabled by default, either by the
+                &lt;filename&gt;Portfile&lt;/filename&gt;, or by your configuration in &lt;filename&gt;variants.conf&lt;/filename&gt;, you can
+                negate the variant in question by prefixing the variant name with a minus on the command line:&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port install apache2 -preformmpm +workermpm&lt;/userinput&gt;&lt;/programlisting&gt;
+        &lt;/section&gt;
</ins><span class="cx">     &lt;/section&gt;
</span><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.common-tasks.findleaves&quot;&gt;
-      &lt;title&gt;Finding leaves (nondependent ports)&lt;/title&gt;
-      &lt;para&gt;can be sometimes worthwhile, since often additional ports get installed when
-            a specific port is installed. One can imagine that if one keeps installing and
-            uninstalling ports for some time the MacPorts tree can be swamped with ports actually
-            not necessary anymore. Leaves can be found by issuing the command:&lt;/para&gt;
</del><ins>+    &lt;section id=&quot;using.common-tasks&quot;&gt;
+        &lt;title&gt;Common Tasks&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port echo leaves&lt;/userinput&gt;&lt;/programlisting&gt;
-      &lt;screen&gt;aalib                          @1.4rc5_4 
-autoconf                       @2.68_0 
-autoconf263                    @2.63_0 
-automake                       @1.11.1_0 
-cmake                          @2.8.2_4 
-coreutils                      @8.5_0&lt;/screen&gt;
</del><ins>+        &lt;para&gt;This section lists common operations you may want to perform when managing a MacPorts installation. These
+            are the workflows you will need most while using MacPorts. We recommend you read at least this section as
+            a primer into how to use MacPorts. More details about the usage can be found in &lt;xref linkend=&quot;using.port&quot;/&gt;
+            and the &lt;option&gt;port(1)&lt;/option&gt; manpage available by running &lt;command&gt;man 1 port&lt;/command&gt; in
+            a Terminal.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;The following command delivers a similar result:&lt;/para&gt;
-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port installed leaves&lt;/userinput&gt;&lt;/programlisting&gt;
-      &lt;screen&gt;  aalib @1.4rc5_4 (active)
-  autoconf @2.68_0 (active)
-  autoconf263 @2.63_0 (active)
-  automake @1.11.1_0 (active)
-  cmake @2.8.2_4 (active)
-  coreutils @8.5_0 (active)&lt;/screen&gt;
</del><ins>+        &lt;para&gt;Mind the &lt;quote&gt;sudo&lt;/quote&gt; for some of the subsequent examples, which is necessary if you have a default
+            MacPorts installation.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;These leaves may be wanted, but could also be unwanted ports. (See the following entry!)&lt;/para&gt;
-          &lt;/section&gt;
</del><ins>+        &lt;section id=&quot;using.common-tasks.updating&quot;&gt;
+            &lt;title&gt;Updating Your Ports Tree&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.common-tasks.keeplean&quot;&gt;
-      &lt;title&gt;Keep your MacPorts installation lean by defining leaves as requested ports&lt;/title&gt;
-      &lt;para&gt;Well, before we come to the procedure of defining your requested ports,
-            let's have a look at a typical scenario where you want to understand what is
-            actually installed and what is on the other hand truly necessary for your system.
-            Say checking leaves of your MacPorts installation gives this output:&lt;/para&gt;
</del><ins>+            &lt;para&gt;The local ports tree is a collection of files that contain information on which packages are available
+                through MacPorts and how they can be installed. You should regularly update your ports tree to get
+                access to updated versions of software and bug fixes. To do that, use &lt;option&gt;selfupdate&lt;/option&gt;:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port echo leaves&lt;/userinput&gt;&lt;/programlisting&gt;
-      &lt;screen&gt;aalib                          @1.4rc5_4 
-autoconf                       @2.68_0 
-autoconf263                    @2.63_0 
-automake                       @1.11.1_0 
-cmake                          @2.8.2_4 
-coreutils                      @8.5_0 
-physfs                         @2.0.1_0&lt;/screen&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port selfupdate&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;Now it is up to the user to decide what's needed and what is not.
-            Let's say one certainly would want ports starting with autoconf up to coreutils,
-            since they are often used in port installation. Set those as requested ports using:&lt;/para&gt;
</del><ins>+            &lt;screen&gt;Password:
+&lt;!--        --&gt;---&amp;gt; Updating MacPorts base sources using rsync
+&lt;!--        --&gt;MacPorts base version &amp;macports-version; installed,
+&lt;!--        --&gt;MacPorts base version &amp;macports-version; downloaded.
+&lt;!--        --&gt;---&amp;gt; Updating the ports tree
+&lt;!--        --&gt;---&amp;gt; MacPorts base is already the latest version
+&lt;!--        --&gt;
+&lt;!--        --&gt;The ports tree has been updated. To upgrade your installed ports, you should run
+&lt;!--        --&gt;  port upgrade outdated&lt;/screen&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port setrequested autoconf autoconf263 automake cmake coreutils&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+        &lt;section id=&quot;using.common-tasks.showports&quot;&gt;
+            &lt;title&gt;Show Ports Which Need Updating&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;Say port aalib is not needed anymore, while physfs seems odd and since you don't
-            know what to make of it, you need to check out what it actually is and which ports needed
-            its installation at some time in the past.&lt;/para&gt;
</del><ins>+            &lt;para&gt;To see what's new after running &lt;option&gt;selfupdate&lt;/option&gt;, you can use &lt;command&gt;port
+                    outdated&lt;/command&gt; to generate a list of ports that have newer versions available. This can help in
+                estimating the time required for &lt;command&gt;sudo port upgrade outdated&lt;/command&gt;, even though this depends
+                on further factors such as binary package availability and a port's build time.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port info physfs&lt;/userinput&gt;&lt;/programlisting&gt;
-      &lt;screen&gt;physfs @2.0.1 (devel)
-Variants:             debug, universal
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port outdated&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-Description:          PhysicsFS is a library to provide abstract access to various
-                      archives. It is intended for use in video games, and the design
-                      was somewhat inspired by Quake 3's file subsystem.
-Homepage:             http://icculus.org/physfs/
</del><ins>+            &lt;screen&gt;
+&lt;!--        --&gt;The following installed ports are outdated:
+&lt;!--        --&gt;gnupg                          1.4.16_0 &amp;lt; 1.4.18_0
+&lt;!--        --&gt;gnupg2                         2.0.22_2 &amp;lt; 2.0.25_0
+&lt;!--        --&gt;gpg-agent                      2.0.22_1 &amp;lt; 2.0.25_0
+&lt;!--        --&gt;gpgme                          1.5.0_0 &amp;lt; 1.5.1_0
+&lt;!--        --&gt;HexFiend                       2.1.2_1 &amp;lt; 2.3.0_0
+&lt;!--        --&gt;libksba                        1.0.8_0 &amp;lt; 1.3.0_0
+&lt;!--        --&gt;p5.16-class-methodmaker        2.180.0_1 &amp;lt; 2.210.0_0
+&lt;!--        --&gt;p5.16-gnupg-interface          0.330.0_3 &amp;lt; 0.500.0_1
+&lt;!--        --&gt;p5.16-ipc-run                  0.910.0_1 &amp;lt; 0.920.0_0&lt;/screen&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-Build Dependencies:   cmake
-Library Dependencies: zlib
-Platforms:            darwin
-License:              unknown
-Maintainers:          nomaintainer@macports.org&lt;/screen&gt;
</del><ins>+        &lt;section id=&quot;using.common-tasks.upgrading&quot;&gt;
+            &lt;title&gt;Upgrading Outdated Ports&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;Well, hmm, you certainly didn't want to install Quake 3 in the past. So, let's
-            find out which ports actually depend on it, perhaps that might ring a bell:&lt;/para&gt;
</del><ins>+            &lt;para&gt;To upgrade all your installed and outdated ports, run&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port echo depends:physfs&lt;/userinput&gt;&lt;/programlisting&gt;
-      &lt;screen&gt;fbg                             
-libsdl_sound                    
-lincity-ng                      
-netpanzer&lt;/screen&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port upgrade outdated&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;No, you didn't install netpanzer either,
-            but - see there - fbg (The classic Falling Block Game!) was once on your agenda. But
-            unfortunately that port was broken
-            (see issue &lt;ulink url=&quot;http://trac.macports.org/ticket/24641&quot;&gt;#24641&lt;/ulink&gt;) when
-            you were trying to install it... Before you ran into the issue, of course, fbg's
-            dependencies were resolved by MacPorts, which is why port physfs is still present on
-            your system. Uff, great, confusion resolved. :-)&lt;/para&gt;
</del><ins>+            &lt;para&gt;In case you want to upgrade only a specific port, replace &lt;quote&gt;outdated&lt;/quote&gt; in the command given
+                above with the port's name:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;When you've step-by-step figured out which ports you want to keep on your system and
-            have set them as requested, you'll have a list of unnecessary ports, which might be
-            eventually as short as this:&lt;/para&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port upgrade makedepend&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port echo leaves&lt;/userinput&gt;&lt;/programlisting&gt;
-      &lt;screen&gt;aalib                          @1.4rc5_4 
-physfs                         @2.0.1_0 &lt;/screen&gt;
</del><ins>+            &lt;screen&gt;Password:
+&lt;!--        --&gt;---&amp;gt; Computing dependencies for makedepend
+&lt;!--        --&gt;---&amp;gt; Fetching makedepend
+&lt;!--        --&gt;---&amp;gt; Attempting to fetch makedepend-1.0.3.tar.bz2 from http://lil.fr.distfiles.macports.org/makedepend
+&lt;!--        --&gt;---&amp;gt; Verifying checksum(s) for makedepend
+&lt;!--        --&gt;---&amp;gt; Extracting makedepend
+&lt;!--        --&gt;---&amp;gt; Configuring makedepend
+&lt;!--        --&gt;---&amp;gt; Building makedepend
+&lt;!--        --&gt;---&amp;gt; Staging makedepend into destroot
+&lt;!--        --&gt;---&amp;gt; Computing dependencies for makedepend
+&lt;!--        --&gt;---&amp;gt; Installing makedepend @1.0.3_0
+&lt;!--        --&gt;---&amp;gt; Deactivating makedepend @1.0.2_0
+&lt;!--        --&gt;---&amp;gt; Activating makedepend @1.0.3_0
+&lt;!--        --&gt;---&amp;gt; Cleaning makedepend&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;Get rid of them by issuing the command:&lt;/para&gt;
</del><ins>+            &lt;para&gt;Note that MacPorts will upgrade any dependencies of a port first before updating the port itself. So
+                even if you request the update of a single port only, other ports may be upgraded first because they are
+                in the dependency tree. Do &lt;emphasis&gt;not&lt;/emphasis&gt; try to avoid this, as it will very likely lead to
+                problems later on – the new version of the port you want to upgrade might require the newer dependency,
+                or it might only have been upgraded at all to be rebuilt against the updated dependency, in which case
+                avoiding the update of the dependency defeats the purpose of the reinstallation.&lt;/para&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port uninstall leaves&lt;/userinput&gt;&lt;/programlisting&gt;
-      &lt;screen&gt;---&gt;  Deactivating physfs @2.0.1_0
----&gt;  Cleaning physfs
----&gt;  Uninstalling physfs @2.0.1_0
----&gt;  Cleaning physfs
----&gt;  Deactivating aalib @1.4rc5_4
----&gt;  Uninstalling aalib @1.4rc5_4&lt;/screen&gt;
</del><ins>+        &lt;section id=&quot;using.common-tasks.removeinactive&quot;&gt;
+            &lt;title&gt;Removing Inactive Version(s) of Upgraded Port(s)&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;Find all installed ports you previously set as requested using:&lt;/para&gt;
</del><ins>+            &lt;para&gt;By default, upgrading ports in MacPorts does not remove the older versions. This is a safety measure
+                to ensure you can go back to a working and tested version in case an update goes wrong. To save disk
+                space, you should periodically uninstall any old versions you no longer need.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port installed requested&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;para&gt;Use&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;Checking the list of leaves from time to time will help to keep your system
-            free of too much &lt;quote&gt;garbage&lt;/quote&gt;. However, keep in mind that some ports may be dependencies
-            only during the installation of a port (library dependencies, installation or
-            configuration tools, etc.). So, be careful when removing seemingly unnecessary leaves,
-            otherwise you'll see them being installed again and again.&lt;/para&gt;
-      &lt;/section&gt;
-  &lt;/section&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port installed inactive&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-  &lt;section id=&quot;using.binaries&quot;&gt;
-    &lt;title&gt;Port Binaries&lt;/title&gt;
</del><ins>+            &lt;para&gt;to get a list of inactive ports you likely no longer need.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-    &lt;para&gt;MacPorts can pre-compile ports into binaries so applications need
-    not be compiled when installing on a target system. MacPorts may create
-    two types of binaries: archives and packages.&lt;/para&gt;
</del><ins>+            &lt;screen&gt;The following ports are currently installed:
+&lt;!--        --&gt;  gnupg @1.4.16_0
+&lt;!--        --&gt;  gnupg2 @2.0.22_2
+&lt;!--        --&gt;  gpg-agent @2.0.22_1
+&lt;!--        --&gt;  gpgme @1.5.0_0
+&lt;!--        --&gt;  HexFiend @2.1.2_1
+&lt;!--        --&gt;  libksba @1.0.8_0
+&lt;!--        --&gt;  p5.16-class-methodmaker @2.180.0_1
+&lt;!--        --&gt;  p5.16-gnupg-interface @0.330.0_3
+&lt;!--        --&gt;  p5.16-ipc-run @0.910.0_1&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.binaries.archives&quot;&gt;
-      &lt;title&gt;Binary Archives&lt;/title&gt;
</del><ins>+            &lt;para&gt;Check the list for any ports you might still want to keep. To remove all of them at once, run&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;Binary archives can only be used on a target system running
-      MacPorts. Binary archives allow MacPorts utilities to begin installation
-      after the destroot phase and install and activate a port on the target
-      system. Binary archives are created whenever a port is installed, and can also
-      be downloaded from a server.&lt;/para&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port uninstall inactive&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port -d archive logrotate&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;screen&gt;Password:
+&lt;!--        --&gt;---&amp;gt;  Uninstalling p5.16-gnupg-interface @0.330.0_3
+&lt;!--        --&gt;---&amp;gt;  Cleaning p5.16-gnupg-interface
+&lt;!--        --&gt;---&amp;gt;  Uninstalling gnupg @1.4.16_0
+&lt;!--        --&gt;---&amp;gt;  Cleaning gnupg
+&lt;!--        --&gt;---&amp;gt;  Uninstalling gpgme @1.5.0_0
+&lt;!--        --&gt;---&amp;gt;  Cleaning gpgme
+&lt;!--        --&gt;---&amp;gt;  Uninstalling gnupg2 @2.0.22_2
+&lt;!--        --&gt;---&amp;gt;  Cleaning gnupg2
+&lt;!--        --&gt;---&amp;gt;  Uninstalling gpg-agent @2.0.22_1
+&lt;!--        --&gt;---&amp;gt;  Cleaning gpg-agent
+&lt;!--        --&gt;---&amp;gt;  Uninstalling HexFiend @2.1.2_1
+&lt;!--        --&gt;---&amp;gt;  Cleaning HexFiend
+&lt;!--        --&gt;---&amp;gt;  Uninstalling libksba @1.0.8_0
+&lt;!--        --&gt;---&amp;gt;  Cleaning libksba
+&lt;!--        --&gt;---&amp;gt;  Uninstalling p5.16-class-methodmaker @2.180.0_1
+&lt;!--        --&gt;---&amp;gt;  Cleaning p5.16-class-methodmaker
+&lt;!--        --&gt;---&amp;gt;  Uninstalling p5.16-ipc-run @0.910.0_1
+&lt;!--        --&gt;---&amp;gt;  Cleaning p5.16-ipc-run&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;Debug output is shown below.&lt;/para&gt;
</del><ins>+            &lt;para&gt;Of course you could also select only a specific inactive port, but that requires to specify the exact
+                version:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;screen&gt;---&amp;gt;  Creating logrotate-3.7_0.i386.tbz2
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port uninstall HexFiend @2.1.2_1&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-[ ... trimmed ... ]
</del><ins>+            &lt;screen&gt;Password:
+&lt;!--        --&gt;---&amp;gt;  Uninstalling HexFiend @2.1.2_1
+&lt;!--        --&gt;---&amp;gt;  Cleaning HexFiend&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-DEBUG:
-./
-./+COMMENT
-./+CONTENTS
-./+DESC
-./+PORTFILE
-./+STATE
-./opt/
-./opt/local/
-./opt/local/etc/
-./opt/local/etc/logrotate.conf
-./opt/local/man/
-./opt/local/man/man8/
-./opt/local/man/man8/logrotate.8
-./opt/local/sbin/
-./opt/local/sbin/logrotate
----&amp;gt;  Archive logrotate-3.7_0.i386.tbz2 packaged
-DEBUG: Executing archive_finish
----&amp;gt;  Archive for logrotate 3.7_0 packaged&lt;/screen&gt;
</del><ins>+            &lt;para&gt;To uninstall all inactive ports but a single one, you can use the following shortcut:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;Binary archive files are placed in
-      &lt;filename&gt;${prefix}/var/macports/software/&lt;/filename&gt;. The archive file
-      type is set in the &lt;filename&gt;macports.conf&lt;/filename&gt; file. The default
-      format is .tbz2; other options are: tar, tbz, tbz2, tgz, tlz, txz, xar, zip, cpgz,
-      cpio.&lt;/para&gt;
-    &lt;/section&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port uninstall inactive and not &lt;varname&gt;&amp;lt;portname&amp;gt;&lt;/varname&gt;&lt;/userinput&gt;&lt;/programlisting&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.binaries.binary-packages&quot;&gt;
-      &lt;title&gt;Binary Packages&lt;/title&gt;
</del><ins>+        &lt;section id=&quot;using.common-tasks.finddepending&quot;&gt;
+            &lt;title&gt;Finding Ports Depending on a Certain Port&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;Binary packages are standalone binary installers that are
-      precompiled; they do not require MacPorts on the target system. Binary
-      files created with MacPorts may be either .pkg (OS X Installer
-      Packages), or .rpm (RPM Package Manager) format. MacPorts may also
-      process a .pkg package into a OS X .dmg disk image file. You may
-      create binary packages with the &lt;command&gt;port&lt;/command&gt; command as shown
-      in these examples.&lt;/para&gt;
</del><ins>+            &lt;para&gt;If you want to find all ports that depend on a given other port, you can use&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port pkg pstree&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port echo depends:&lt;varname&gt;&amp;lt;portname&amp;gt;&lt;/varname&gt;&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;You may create a OS X .dmg disk image file as shown.&lt;/para&gt;
</del><ins>+            &lt;para&gt;If you are only interested in the dependent ports that you actually have installed, you can use the
+                quicker and more accurate &lt;option&gt;dependents&lt;/option&gt;:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port dmg pstree&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port dependents &lt;varname&gt;&amp;lt;portname&amp;gt;&lt;/varname&gt;&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;You can also create a metapackage containing packages of a port and all its
-      dependencies:&lt;/para&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port dependents libksba&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port mpkg gimp2&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;screen&gt;gnupg2 depends on libksba
+&lt;!--        --&gt;gpg-agent depends on libksba&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;Just as with a single package, a metapackage can also be wrapped in a .dmg.&lt;/para&gt;
</del><ins>+            &lt;para&gt;MacPorts also has a recursive version of the &lt;option&gt;dependents&lt;/option&gt; action called &lt;option&gt;rdependents&lt;/option&gt;:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port mdmg gimp2&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port rdependents libksba&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;You may compile a port into an RPM file as shown, in order to
-      install it onto a target that has RPM utilities or a full package
-      management system that can install RPMs.&lt;/para&gt;
</del><ins>+            &lt;screen&gt;The following ports are dependent on libksba:
+&lt;!--        --&gt;  gnupg2
+&lt;!--        --&gt;    gpgme
+&lt;!--        --&gt;  gpg-agent&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo port rpm pstree&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;para&gt;Finally, to find out which port you manually installed caused the automatic installation of
+                a dependency, use the following expression:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;All packages are placed in a port's work directory,
-      except for rpms that are placed under the regular &lt;quote&gt;RPMS&lt;/quote&gt;:&lt;/para&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port installed requested and rdependentof:&lt;varname&gt;&amp;lt;portname&amp;gt;&lt;/varname&gt;&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;port work pstree&lt;/userinput&gt;&lt;/programlisting&gt;
-      &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;rpm --eval %{_rpmdir}&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port installed requested and rdependentof:libksba&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-    &lt;/section&gt;
-  &lt;/section&gt;
</del><ins>+            &lt;screen&gt;The following ports are currently installed:
+&lt;!--        --&gt;  gnupg2 @2.0.25_0 (active)&lt;/screen&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-  &lt;!--
-  &lt;section id=&quot;using.rsync-replication&quot;&gt;
-    &lt;title&gt;Rsync Replication Servers&lt;/title&gt;
</del><ins>+        &lt;section id=&quot;using.common-tasks.findleaves&quot;&gt;
+            &lt;title&gt;Finding Leaves&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-    &lt;para&gt;You may setup an rsync replication server on your local network to
-    minimize internet delay and bandwidth when performing MacPorts selfupdate
-    operations. An rsync replication server pulls the latest MacPorts base,
-    development, and port sources from the remote MacPorts Subversion server,
-    and then serves as the rsync source when rsync replication clients on the
-    local network perform selfupdates. &lt;/para&gt;
</del><ins>+            &lt;para&gt;After a while of using MacPorts, installing and uninstalling ports, packages that have been
+                automatically installed as dependencies for other ports are left behind, even though they are no longer
+                necessary. Ports that have not been manually installed (&lt;quote&gt;requested&lt;/quote&gt;) and do not have any
+                dependents are called &lt;quote&gt;leaves&lt;/quote&gt; and can be identified using the &lt;option&gt;leaves&lt;/option&gt;
+                pseudo-port, for example in conjunction with the &lt;option&gt;echo&lt;/option&gt; or &lt;option&gt;installed&lt;/option&gt;
+                action.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-    &lt;note&gt;
-      &lt;para&gt;Only advanced users should attempt to setup an rsync replication
-      server. Before doing so, please contact &lt;email&gt;macports-mgr @
-      lists.macosforge.org&lt;/email&gt;. If the scripts are run too often you may overload
-      the MacPorts rsync mirrors; it must not be run any more often than each
-      one-half hour and should be run at an offset to the clock half hour
-      periods.&lt;/para&gt;
-    &lt;/note&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port echo leaves&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.rsync-replication.server-setup&quot;&gt;
-      &lt;title&gt;Rsync Server Setup&lt;/title&gt;
</del><ins>+            &lt;screen&gt;
+&lt;!--        --&gt;git-flow                       @0.4.1_2
+&lt;!--        --&gt;gmake                          @4.0_0
+&lt;!--        --&gt;gpgme                          @1.5.1_0
+&lt;!--        --&gt;hs-download-curl               @0.1.4_0
+&lt;!--        --&gt;pkgconfig                      @0.28_0
+&lt;!--        --&gt;py27-docutils                  @0.12_0
+&lt;!--        --&gt;python32                       @3.2.5_0
+&lt;!--        --&gt;texi2html                      @5.0_1
+&lt;!--        --&gt;yasm                           @1.2.0_0&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;TODO: This section needs to be completed.&lt;/para&gt;
</del><ins>+            &lt;para&gt;These leaves may be wanted, but are in most cases unneeded. See &lt;xref
+                    linkend=&quot;using.common-tasks.keeplean&quot;/&gt; to find out how to mark some of the leaves as requested. You
+                can uninstall all leaves using&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;To setup a host as an rsync replication server, follow these
-      steps:&lt;/para&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port uninstall leaves&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-      &lt;orderedlist&gt;
-        &lt;listitem&gt;
-          &lt;para&gt;Change to the portmgr directory where
-          &lt;filename&gt;mprsyncup&lt;/filename&gt; and &lt;filename&gt;rsync.repos&lt;/filename&gt;
-          reside.&lt;/para&gt;
</del><ins>+            &lt;para&gt;Note that the uninstallation can mark new ports as leaves. To uninstall all leaves, you have to repeat
+                the process until &lt;command&gt;port echo leaves&lt;/command&gt; comes back empty. To simplify this, consider
+                installing the &lt;option&gt;port_cutleaves&lt;/option&gt; port and running &lt;command&gt;sudo
+                    port_cutleaves&lt;/command&gt;.&lt;/para&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-          &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;cd ${prefix}/var/macports/sources/rsync.macports.org/release/ \
-        base/portmgr&lt;/userinput&gt;
-&lt;/programlisting&gt;
-        &lt;/listitem&gt;
</del><ins>+        &lt;section id=&quot;using.common-tasks.keeplean&quot;&gt;
+            &lt;title&gt;Keep Your Installation Lean by Defining Leaves as Requested Ports&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-        &lt;listitem&gt;
-          &lt;para&gt;Set variables in the &lt;filename&gt;mprsyncup&lt;/filename&gt;
-          script.&lt;/para&gt;
</del><ins>+            &lt;para&gt;Well, before we come to the procedure of defining your requested ports, let's have a look at a typical
+                scenario where you want to understand what is actually installed and what is on the other hand truly
+                necessary for your system. Say checking leaves of your MacPorts installation gives this output:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-          &lt;programlisting&gt;???&lt;/programlisting&gt;
-        &lt;/listitem&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port echo leaves&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-        &lt;listitem&gt;
-          &lt;para&gt;Set variables in the &lt;filename&gt;rsync.repos&lt;/filename&gt;
-          script.&lt;/para&gt;
</del><ins>+            &lt;screen&gt;
+&lt;!--        --&gt;git-flow                       @0.4.1_2
+&lt;!--        --&gt;gmake                          @4.0_0
+&lt;!--        --&gt;gpgme                          @1.5.1_0
+&lt;!--        --&gt;hs-download-curl               @0.1.4_0
+&lt;!--        --&gt;pkgconfig                      @0.28_0
+&lt;!--        --&gt;py27-docutils                  @0.12_0
+&lt;!--        --&gt;python32                       @3.2.5_0
+&lt;!--        --&gt;texi2html                      @5.0_1
+&lt;!--        --&gt;yasm                           @1.2.0_0&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-          &lt;programlisting&gt;???&lt;/programlisting&gt;
-        &lt;/listitem&gt;
</del><ins>+            &lt;para&gt;Now it is up to the user to decide what's needed and what is not. We've noticed
+                &lt;option&gt;pkgconfig&lt;/option&gt; is needed to build many ports, and while it is strictly not needed after
+                installation, we'd like to keep it around to avoid installing it over and over again.
+                &lt;option&gt;python32&lt;/option&gt;, &lt;option&gt;texi2html&lt;/option&gt;, and &lt;option&gt;yasm&lt;/option&gt; are only needed to
+                update &lt;option&gt;mplayer2&lt;/option&gt;, and since that software is rarely updated, we will re-install those
+                ports again when they are needed. Since they are all distributable, MacPorts will use pre-built binaries
+                for their installation anyway, so re-installing them wouldn't take long anyway. We don't really know why
+                the rest of the leaves were installed, so we're just going to remove them for now.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-        &lt;listitem&gt;
-          &lt;para&gt;Set the &lt;filename&gt;mprsyncup&lt;/filename&gt; and
-          &lt;filename&gt;rsync.repos&lt;/filename&gt; scripts in
-          &lt;filename&gt;crontab&lt;/filename&gt;.&lt;/para&gt;
</del><ins>+            &lt;para&gt;Since we decided to keep &lt;option&gt;pkgconfig&lt;/option&gt;, we are going to mark it as manually installed
+                (&lt;quote&gt;requested&lt;/quote&gt; in MacPorts lingo) using:&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-          &lt;note&gt;
-            &lt;para&gt;If you wish to setup and rsync replication server, please
-            contact &lt;email&gt;macports-mgr@lists.macosforge.org&lt;/email&gt;. If the
-            scripts are run too often you may overload the MacPorts rsync mirrors;
-            It must not be run any more often than each one-half hour and should
-            be run at an offset to the clock half hour periods.&lt;/para&gt;
-          &lt;/note&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port setrequested pkgconfig&lt;/userinput&gt;&lt;/programlisting&gt;
</ins><span class="cx"> 
</span><del>-          &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;sudo crontab -e&lt;/userinput&gt;&lt;/programlisting&gt;
</del><ins>+            &lt;para&gt;When you've step-by-step figured out which ports you want to keep on your system and have set them as
+                requested, you'll have a list of unnecessary ports, which you can get rid of using&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-          &lt;programlisting&gt;15 * * * * ${prefix}/var/macports/sources/rsync.macports.org/release/ \
-          base/portmgr/mprsyncup&lt;/programlisting&gt;
-        &lt;/listitem&gt;
-      &lt;/orderedlist&gt;
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port uninstall leaves&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;para&gt;Note that uninstalling leaves may mark new ports as leaves, so you will have to repeat the process.
+                You can install the &lt;option&gt;port_cutleaves&lt;/option&gt; port, which is a special script for the job. It
+                allows you to interactively decide whether to keep or uninstall a port. Run it as&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port_cutleaves&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;screen&gt;
+&lt;!--        --&gt;[Leaf 1 of 8] hs-download-curl @0.1.4_0 (active):
+&lt;!--        --&gt;  [keep] / (u)ninstall / (f)lush / (a)bort:
+&lt;!--        --&gt;** hs-download-curl @0.1.4_0 will be kept.
+&lt;!--        --&gt;
+&lt;!--        --&gt;[Leaf 2 of 8] gmake @4.0_0 (active):
+&lt;!--        --&gt;  [keep] / (u)ninstall / (f)lush / (a)bort: u
+&lt;!--        --&gt;** gmake @4.0_0 will be uninstalled.
+&lt;!--        --&gt;
+&lt;!--        --&gt;[Leaf 3 of 8] texi2html @5.0_1 (active):
+&lt;!--        --&gt;  [keep] / (u)ninstall / (f)lush / (a)bort: u
+&lt;!--        --&gt;** texi2html @5.0_1 will be uninstalled.
+&lt;!--        --&gt;
+&lt;!--        --&gt;[Leaf 4 of 8] yasm @1.2.0_0 (active):
+&lt;!--        --&gt;  [keep] / (u)ninstall / (f)lush / (a)bort: u
+&lt;!--        --&gt;** yasm @1.2.0_0 will be uninstalled.
+&lt;!--        --&gt;
+&lt;!--        --&gt;[Leaf 5 of 8] python32 @3.2.5_0 (active):
+&lt;!--        --&gt;  [keep] / (u)ninstall / (f)lush / (a)bort: u
+&lt;!--        --&gt;** python32 @3.2.5_0 will be uninstalled.
+&lt;!--        --&gt;
+&lt;!--        --&gt;[Leaf 6 of 8] py27-docutils @0.12_0 (active):
+&lt;!--        --&gt;  [keep] / (u)ninstall / (f)lush / (a)bort: u
+&lt;!--        --&gt;** py27-docutils @0.12_0 will be uninstalled.
+&lt;!--        --&gt;
+&lt;!--        --&gt;[Leaf 7 of 8] git-flow @0.4.1_2 (active):
+&lt;!--        --&gt;  [keep] / (u)ninstall / (f)lush / (a)bort: u
+&lt;!--        --&gt;** git-flow @0.4.1_2 will be uninstalled.
+&lt;!--        --&gt;
+&lt;!--        --&gt;[Leaf 8 of 8] gpgme @1.5.1_0 (active):
+&lt;!--        --&gt;  [keep] / (u)ninstall / (f)lush / (a)bort: u
+&lt;!--        --&gt;** gpgme @1.5.1_0 will be uninstalled.
+&lt;!--        --&gt;
+&lt;!--        --&gt;---&amp;gt;  Deactivating gmake @4.0_0
+&lt;!--        --&gt;---&amp;gt;  Cleaning gmake
+&lt;!--        --&gt;---&amp;gt;  Uninstalling gmake @4.0_0
+&lt;!--        --&gt;---&amp;gt;  Cleaning gmake
+&lt;!--        --&gt;---&amp;gt;  Deactivating texi2html @5.0_1
+&lt;!--        --&gt;---&amp;gt;  Cleaning texi2html
+&lt;!--        --&gt;---&amp;gt;  Uninstalling texi2html @5.0_1
+&lt;!--        --&gt;---&amp;gt;  Cleaning texi2html
+&lt;!--        --&gt;---&amp;gt;  Deactivating yasm @1.2.0_0
+&lt;!--        --&gt;---&amp;gt;  Cleaning yasm
+&lt;!--        --&gt;---&amp;gt;  Uninstalling yasm @1.2.0_0
+&lt;!--        --&gt;---&amp;gt;  Cleaning yasm
+&lt;!--        --&gt;---&amp;gt;  Deactivating python32 @3.2.5_0
+&lt;!--        --&gt;---&amp;gt;  Cleaning python32
+&lt;!--        --&gt;---&amp;gt;  Uninstalling python32 @3.2.5_0
+&lt;!--        --&gt;---&amp;gt;  Cleaning python32
+&lt;!--        --&gt;---&amp;gt;  Deactivating py27-docutils @0.12_0
+&lt;!--        --&gt;---&amp;gt;  Cleaning py27-docutils
+&lt;!--        --&gt;---&amp;gt;  Uninstalling py27-docutils @0.12_0
+&lt;!--        --&gt;---&amp;gt;  Cleaning py27-docutils
+&lt;!--        --&gt;---&amp;gt;  Deactivating git-flow @0.4.1_2
+&lt;!--        --&gt;---&amp;gt;  Cleaning git-flow
+&lt;!--        --&gt;---&amp;gt;  Uninstalling git-flow @0.4.1_2
+&lt;!--        --&gt;---&amp;gt;  Cleaning git-flow
+&lt;!--        --&gt;---&amp;gt;  Deactivating gpgme @1.5.1_0
+&lt;!--        --&gt;---&amp;gt;  Cleaning gpgme
+&lt;!--        --&gt;---&amp;gt;  Uninstalling gpgme @1.5.1_0
+&lt;!--        --&gt;---&amp;gt;  Cleaning gpgme
+&lt;!--        --&gt;
+&lt;!--        --&gt;The following ports were uninstalled:
+&lt;!--        --&gt;  gmake @4.0_0
+&lt;!--        --&gt;  texi2html @5.0_1
+&lt;!--        --&gt;  yasm @1.2.0_0
+&lt;!--        --&gt;  python32 @3.2.5_0
+&lt;!--        --&gt;  py27-docutils @0.12_0
+&lt;!--        --&gt;  git-flow @0.4.1_2
+&lt;!--        --&gt;  gpgme @1.5.1_0
+&lt;!--        --&gt;
+&lt;!--        --&gt;Search for new leaves?
+&lt;!--        --&gt;  [no] / (y)es: y
+&lt;!--        --&gt;
+&lt;!--        --&gt;[Leaf 1 of 1] py27-roman @2.0.0_0 (active):
+&lt;!--        --&gt;  [keep] / (u)ninstall / (f)lush / (a)bort: u
+&lt;!--        --&gt;** py27-roman @2.0.0_0 will be uninstalled.
+&lt;!--        --&gt;
+&lt;!--        --&gt;---&amp;gt;  Deactivating py27-roman @2.0.0_0
+&lt;!--        --&gt;---&amp;gt;  Cleaning py27-roman
+&lt;!--        --&gt;---&amp;gt;  Uninstalling py27-roman @2.0.0_0
+&lt;!--        --&gt;---&amp;gt;  Cleaning py27-roman
+&lt;!--        --&gt;
+&lt;!--        --&gt;The following ports were uninstalled:
+&lt;!--        --&gt;  py27-roman @2.0.0_0
+&lt;!--        --&gt;
+&lt;!--        --&gt;Search for new leaves?
+&lt;!--        --&gt;  [no] / (y)es: y
+&lt;!--        --&gt;
+&lt;!--        --&gt;There are no new leaves to process.&lt;/screen&gt;
+
+            &lt;para&gt;You can get a list of all ports you previously set as requested (or installed manually) using:&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port installed requested&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;para&gt;We recommend you check the list of leaves from time to time to keep your system free of too much
+                &lt;quote&gt;garbage&lt;/quote&gt;. You should also periodically check the list of your requested ports and mark any
+                ports you no longer need as unrequested using&lt;/para&gt;
+
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port unsetrequested &lt;varname&gt;&amp;lt;portname&amp;gt;&lt;/varname&gt;&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;para&gt;Then check for new leaves to cut down the number of installed ports and the size of your MacPorts
+                installation.&lt;/para&gt;
+        &lt;/section&gt;
</ins><span class="cx">     &lt;/section&gt;
</span><span class="cx"> 
</span><del>-    &lt;section id=&quot;using.rsync-replication.client-setup&quot;&gt;
-      &lt;title&gt;Rsync Client Setup&lt;/title&gt;
</del><ins>+    &lt;section id=&quot;using.binaries&quot;&gt;
+        &lt;title&gt;Port Binaries&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-      &lt;para&gt;To setup a host as an rsync replication client, follow these
-      steps:&lt;/para&gt;
</del><ins>+        &lt;para&gt;MacPorts can pre-compile ports into binaries so applications need not be compiled when installing on
+            a target system. MacPorts supports two types of binaries: archives and packages.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-      &lt;orderedlist&gt;
-        &lt;listitem&gt;
-          &lt;para&gt;Change to the MacPorts &lt;filename&gt;etc/&lt;/filename&gt; directory to
-          access &lt;filename&gt;macports.conf&lt;/filename&gt; and
-          &lt;filename&gt;sources.conf&lt;/filename&gt;.&lt;/para&gt;
</del><ins>+        &lt;section id=&quot;using.binaries.archives&quot;&gt;
+            &lt;title&gt;Binary Archives&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-          &lt;programlisting&gt;&lt;prompt&gt;%%&lt;/prompt&gt; &lt;userinput&gt;cd ${prefix}/etc/macports&lt;/userinput&gt;&lt;/programlisting&gt;
-        &lt;/listitem&gt;
</del><ins>+            &lt;para&gt;Binary archives can only be used on a target system running MacPorts. They allow MacPorts utilities to
+                skip the build (which is usually the phase that takes longest) and begin installation after the destroot
+                phase. Binary archives are automatically created whenever a port is installed, and can also be
+                downloaded from a server. MacPorts runs a buildbot infrastructure that creates prebuilt binary packages
+                for all ports in MacPorts for the default installation prefix. Buildbots exist for systems later or
+                equal to Snow Leopard. If a port builds successfully and its license and those of its dependencies allow
+                binary redistribution, they archives are uploaded to &lt;option&gt;packages.macports.org&lt;/option&gt; and will be
+                automatically used by MacPorts during installation.&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-        &lt;listitem&gt;
-          &lt;para&gt;In &lt;filename&gt;macports.conf&lt;/filename&gt;, set variable
-          &lt;varname&gt;rsync_server&lt;/varname&gt; to the rsync replication server; the
-          &lt;varname&gt;rsync_dir&lt;/varname&gt; path variable can be left at the
-          default if you follow the defaults that the MacPorts mirrors
-          use.&lt;/para&gt;
</del><ins>+            &lt;para&gt;You can manually create an archive (and see debug output for its creation) using&lt;/para&gt;
</ins><span class="cx"> 
</span><del>-          &lt;programlisting&gt;rsync_server            rsync.mycompany.com
</del><ins>+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port -d archive logrotate&lt;/userinput&gt;&lt;/programlisting&gt;
+            &lt;screen&gt;
+&lt;!--        --&gt;---&amp;gt;  Installing logrotate @3.8.6_2+gzip
+&lt;!--        --&gt;[…]
+&lt;!--        --&gt;DEBUG: Creating logrotate-3.8.6_2+gzip.darwin_13.x86_64.tbz2
+&lt;!--        --&gt;[…]
+&lt;!--        --&gt;a .
+&lt;!--        --&gt;a ./+COMMENT
+&lt;!--        --&gt;a ./+CONTENTS
+&lt;!--        --&gt;a ./+DESC
+&lt;!--        --&gt;a ./+PORTFILE
+&lt;!--        --&gt;a ./+STATE
+&lt;!--        --&gt;a ./opt
+&lt;!--        --&gt;a ./opt/local
+&lt;!--        --&gt;a ./opt/local/etc
+&lt;!--        --&gt;a ./opt/local/sbin
+&lt;!--        --&gt;a ./opt/local/share
+&lt;!--        --&gt;a ./opt/local/var
+&lt;!--        --&gt;a ./opt/local/var/run
+&lt;!--        --&gt;a ./opt/local/var/run/logrotate
+&lt;!--        --&gt;a ./opt/local/var/run/logrotate/.turd_logrotate
+&lt;!--        --&gt;a ./opt/local/share/logrotate
+&lt;!--        --&gt;a ./opt/local/share/man
+&lt;!--        --&gt;a ./opt/local/share/man/man5
+&lt;!--        --&gt;a ./opt/local/share/man/man8
+&lt;!--        --&gt;a ./opt/local/share/man/man8/logrotate.8.gz
+&lt;!--        --&gt;a ./opt/local/share/man/man5/logrotate.conf.5.gz
+&lt;!--        --&gt;a ./opt/local/share/logrotate/CHANGES
+&lt;!--        --&gt;a ./opt/local/share/logrotate/COPYING
+&lt;!--        --&gt;a ./opt/local/share/logrotate/logrotate.conf.example
+&lt;!--        --&gt;a ./opt/local/share/logrotate/org.macports.logrotate.plist.example
+&lt;!--        --&gt;a ./opt/local/sbin/logrotate
+&lt;!--        --&gt;a ./opt/local/etc/logrotate.d
+&lt;!--        --&gt;a ./opt/local/etc/logrotate.d/.turd_logrotate
+&lt;!--        --&gt;DEBUG: Archive logrotate-3.8.6_2+gzip.darwin_13.x86_64.tbz2 packaged&lt;/screen&gt;
</ins><span class="cx"> 
</span><del>-rsync_dir               release/base/&lt;/programlisting&gt;
-        &lt;/listitem&gt;
</del><ins>+            &lt;para&gt;Binary archive files are placed in &lt;filename&gt;${prefix}/var/macports/software/&lt;/filename&gt;. The archive
+                file type is set in the &lt;filename&gt;macports.conf&lt;/filename&gt; file using the
+                &lt;option&gt;portarchivetype&lt;/option&gt; key. The default format is &lt;option&gt;tbz2&lt;/option&gt;; other options are:
+                &lt;option&gt;tar&lt;/option&gt;, &lt;option&gt;tbz&lt;/option&gt;, &lt;option&gt;tbz2&lt;/option&gt;, &lt;option&gt;tgz&lt;/option&gt;,
+                &lt;option&gt;tlz&lt;/option&gt;, &lt;option&gt;txz&lt;/option&gt;, &lt;option&gt;xar&lt;/option&gt;, &lt;option&gt;zip&lt;/option&gt;,
+                &lt;option&gt;cpgz&lt;/option&gt;, and &lt;option&gt;cpio&lt;/option&gt;. Note that changing this setting will prevent MacPorts
+                from downloading and using pre-built binaries, so you should probably leave it as-is.&lt;/para&gt;
+        &lt;/section&gt;
</ins><span class="cx"> 
</span><del>-        &lt;listitem&gt;
-          &lt;para&gt;In &lt;filename&gt;sources.conf&lt;/filename&gt;, set the URL rsync:// to
-          the rsync replication server.&lt;/para&gt;
</del><ins>+        &lt;section id=&quot;using.binaries.binary-packages&quot;&gt;
+            &lt;title&gt;Binary Packages&lt;/title&gt;
</ins><span class="cx"> 
</span><del>-          &lt;programlisting&gt;rsync://rsync.mycompany.com/release/ports/&lt;/programlisting&gt;
-        &lt;/listitem&gt;
-      &lt;/orderedlist&gt;
</del><ins>+            &lt;para&gt;Binary packages are standalone binary installers that are precompiled; they do not require MacPorts on
+                the target system. As such, they are helpful in generating disk images or installers to be redistributed
+                to users without relying on MacPorts for installation. Binary installers created with MacPorts are
+                usually &lt;option&gt;.pkg&lt;/option&gt; (OS X Installer Packages). MacPorts can also convert
+                a &lt;option&gt;.pkg&lt;/option&gt; package into an OS X &lt;option&gt;.dmg&lt;/option&gt; disk image. You can create binary
+                packages with the &lt;command&gt;port&lt;/command&gt; command as shown in the following examples.&lt;/para&gt;
+
+            &lt;warning&gt;
+                &lt;para&gt;If you want to create installer packages using MacPorts for redistribution, make sure you do not
+                    use a standard installation of MacPorts in &lt;filename&gt;/opt/local&lt;/filename&gt;. If you do that, your
+                    installer package conflicts with MacPorts on systems that &lt;emphasis&gt;do&lt;/emphasis&gt; have MacPorts
+                    installed.&lt;/para&gt;
+
+                &lt;para&gt;Instead, follow &lt;xref linkend=&quot;installing.macports.source.multiple&quot;/&gt; and choose a prefix specific
+                    to the software you are trying to package, e.g., &lt;filename&gt;/opt/logrotate&lt;/filename&gt; for
+                    &lt;option&gt;logrotate&lt;/option&gt;. Then use this custom MacPorts installation to build your package.&lt;/para&gt;
+            &lt;/warning&gt;
+
+            &lt;para&gt;Create an OS X &lt;option&gt;.pkg&lt;/option&gt; installer for the &lt;option&gt;pstree&lt;/option&gt; port:&lt;/para&gt;
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port pkg pstree&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;para&gt;You may also create an OS X &lt;option&gt;.dmg&lt;/option&gt; disk image file instead:&lt;/para&gt;
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port dmg pstree&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;para&gt;In most cases you probably want to package a port and all its library and runtime dependencies in
+                a single package. You can use a metapackage to do this. Create one using:&lt;/para&gt;
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port mpkg gimp2&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;para&gt;Just as with a single package, a metapackage can also be wrapped in a &lt;option&gt;.dmg&lt;/option&gt;.&lt;/para&gt;
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;sudo port mdmg gimp2&lt;/userinput&gt;&lt;/programlisting&gt;
+
+            &lt;para&gt;All packages are placed in a port's work directory, which you can locate using:&lt;/para&gt;
+            &lt;programlisting&gt;&lt;prompt&gt;$ &lt;/prompt&gt;&lt;userinput&gt;port work &lt;varname&gt;&amp;lt;portname&amp;gt;&lt;/varname&gt;&lt;/userinput&gt;&lt;/programlisting&gt;
+        &lt;/section&gt;
</ins><span class="cx">     &lt;/section&gt;
</span><del>-  &lt;/section&gt;
---&gt;
</del><span class="cx"> &lt;/chapter&gt;
</span></span></pre>
</div>
</div>

</body>
</html>