[GSoC] migration
Joshua Root
jmr at macports.org
Thu Jul 13 15:34:21 UTC 2017
On 2017-7-13 22:49 , Arno Hautala wrote:
> On Wed, Jul 12, 2017 at 8:07 PM, Joshua Root <jmr at macports.org> wrote:
>> On 2017-7-13 08:10 , Umesh Singla wrote:
>>>
>>> 3. ensuring that active versions are installed after the inactive
>>> versions
>>
>> The install action of port(1) does execute the activate target, however your
>> code could run only the install target for ports that were not active. That
>> is what restore_ports.tcl does.
>
> Wouldn't it still be possible to end up in the wrong state due to
> dependencies? Imagine that port A+huge depends on port B+huge, while
> A+tiny depends on B+tiny. +huge is inactive, +tiny is active.
> This is also all predicated on the idea that MacPorts handles
> dependent variants. I forget what the current state is there.
Depending on a variant is currently impossible.
> Installing A+huge would install and activate A+huge and B+huge.
> Installing, but not activating A+tiny, would first require installing
> and activating B+tiny.
>
> Certainly this could be resolved by installing and not activating the
> port and everything in the dependency tree. I haven't examined
> restore_ports to see what it does with dependencies.
>
> Another method would be to install and deactivate all the inactive
> ports first. Or even just default to not installing anything that's
> inactive and providing an option to install those as well (or
> presenting a list to pick from). That's perhaps getting a bit too
> extensive at this point.
You do have to install the ports in dependency order to get it right,
and that is what restore_ports does. There may be cases where previously
inactive ports don't build due to requiring a specific variant in a
dependency that was also inactive. (Which is equivalent to "you can't
depend on a variant".)
- Josh
More information about the macports-dev
mailing list