passing variants to dependencies; pre-activate check

David Strubbe dstrubbe at macports.org
Sat Oct 10 20:33:02 PDT 2015


On Sat, Oct 10, 2015 at 10:34 PM, Joshua Root <jmr at macports.org> wrote:

> On 2015-10-11 11:34 , David Strubbe wrote:
> > 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'm confused about why this would be happening. Why
> > isn't "Computing dependencies for xcrysden" happening in both cases?
> >
> > (BWidget is installed)
> > $ sudo port -f uninstall tk xcrysden
> > $ sudo port install xcrysden +x11
> > --->  Computing dependencies for tk
> > --->  Fetching archive for tk
> > --->  Attempting to fetch tk-8.6.3_0+quartz.darwin_14.x86_64.tbz2 from
> > http://mse.uk.packages.macports.org/sites/packages.macports.org/tk
> > ...
> >
> > $ sudo port -f uninstall tk xcrysden BWidget
> > $ sudo port install xcrysden +x11
> > --->  Computing dependencies for xcrysden
> > --->  Dependencies to be installed: BWidget tk
> > --->  Fetching archive for tk
> > --->  Attempting to fetch tk-8.6.3_0+x11.darwin_14.x86_64.tbz2 from
> > http://mse.uk.packages.macports.org/sites/packages.macports.org/tk
> > ...
>
> It happens in both cases, you just stopped before it got there in the
> first case. Already-installed dependencies are upgraded before new
> dependencies are installed.
>

I did not stop anything; I just included only the important parts (hence
"..."). Yes it does say "Computing dependencies for xcrysden" eventually in
the first case, but why is it after have installed a dependency? Surely the
dependencies were computed at the beginning anyway to decide to install tk.

I think you are suggesting it is related to the fact that tk is a
dependency of BWidget. It's hard to understand why that would matter for
what variant got passed to tk.


>
> > Regarding the pre-activate, I added this code to my copy of
> > active_variants-1.1.tcl:
> >
> > +pre-activate {
> > +    ui_warn "checking active variants"
> > +    _check_require_active_variants archivefetch
> > +}
> >
> > When I do a fresh install, I see this message before activate. When I
> > deactivate and re-activate, I don'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't be written?
>
> Are you editing the portgroup after you install the port? Running a
> target on an already installed port uses the copy of the portgroup
> stored in the registry.
>

Before I installed the port. I am running "port install" in the directory
with the Portfile, then "port deactivate", then "port activate" (in each
case, not specifying a name). Does that still just use the registry
portgroup rather than the one in my dports tree?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20151010/880fcebb/attachment.html>


More information about the macports-dev mailing list