Mid-Term Report

Shashwat Pandey devshashwatpandey at gmail.com
Thu Jun 26 12:29:32 PDT 2014


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.

# Implemented the API for putting up interactive questions.
# Added global flag '-N' for non-interactive invocations. Interactivity is
the default behaviour.
# Implemented interactive questions in four places.

You can find more details about the project here
<http://trac.macports.org/wiki/SummerOfCode2014_interactive>.
To check out the code, visit the repository here
<http://trac.macports.org/browser/branches/gsoc14-interactive>.

*Examples of interactivity:*
In case of ambiguous activate, the API presents the user with a list and
asks for the option they would like to activate.
$ sudo port activate dummy
Password:
The following versions of dummy are currently installed:
 1) dummy @111~rc1_0
 2) dummy @333~rc1_0
 3) dummy @999~rc1_0 (active)
Enter a number to select an option: 2
--->  Deactivating dummy @999~rc1_0
--->  Cleaning dummy
--->  Activating dummy @333~rc1_0


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.
$ sudo port uninstall dummy
Password:
The following versions of dummy are currently installed:
 1) dummy @111~rc1_0
 2) dummy @333~rc1_0 (active)
 3) dummy @999~rc1_0
Enter the numbers to select the options: 1 2
--->  Uninstalling dummy @111~rc1_0
--->  Deactivating dummy @333~rc1_0
--->  Cleaning dummy
--->  Uninstalling dummy @333~rc1_0


In case of rev-upgrade, the API presents all the ports that are broken and
asks the user if they wish to rebuild.
$ port rev-upgrade
--->  Scanning binaries for linking errors
--->  Found 1 broken file(s), matching files to ports
--->  Found 1 broken port(s), determining rebuild order
--->  Rebuilding in order
     less @458
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: less @458
Continue? [Y/n]: y
Warning: MacPorts running without privileges. You may be unable to complete
certain actions (e.g. install).
--->  Computing dependencies for less
--->  Cleaning less
Warning: Only cleaning in ~/.macports; insufficient privileges for standard
locations
--->  Scanning binaries for linking errors
--->  Found 1 broken file(s), matching files to ports
--->  Found 1 broken port(s), determining rebuild order
--->  Rebuilding in order
     less @458
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: less @458
Continue? [Y/n]: y
--->  Computing dependencies for less
--->  Fetching distfiles for less
--->  Attempting to fetch less-458.tar.gz from
http://mse.uk.distfiles.macports.org/sites/distfiles.macports.org/less
--->  Verifying checksums for
less
--->  Extracting less
--->  Configuring less
--->  Building less
--->  Staging less into destroot
--->  Deactivating less @458_0
--->  Cleaning less
--->  Uninstalling less @458_0
--->  Cleaning less
--->  Computing dependencies for less
--->  Installing less @458_0
--->  Activating less @458_0
--->  Cleaning less
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.


When installing a new port, the API displays all the dependencies of the
port being installed and asks the user before installing them.
$ sudo port install xfs
--->  Computing dependencies for xfs
The following dependencies will be installed:
 bzip2
 freetype
 libpng
 pkgconfig
 xorg-fontsproto
 xorg-libFS
 xorg-libXfont
 xorg-libfontenc
 xorg-util-macros
 xorg-xproto
 xorg-xtrans
 xz
 zlib
Continue? [Y/n]: n
--->  Scanning binaries for linking errors
--->  No broken files found.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20140626/6c2c54fa/attachment.html>


More information about the macports-dev mailing list