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

Kyle Sammons ksammons at macports.org
Sun Aug 31 15:18:23 PDT 2014


Hey Frank,

1. First, it found an inactive port, but the default action is not clear.


Ah, good catch! I completely forgot that people might insert things besides
a Y or an N. I'll make sure to clear that up!

 2. The default output is *way* too verbose.


Hm, yeah, that's a good point and should be a simple change to make as well.

 3. It hit an error on mine:


Right, yeah, that's because currently the code uses recursion to go through
all the distfiles and delete them all. Which means if you have a lot of
distfiles to delete and sort through, you'll get a stack overflow (i.e. the
error you got). It's a known bug right now, and I'm trying to think up a
way to still explore multi-layer directories without the use of recursion.
On the plus side, doesn't necessarily mean anything went wrong, and you
shouldn't get it on subsequent runs (unless you have A LOT of distfiles, I
suppose).

Thanks for all the suggestions/bug catches!
-Kyle


On Fri, Aug 29, 2014 at 12:02 PM, Frank Schima <mf2k at macports.org> wrote:

> Hi Kyle,
>
>
> Thanks for working on this! I have some comments below:
>
> On Aug 29, 2014, at 12:39 PM, Kyle Sammons <ksammons at macports.org> wrote:
>
> port reclaim - Removes all unneeded distfiles currently on the system, and
> offers to uninstall all inactive applications, if the user desires.
>
>
> I tried to use this for the first time today. Here are my observations:
>
> 1. First, it found an inactive port, but the default action is not clear.
>
> $ sudo port reclaim
> Found inactive ports: telepathy-glib.
> Would you like to uninstall these apps? [Y/N]:
>
> This is good but it is not clear what the default action is if you hit
> return. It is apparently “N”, so the “Y” should be lower case. i.e. [y/N]
>
> 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.
>
> 3. It hit an error on mine:
> ...
> Found empty directory: /Users/schimaf/.cpan/build/Moose-2.1210-ZIZYEB/bin.
> Attempting to delete.
> Found distfile: Changes
> Removing distfile: Changes
> Found distfile: Changes.Class-MOP
> Removing distfile: Changes.Class-MOP
> Found distfile: dist.ini
> Removing distfile: dist.ini
> Found distfile: moosex-compile
> Removing distfile: moosex-compile
> too many nested evaluations (infinite loop?)
>     (procedure "ui_message" line 2)
>     invoked from within
> "ui_msg "Found distfile: $item""
>     (procedure "walk_files" line 45)
>     invoked from within
> "walk_files $currentPath $delete $dist_paths"
>     (procedure "walk_files" line 37)
>     invoked from within
> "walk_files $up_dir $delete $dist_paths"
>     (procedure "walk_files" line 27)
>     invoked from within
> "walk_files $dir $delete $dist_paths"
>     (procedure "walk_files" line 60)
>     invoked from within
> "walk_files $currentPath $delete $dist_paths"
>     (procedure "walk_files" line 37)
>     invoked from within
> "walk_files $up_dir $delete $dist_paths"
>     (procedure "walk_files" line 27)
>     invoked from within
> "walk_files $dir $delete $dist_paths"
>     (procedure "walk_files" line 60)
>     invoked from within
> "walk_files $currentPath $delete $dist_paths"
>     (procedure "walk_files" line 37)
> ...
>
> 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.
>
>
> I like “diagnose” out of the suggestions offered.
>
>
> Cheers!
> Frank
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20140831/5651e4c3/attachment-0001.html>


More information about the macports-dev mailing list