PortGroup versions (was: Re: Active version error)

Ryan Schmidt ryandesign at macports.org
Wed Aug 24 14:29:38 PDT 2011


On Aug 24, 2011, at 16:18, Rainer Müller wrote:
> On 2011-08-24 21:22 , Ryan Schmidt wrote:
>> On Aug 21, 2011, at 21:16, Arno Hautala wrote:
>>> It's a bug in the Perl 5 PortGroup.
>> 
>> At this time, it is being considered a *behavior* of the perl5 portgroup, which users should ignore; it is harmless, if annoying.
> 
> At least we have now learned that introducing major changes to a port
> group should result in an increment of the version number.

You mean the portgroup version? That might be a good idea. The situation is summarized here:

https://trac.macports.org/ticket/30833#comment:7


> Another solution would be to expand PortGroup statements at the time of
> installation of a Portfile while saving it to the registry. But it would
> prevent us from fixing bugs or changing behavior of the port group after
> a port is installed.

Expanding portgroup statements into the portfile might help with this specific situation but I don't think it's a general fix. What about post-activate or post-deactivate blocks in the portgroup -- would you propose those be somehow copied into the portfile?

The solution I was thinking of was to just store the entire unmodified portgroup file(s) in the registry along with the portfile that we already store there. We would end up storing tons of duplicate copies of the portgroups; oh well. Alternately we could store each version of each portgroup only once, in a new portgroups table, and link those up to each installed port entry.


> Also I noticed now that this handling of port groups is most probably
> broken when using multiple sources. When executing the activate/deactive
> phase from the registry it would always load the port group from the
> default source and not from the source the Portfile actually came from.

Yes, I noticed that too recently, while trying to create a new private portgroup in my local port repository. As I recall, the post-activate block ran properly on initial install, but not on subsequent re-activations, and the post-deactivate never ran. I would appreciate a fix for this issue.




More information about the macports-dev mailing list