An update on 'port reclaim' and 'port doctor'

Ryan Schmidt ryandesign at macports.org
Mon Sep 1 15:07:59 PDT 2014


On Aug 29, 2014, at 1:39 PM, Kyle Sammons wrote:
> 
> I'm Kyle, and I was the one working on the GSoC project, "Project Clean Up Stuff", which is now finished. During the project I've added two new commands to port, "port reclaim" and "port doctor" (though we may be changing 'doctor' to something else in the near future), both of which are now merged into the trunk and should (hopefully) be fully operational. I plan on sticking around until I go back to school (September 20th), in order to fix some bugs that might be in my code, or to answers some questions people have about it. My plans passed that aren't too clear at the moment, but hopefully they allow me to still stick around. 

Thanks!

> Anyways, here's a description of the two new commands:
> 
> port reclaim - Removes all unneeded distfiles currently on the system, and offers to uninstall all inactive applications, if the user desires. 

Does it support the "-y" dry run flag, to just tell me what it would do but not actually do anything?


> port doctor - Checks for common issues on the users system, and if found, suggests ways to fix the problem. Doctor accepts one flag (--quiet) which only shows warnings/errors rather than showing the status of each check.  There is also a configuration file for doctor located in, "/opt/local/var/macports/port_doctor.ini", which allows the user to make changes to certain ways doctor operates, though currently the config file isn't used as much as it could be. 

Configuration files should totally be in ${prefix}/etc/macports. We have other files there already, and their names end in .conf; doctor should probably do that too. I'm assuming that the doctor conf file uses the same format as the existing MacPorts configuration files.


On Aug 29, 2014, at 2:02 PM, Frank Schima wrote:
> 
> 2. The default output is *way* too verbose. 
> Found distfile: ipython-2.1.0.tar.gz
> Removing distfile: ipython-2.1.0.tar.gz
> Found distfile: LightAquaBlue-framework-MacOS10.6.zip
> Removing distfile: LightAquaBlue-framework-MacOS10.6.zip
> Found distfile: LightAquaBlue-python-MacOS10.6.zip
> Removing distfile: LightAquaBlue-python-MacOS10.6.zip
> Found distfile: lightblue-0.4.tar.gz
> Removing distfile: lightblue-0.4.tar.gz
> Found empty directory: /opt/local/var/macports/distfiles/py-lightblue. Attempting to delete.
> Found distfile: qutip-3.0.1.tar.gz
>> 
> I think it should mention what it is doing in general at first because it will sit there working and then summarize in a manner such as "deleted X distfiles and Y empty directories” and maybe say how much space was saved?
> 
> The current output would be fine if using -v or -d. 

Maybe we could have a progress bar in non-verbose mode? MacPorts base has a progress bar facility now that can be used by various parts of base; already used for fetching and for rev-upgrade.



More information about the macports-dev mailing list