registry with multiple portfiles

Joshua Root jmr at macports.org
Tue Jul 11 17:21:52 UTC 2017


On 2017-7-12 02:40 , db wrote:
> On 11 Jul 2017, at 16:16, Joshua Root <jmr at macports.org> wrote:
>> How do the files differ? Is one not referenced in the registry database?
> 
> port cat shows the right file.

port cat always uses the copy in the ports tree. That might be the same 
as one or neither of the copies in the registry.

> I think I might explain this case — but not others. 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. Does it sound plausible?

Sure. I don't think we have code to roll back the copying of the 
Portfile to the registry directory if we get interrupted by a signal 
mid-install.

> But other non-installed ports also show more than one file
> 
> $ tree /opt/local/var/macports/registry/portfiles/bison-3.0.4_*
> /opt/local/var/macports/registry/portfiles/bison-3.0.4_1
> ├── e93220c1e552b45d87e79b3a8844d01e4654ddc219eb7f845e030296ab326516-2427
> │   └── Portfile
> └── f483d3ba6033e5e570bcbd8eed06d3ec2a7d8526c74c46d6c1e081651cb07f1c-3227
>      └── Portfile
> /opt/local/var/macports/registry/portfiles/bison-3.0.4_2
> └── a7da10d6954a883bc3a799e1ec1ac3064475957d2228aba4b70f1d6b9b77a69a-3242
>      └── Portfile
> 
> 3 directories, 3 files

Hard to say how right or wrong this is without also seeing what 'port 
installed bison' reports, but in general these files are supposed to be 
deleted when the last port that references them is uninstalled.

- Josh


More information about the macports-dev mailing list