depends_run and activation

René J.V. Bertin rjvbertin at
Mon Mar 15 13:45:54 UTC 2021

On Monday March 15 2021 08:00:10 Ryan Schmidt wrote:
>On Mar 14, 2021, at 07:51, René J.V. Bertin wrote:
>> Supposing runtime dependencies are stored in the registry,
>Yes of course.
>> wouldn't it be possible and a good idea to give at least a warning if any are missing when you (re)activate a port?
>It shouldn't warn; it should install or activate any deps that are missing. It looks like MacPorts is trying to do that already, but there appears to be a bug:

Hmmm, then I don't understand why yesterday this didn't work for me. Trying now with (an older version of) paracode as in your example gives a similar result. In my case however:

>  sudo port activate paracode
--->  Computing dependencies for paracode
The following dependencies will be installed:  python38
Continue? [Y/n]: y
Error: Requested variants "+readline" do not match those the build was started with: "+optimizations+readline".
Error: Please use the same variants again, or run 'port clean python38' first to remove the existing partially completed build.
Error: See /opt/local/var/lnxports/logs/_opt_local_linux-ports_lang_python38/python38/main.log for details.
Warning: Failed to execute portfile from registry for paracode @2.7_0

I'm guessing an attempt would have been made to install python38+readline if I had not left the workdir around.

Is it possible that no attempt is made to activate the port if it is already installed? I think you could argue that `port activate` should only do an actual install if the dependency is not installed at all. Otherwise you could end up installing a too-new version.

PS: the port I tried this with yesterday is one of my own, a subport to which I added a runtime dependency on the main port and then reinstalled with `upgrade --force`. Maybe that somehow explains why it seems to ignore that new runtime dep?


More information about the macports-dev mailing list