<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><div>I am a Google Summer of Code 2014 student working on the &#39;Interactive Port Command&#39; project for Macports. I have been working for about a month now and would like to show the progress i have made.<br>

<br># Implemented the API for putting up interactive questions.<br></div><div># Added global flag &#39;-N&#39; for non-interactive invocations. Interactivity is the default behaviour.<br></div><div># Implemented interactive questions in four places.<br>
<br></div><div>You can find more details about the project <a href="http://trac.macports.org/wiki/SummerOfCode2014_interactive">here</a>.<br></div><div>To check out the code, visit the repository <a href="http://trac.macports.org/browser/branches/gsoc14-interactive">here</a>.<br>
</div><div><br><b>Examples of interactivity:</b><br>In case of ambiguous activate, the API presents the user with a list and asks for the option they would like to activate.<br>
$ sudo port activate dummy<br>Password:<br>The following versions of dummy are currently installed:<br> 1) dummy @111~rc1_0<br> 2) dummy @333~rc1_0<br> 3) dummy @999~rc1_0 (active)<br>Enter a number to select an option: 2<br>

---&gt;  Deactivating dummy @999~rc1_0<br>---&gt;  Cleaning dummy<br>---&gt;  Activating dummy @333~rc1_0<br><br><br></div>In case of ambiguous uninstall, the API again presents a list but this time asks the user to enter all the options they would like to select.<br>

$ sudo port uninstall dummy<br>Password:<br>The following versions of dummy are currently installed:<br> 1) dummy @111~rc1_0<br> 2) dummy @333~rc1_0 (active)<br> 3) dummy @999~rc1_0<br>Enter the numbers to select the options: 1 2<br>

---&gt;  Uninstalling dummy @111~rc1_0<br>---&gt;  Deactivating dummy @333~rc1_0<br>---&gt;  Cleaning dummy<br>---&gt;  Uninstalling dummy @333~rc1_0<br><br><br></div>In case of rev-upgrade, the API presents all the ports that are broken and asks the user if they wish to rebuild.<br>

$ port rev-upgrade<br>---&gt;  Scanning binaries for linking errors<br>---&gt;  Found 1 broken file(s), matching files to ports<br>---&gt;  Found 1 broken port(s), determining rebuild order<br>---&gt;  Rebuilding in order<br>

     less @458 <br>You can always run &#39;port rev-upgrade&#39; again to fix errors.<br>The following ports will be rebuilt: less @458<br>Continue? [Y/n]: y   <br>Warning: MacPorts running without privileges. You may be unable to complete certain actions (e.g. install).<br>

---&gt;  Computing dependencies for less<br>---&gt;  Cleaning less<br>Warning: Only cleaning in ~/.macports; insufficient privileges for standard locations<br>---&gt;  Scanning binaries for linking errors<br>---&gt;  Found 1 broken file(s), matching files to ports<br>

---&gt;  Found 1 broken port(s), determining rebuild order<br>---&gt;  Rebuilding in order<br>     less @458 <br>You can always run &#39;port rev-upgrade&#39; again to fix errors.<br>The following ports will be rebuilt: less @458<br>

Continue? [Y/n]: y<br>---&gt;  Computing dependencies for less<br>---&gt;  Fetching distfiles for less<br>---&gt;  Attempting to fetch less-458.tar.gz from <a href="http://mse.uk.distfiles.macports.org/sites/distfiles.macports.org/less" target="_blank">http://mse.uk.distfiles.macports.org/sites/distfiles.macports.org/less</a><br>

---&gt;  Verifying checksums for less                                                   <br>---&gt;  Extracting less<br>---&gt;  Configuring less<br>---&gt;  Building less<br>---&gt;  Staging less into destroot<br>---&gt;  Deactivating less @458_0<br>

---&gt;  Cleaning less<br>---&gt;  Uninstalling less @458_0<br>---&gt;  Cleaning less<br>---&gt;  Computing dependencies for less<br>---&gt;  Installing less @458_0<br>---&gt;  Activating less @458_0<br>---&gt;  Cleaning less<br>

---&gt;  Updating database of binaries<br>---&gt;  Scanning binaries for linking errors<br>---&gt;  No broken files found.<br><br><br><div>When installing a new port, the API displays all the dependencies of the port being installed and asks the user before installing them.<br>

$ sudo port install xfs<br>---&gt;  Computing dependencies for xfs<br>The following dependencies will be installed: <br> bzip2<br> freetype<br> libpng<br> pkgconfig<br> xorg-fontsproto<br> xorg-libFS<br> xorg-libXfont<br>

 xorg-libfontenc<br> xorg-util-macros<br> xorg-xproto<br> xorg-xtrans<br> xz<br> zlib<br>Continue? [Y/n]: n<br>---&gt;  Scanning binaries for linking errors<br>---&gt;  No broken files found.<br></div><div><div><span></span><span></span><br>

</div></div></div>
</div><br></div>