<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><div>I am a Google Summer of Code 2014 student working on the 'Interactive Port Command' 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 '-N' 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>
---> Deactivating dummy @999~rc1_0<br>---> Cleaning dummy<br>---> 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>
---> Uninstalling dummy @111~rc1_0<br>---> Deactivating dummy @333~rc1_0<br>---> Cleaning dummy<br>---> 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>---> Scanning binaries for linking errors<br>---> Found 1 broken file(s), matching files to ports<br>---> Found 1 broken port(s), determining rebuild order<br>---> Rebuilding in order<br>
less @458 <br>You can always run 'port rev-upgrade' 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>
---> Computing dependencies for less<br>---> Cleaning less<br>Warning: Only cleaning in ~/.macports; insufficient privileges for standard locations<br>---> Scanning binaries for linking errors<br>---> Found 1 broken file(s), matching files to ports<br>
---> Found 1 broken port(s), determining rebuild order<br>---> Rebuilding in order<br> less @458 <br>You can always run 'port rev-upgrade' again to fix errors.<br>The following ports will be rebuilt: less @458<br>
Continue? [Y/n]: y<br>---> Computing dependencies for less<br>---> Fetching distfiles for less<br>---> 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>
---> Verifying checksums for less <br>---> Extracting less<br>---> Configuring less<br>---> Building less<br>---> Staging less into destroot<br>---> Deactivating less @458_0<br>
---> Cleaning less<br>---> Uninstalling less @458_0<br>---> Cleaning less<br>---> Computing dependencies for less<br>---> Installing less @458_0<br>---> Activating less @458_0<br>---> Cleaning less<br>
---> Updating database of binaries<br>---> Scanning binaries for linking errors<br>---> 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>---> 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>---> Scanning binaries for linking errors<br>---> No broken files found.<br></div><div><div><span></span><span></span><br>
</div></div></div>
</div><br></div>