<div dir="ltr">Would something like this be a good idea to prevent multiple definition? This could potentially be an issue with other nested portgroups too.<div><br></div><div><div>Index: dports/_resources/port1.0/group/active_variants-1.1.tcl</div><div>===================================================================</div><div>--- dports/_resources/port1.0/group/active_variants-1.1.tcl (revision 141271)</div><div>+++ dports/_resources/port1.0/group/active_variants-1.1.tcl (working copy)</div><div>@@ -87,6 +87,12 @@</div><div> # dependencies, e.g., require_active_variants path:foo/bar:standardport</div><div> # variant</div><div> </div><div>+default active_variants_included {}</div><div>+</div><div>+# only include this PortGroup once</div><div>+if {${active_variants_included} == ""} {</div><div>+ set active_variants_included "yes"</div><div>+</div><div> proc active_variants {depspec required {forbidden {}}} {</div><div> # get the port which will provide $depspec; this allows us to support e.g.,</div><div> # path-style dependencies. This comes from port1.0/portutil.tcl and should</div><div>@@ -278,3 +284,5 @@</div><div> pre-activate {</div><div> _check_require_active_variants activate</div><div> }</div><div>+</div><div>+}</div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 13, 2015 at 10:35 PM, Joshua Root <span dir="ltr"><<a href="mailto:jmr@macports.org" target="_blank">jmr@macports.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 2015-10-14 13:04 , David Strubbe wrote:<br>
> > - Why is pre-activate code executed twice?<br>
><br>
> It isn't, two pre-activate procedures have been registered and they are<br>
> each executed once.<br>
><br>
><br>
> Well, I only put one block of code in active variants, as below. Why<br>
> does it end up in two different pre-activate procedures?<br>
><br>
> active_variants-1.1.tcl:<br>
>><br>
>> +pre-activate {<br>
>> + ui_warn "checking active variants"<br>
>> + _check_require_active_variants archivefetch<br>
>> +}<br>
<br>
</span>Looking at the portfile, it uses the compilers portgroup as well as<br>
active_variants. Looking at compilers, it uses active_variants itself.<br>
So active_variants is included twice.<br>
<br>
- Josh<br>
</blockquote></div><br></div>