<div dir="ltr">Thanks for checking. I realize now I can find these two different behaviors, depending on whether the other dependency BWidget is installed or not. I&#39;m confused about why this would be happening. Why isn&#39;t &quot;Computing dependencies for xcrysden&quot; happening in both cases?<div><div><br></div><div>(BWidget is installed)</div><div>$ sudo port -f uninstall tk xcrysden<br></div><div>$ sudo port install xcrysden +x11<br></div><div>---&gt;  Computing dependencies for tk</div><div>---&gt;  Fetching archive for tk</div><div>---&gt;  Attempting to fetch tk-8.6.3_0+quartz.darwin_14.x86_64.tbz2 from <a href="http://mse.uk.packages.macports.org/sites/packages.macports.org/tk">http://mse.uk.packages.macports.org/sites/packages.macports.org/tk</a></div><div>...</div><div><br></div><div>$ sudo port -f uninstall tk xcrysden BWidget<br></div><div><div>$ sudo port install xcrysden +x11</div><div>---&gt;  Computing dependencies for xcrysden</div><div>---&gt;  Dependencies to be installed: BWidget tk</div><div>---&gt;  Fetching archive for tk</div><div>---&gt;  Attempting to fetch tk-8.6.3_0+x11.darwin_14.x86_64.tbz2 from <a href="http://mse.uk.packages.macports.org/sites/packages.macports.org/tk">http://mse.uk.packages.macports.org/sites/packages.macports.org/tk</a> </div><div>...</div><div><br></div><div><br></div></div><div>Regarding the pre-activate, I added this code to my copy of active_variants-1.1.tcl:</div></div><div><br></div><div><div>+pre-activate {</div><div>+    ui_warn &quot;checking active variants&quot;</div><div>+    _check_require_active_variants archivefetch</div><div>+}</div></div><div><br></div><div>When I do a fresh install, I see this message before activate. When I deactivate and re-activate, I don&#39;t see the message. My conclusion was that pre-activate was not being run in the latter case -- is there some other reason it wouldn&#39;t be written?</div><div><br></div><div>David</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 10, 2015 at 7:06 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-11 09:33 , David Strubbe wrote:<br>
&gt; Hi all,<br>
&gt;<br>
&gt; It seems to me that as of recently it was the case that variants from<br>
&gt; the install command line are passed on to the building of dependencies<br>
&gt; (as discussed below last year), but that it is no longer happening. Is<br>
&gt; this something that was changed (deliberately or otherwise) in the 2.3.4<br>
&gt; release?<br>
&gt;<br>
&gt; Specifically, my recently added xcrysden port needs tk +x11 (checked via<br>
&gt; active_variants), whereas the default is +quartz. As of a couple of<br>
&gt; weeks ago, I think I was able successfully to trigger installation of tk<br>
&gt; +x11 when it was not installed by doing &#39;port install xcrysden +x11&#39;.<br>
&gt; But now this doesn&#39;t happen.<br>
<br>
</span>I just checked and this still works the same as it has for many years.<br>
<span class=""><br>
&gt; Another question related to active_variants: would it be possible for<br>
&gt; require_active_variants to perform its check not just in the<br>
&gt; pre-configure phase as is currently the case, but also in the activate<br>
&gt; phase? Currently, you could install xcrysden when tk +x11 was active,<br>
&gt; then deactivate xcrysden, install tk +quartz, and re-activate xcrysden.<br>
&gt; It would no longer work. It would be good if we could write an error at<br>
&gt; this point. I tried adding code to pre-activate to accomplish this, but<br>
&gt; I found it was only called when doing a fresh install, not when<br>
&gt; activating a deactivated port. Is there a way to get some code to run<br>
&gt; when activating a deactivated port?<br>
<br>
</span>Preventing the activation would not be helpful I think, especially if<br>
the user is running something like &#39;port activate xcrysden tk +x11&#39;.<br>
Printing a warning would be fine.<br>
<br>
I just checked the pre-activate behaviour as well and it still runs<br>
before every activation as intended. The only reason it wouldn&#39;t run is<br>
if the Portfile was missing from the registry or failed to parse.<br>
<br>
- Josh<br>
</blockquote></div><br></div>