Including port groups multiple times (was: Re: passing variants to dependencies; pre-activate check)

Rainer Müller raimue at macports.org
Wed Oct 14 06:19:41 PDT 2015


On 2015-10-14 05:49, Ryan Schmidt wrote:
> You're right, it's probably important for portgroup to guard against multiple inclusion.
> 
> https://en.wikipedia.org/wiki/Include_guard
> 
> "port lint" will warn you if you include a portgroup more than once, but that won't check portgroup inclusion in files other than the portfile itself, can give false positives for portgroups that are included in conditionals (including subports), and even ignores lines with leading whitespace.
> 
> We should develop a standard include guard for portgroups (possibly the one you suggested) and use it in every portgroup.

If we decide that there is no use case for including a port group
multiple times, we could prevent this in base when evaluating PortGroup
statements.

Rainer


More information about the macports-dev mailing list