What would YOU like to see 'port doctor' do?

Joshua Root jmr at macports.org
Mon Jul 21 23:47:29 PDT 2014


On 2014-7-22 07:33 , Kyle Sammons wrote:
> Hey everyone,
> 
> I've been working on a command, "port doctor" that checks for common
> issues in the user's environment. I've implemented just about everything
> I, Michael D, Snc, and Neverpanic can think of, so I was wondering if
> you guys had anything else you'd like to see check by doctor. Currently,
> doctor checks for:
> 
> - Errors in $PATH
> - Incorrect Xcode version
> - Curl and Rsync being installed

If you're going to check these, you might as well check for sqlite and
openssl too. We also need the system's tclsh for building from source,
which includes selfupdate.

> - MacPorts residing in the correct location (/opt/local)

I assume you're using the $prefix variable here, not hardcoding
/opt/local. :)

> - Amount of disk space remaining
> - X11.app being installed on OS X 10.6
> - Dylibs in /usr/local/lib
> - Header files in /usr/local/include
> - All archives from installed ports being on disk
> - All files installed by ports being on disk

Make sure you're distinguishing between not present and not readable
here, as some ports deliberately install directories that are not world
readable.

> - Fink being installed
> - Homebrew being installed
> - Compilation error, "couldn't create cache file"
> - The script /Developer/Library/uninstall-developer-folder not being run.
> 
> If you guys can think of anything else that should be implemented, I'd
> be more than happy to do it! 

This command would probably be a good place to do a more exhaustive
check for the presence and completeness of the Command Line Tools
(compared to the one we do at runtime).

There are some more unusual ways that people manage to break their
systems, like replacing executables (sed, tar, etc...) in /usr/bin with
incompatible versions (or just deleting them). I'm not sure if you want
to go down that rabbit hole, but if you can find a general way of
checking that won't break when OS updates change the files, that'd be great.

- Josh


More information about the macports-dev mailing list