registry with multiple portfiles

Joshua Root jmr at macports.org
Tue Jul 11 21:35:46 UTC 2017


On 2017-7-12 07:24 , db wrote:
> On 11 Jul 2017, at 18:40, db <iamsudo at gmail.com> wrote:
>> While writing the portfile for py-ipaddr in vim I saved it and stopped the process, then installed/uninstalled the port and made some corrections in the portfile, repeat.
> 
> I tried this with another port while monitoring its registry folder and it creates a new portfile. Port install logs
> 
> Portfile changed since last build; discarding previous state.

This message means that the hash of the Portfile in the ports tree does 
not match the hash stored in the statefile in the work directory. The 
"discarding previous state" means deleting the work directory. None of 
this should have any effect on the registry, as the Portfile is only 
added to the registry in the install phase, and should be removed in the 
uninstall phase.

> Should I leave the old portfiles where they are? Is there any way to clean the registry portfile tree?

The attached script will find any Portfiles that are not referenced by 
any installed port, and are thus safe to delete. It uses the same check 
that is done during uninstall so I'm still not sure how they are getting 
left behind.

- Josh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: find_unreferenced_portfiles.tcl
Type: application/x-tcl
Size: 329 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20170712/9a39ce54/attachment.tcl>


More information about the macports-dev mailing list