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

Arno Hautala arno at alum.wpi.edu
Tue Jul 22 09:51:29 PDT 2014


On Tue, Jul 22, 2014 at 2:28 AM, Joshua Root <jmr at macports.org> wrote:
> On 2014-7-22 10:08 , Adam Dershowitz wrote:
>>
>> Checking for files that should not be in macports directory, that end up being there.  They could be left either by an old install, or by a different installer that inappropriately put them in the directory (there was some recent discussion of an installer for an application that was built using macports then shipped with an installer so the installer would just put stuff there).  Perhaps this could be done by looking at all the files in /opt/local and comparing with all the port contents?  Any extras are an error.
>
> Unfortunately this is not quite that easy, as there will be various
> config files, data files, cache files and so on that are not registered
> to a port. Probably restricting it to mach-o files would avoid false
> positives, but would unavoidably introduce false negatives. We simply
> don't have the information needed to do what you'd really want here.

Even given the false positives, I still think this would be a valuable
tool. For one it could be used to make an additional list of files
that are installed / used by a port. A future enhancement could track
optional files. In other words you'd have the current list of files
installed by a port ("contents"), but also a list of files that are
associated with a port, but not initially installed (cache files, user
config, etc.).

I recently had a case where a kernel panic occurred while upgrading
ports [1]. Upon reboot, my registry was damaged. I restored the
database from a backup, but now I had several ports that were
installed, but not listed in the registry. I was able to force install
the newer versions and everything looks good.

A tool that listed all the unknown files would have helped identify
the ports that had been upgraded, but weren't in the registry.
Repeating the upgrades worked too, but it would have been nice to be
able to investigate first, without needing to write my own script
(which I did anyway).

[1]: https://www.mail-archive.com/macports-users@lists.macosforge.org/msg34966.html

-- 
arno  s  hautala    /-|   arno at alum.wpi.edu

pgp b2c9d448


More information about the macports-dev mailing list