Kyle Sammons is a Google Sumer of Code 2014 (GSoC 2014) participant from the University of Oregon, who's currently working on his GSoC 2014 project, Project Clean-up Stuff. You can find his personal GitHub here, where he puts the latest updates for his GSoC 2014 project.
Kyle is currently a Freshman at the University of Oregon, with the aim of graduating with a Bachelors of Computer Science with an Applied Mathematics minor in 2016. He's an experienced in the C, D, and Python programming languages, though he's dabbled in plenty others over the years (Java/PHP/NASM/Haskell/VB.NET). He frequently enjoys hiking and backpacking in the Pacific-Northwest, and reading up on programming language development.
IRC nick - centip3de
Email - ksammons@…
Google Summer of Code 2014
Project Clean-up Stuff
Kyle's project for the Google Summer of Code 2014 (GSoC 2014) is titled, "Project Clean-up Stuff". The project itself involves improving the current 'port clean' command to be more efficient in cleaning out dist files, as well as adding the ability to delete dist files from a certain version, or those that are no longer in use. The other half of the project involves adding in the ability to detect common issues in the MacPorts environment, similar to how Homebrew's 'brew doctor' works.
The full text of "Project Clean-up Stuff" submission:
The plans for this project are to combine the ideas of "Reclaim Disk Space" and "Configuration and Environment Selftest". While these are clearly two different projects, their similar theme and seeming ease of completion gave me the thought of combining them into one larger project. This means I'd be adding a "brew doctor"-esque command which will look for common issues such as a port that is known to cause issues, multiple versions of the same library, not having the correct dependency installed, or any other common issue and then report all found to the user. It also means I would also be improving the already implemented "port clean" command to be able to delete and clear out more disk space than it currently is able to by deleting distribution files from a certain version of an application, removing distribution files currently not needed/in use, deleting/uninstalling ports that are no longer in use, or any other way possible.
- Started working (4/28/2014)
Weekly updates for "Project Clean-up Stuff":
Week (4/28/2014 - 5/2/2014)
- Created GitHub repo
- Created Wiki on self
- Added project to GSoC 2014 project page
- Got unit tests up and running
- Removed redundant code in portclean
- Added code to get all applications that are no longer active.
Week (5/5/2014 - 5/10/2014):
- Added a utility to function to test for inactivity in an application
- Added code to uninstall inactive ports automatically
- Added docstrings to all the code I added
- Changed ‘get_info’ to now return a multidimensional array, instead of some hacked-together regex
- Found the list of issues to test for and implement! ProblemHotlist
- Fixed copyright year in portclean
- Removed functions only used locally from the namespace
Week (5/12/2014 - 5/16/2014):
- Fixed a large bug where after running the code, port install would no longer work.
Week (5/19/2014 - 5/23/2014):
- Set up SVN branch
- Removed unnecessary function arguments
- Created new files to contain code in macports1.0/cleanup.tcl
- Registered new command, “port cleanup” in port.tcl!
- Moved over code/documentation to new file
- Cleaned up left over code from portclean.tcl
- Setup pkgIndex in macports1.0 to allow importing into port.tcl
Week (5/27/2014 - 5/30/2014):
- Changed command to ‘port reclaim’, rather than ‘port cleanup’
- Added functions to walk through all distfiles and delete them upon request
- Added docstrings to all functions
- Removed unneeded imports
- Added these weekly updates to the wiki
- Added code to only delete distfiles that are not needed by currently installed ports.
Week (6/02/2014 - 6/06/2014):
- Added all functions in ‘reclaim’ to the reclaim namespace
- Added the ability to differentiate on full file path names
- Fixed a bug that wouldn’t delete unused distfiles if they had the same name as a used distfile
Week (6/09/2014 - 6/13/2014):
- Finals week! Took the week off.
Week (6/16/2014 - 6/20/2014):
- Removed no longer needed test option (port clean —gsoc14)
- Removed the calls to reclaim from port into macports, adding a further layer of abstraction.
- Removed old files no longer needed
- Added calls to ui_msg, rather than puts
- Removed get_info’s code, and replaced it with a simple call to registry::installed
- Added code to show the inactive apps to be uninstalled, and confirm with the user they would like to uninstall them.
- Changed the namespace appearance
- Added skeleton code for ‘port doctor’ command
- Added the ability to delete empty directories (including entire empty directory trees)
- Added partial regression testing
- Added the ability to warn (annoy) users if they haven’t run ‘port reclaim’ in two weeks.
- Updated these achievements for previous weeks
- Updated Makefile and Makefile.in to install reclaim.tcl and doctor.tcl respectively.
- Fixed a major bug that would delete your entire root folder.
- Added test cases for reclaim.tcl
- Added a check to see if the application that’s about to be uninstalled is depended on by anything else. If it is, the user is prompted and warned accordingly.
- Added a copyright notice to reclaim.tcl, and removed some useless structure comments
- Fixed a bug when calling check_last_reclaim in mportinit
- Added error handling in key areas
- Added ui_debug statements in key areas
Week (6/23/2014 - 6/27/2014):
- Added a check for having /opt/local/bin/port in your $PATH environmental variable
- Added automatic generation for the user config
- Added a parser for said user config
- Added user input on fixing the $PATH variable, and supporting differing locations through the user config
Week (6/30/2014 - 7/4/2014):
- Fixed a bug that wouldn’t use the correct $PATH variable
- Added a check for Xcode versions
- Added Xcode version checks to the user config
- Vastly simplified and abstracted the config parser
- Added a new config file solely for Xcode versioning
- Celebrated the 3rd of July - 5th of July with family!
Week (7/7/2014 - 7/11/2014):
- Added a check for curl existing
- Added a check for rsync existing
- Added docstrings to all functions
Week (7/14/2014 - 7/18/2014):
- Moved Xcode config file to under _resources
- Added a check for low disk space
- Added support for comments in the parser
- Added a check for X11.app existing if the OS version is 10.6
- Added a check for files in /usr/local/include and /usr/local/lib
- Removed faulty shell reloading, and replaced it with asking the user to manually reload their shell profile
- Added a check to see if all files installed by all ports actually exist
- Added a check to see if the archives of all ports actually exist
- Added a check to see if port doctor and port reclaim are executing with super user privileges
Week (7/21/2014 - 7/26/2014):
- Added check for other package managers being installed
- Added more in-depth checks for dylibs in and headers in /usr/local
- Added a check for an Xcode script being run or not
- Added a check for compilation error, ‘couldn’t create cache’
- Fixed the error message for “check_compilation_error_cache”
- Added check to see if /opt/local/bin/port is the first in the $PATH
- Fixed small bug in check_port_files
- Added check to see if all installed files are readable
- Added checks for openssl and sqlite3 being installed
- Fixed bug in compilation check
- Added docstrings
- Prettified the output
- Added support for .la and .prl files in /usr/local/lib
Week (7/28/2014 - 8/01/2014):
- Added check for DYLD_* environmental variables
- Added the quiet mode option for doctor
- Added checking for Xcode Command Line Tools
- Went to sister’s wedding! (Congrats!)
Week (8/04/2014 - 8/08/2014):
- Added error catching for having no installed locations
- Added the shebang back to port.tcl
- Added the copyright notice to doctor.tcl
Week (8/11/2014 - 8/15/2014):
- Removed unnecessary files from Svn branch
- Updated Svn branch with new version of MacPorts
- Merged code with Svn branch
- Added ‘port doctor’ man page
- Added ‘port reclaim’ man page
Known issues for "Project Clean-up Stuff":
- None known so far.