<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} == &quot;&quot;} {</div><div>+    set active_variants_included &quot;yes&quot;</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">&lt;<a href="mailto:jmr@macports.org" target="_blank">jmr@macports.org</a>&gt;</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>
&gt;     &gt; - Why is pre-activate code executed twice?<br>
&gt;<br>
&gt;     It isn&#39;t, two pre-activate procedures have been registered and they are<br>
&gt;     each executed once.<br>
&gt;<br>
&gt;<br>
&gt; Well, I only put one block of code in active variants, as below. Why<br>
&gt; does it end up in two different pre-activate procedures?<br>
&gt;<br>
&gt; active_variants-1.1.tcl:<br>
&gt;&gt;<br>
&gt;&gt; +pre-activate {<br>
&gt;&gt; +    ui_warn &quot;checking active variants&quot;<br>
&gt;&gt; +    _check_require_active_variants archivefetch<br>
&gt;&gt; +}<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>