<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
<style>
div.plaintext { white-space: normal; }
body { font-family: sans-serif; }
blockquote.embedded,div.plaintext blockquote { margin: 0 0 5px; padding-left: 5px; border-left: 2px solid #777777; color: #777777; }
blockquote.embedded blockquote.embedded,div.plaintext blockquote blockquote { border-left-color: #999999; color: #999999; }
blockquote.embedded blockquote.embedded blockquote.embedded,div.plaintext blockquote blockquote blockquote { border-left-color: #BBBBBB; color: #BBBBBB; }
blockquote.embedded,div.plaintext blockquote a { color: #777777; }
blockquote.embedded blockquote.embedded,div.plaintext blockquote blockquote a { color: #999999; }
blockquote.embedded blockquote.embedded blockquote.embedded,div.plaintext blockquote blockquote blockquote a { color: #BBBBBB; }
div.plaintext math[display="inline"] > mrow { padding:5px; }
div.plaintext div.footnotes li p { margin: 0.2em 0; }
div.plaintext .task-list-item { list-style-type: none; }
</style>
</head>
<body><div class="plaintext"><p dir="auto">On 2024-09-09 at 10:20:32 UTC-0400 (Mon, 9 Sep 2024 16:20:32 +0200)
<br />
Bernard via macports-users <bernard.remacle@icloud.com>
<br />
is rumored to have said:</p>
<p dir="auto">[...]</p>
<blockquote><p dir="auto">How does the ‘port’ software decide on deactivation of the older version? Is it perhaps done on the basis of some usage algorithm?</p>
</blockquote><p dir="auto">If you want actual deactivation, you need to do that manually. However, you very likely DO NOT want to deactivate anything.</p>
<p dir="auto">For versioned package families like php, it is fine to have both versions active. Anything from MacPorts using php will be installed for a specific version. You only need to use the php_select port for tools NOT managed by MacPorts, which expect to have a binary named "php".</p>
<blockquote><p dir="auto">Why is it that php82-gd is installed but not php83-gd?</p>
</blockquote><p dir="auto">Because some port has a dependency on php82-gd but apparently no port requires php83-gd.</p>
<blockquote><p dir="auto">And the same with php82-mcrypt vs. php83-mycrypt, the same also with php82-openssl vs. php83-openssl, the same also with php82-zip vs. php83-zip?</p>
<p dir="auto">On the other hand, the reverse happens with the following:
<br />
 php83-apache2handler @8.3.11_0 (active)
<br />
 php83-curl @8.3.11_0 (active)
<br />
 php83-exif @8.3.11_0 (active)
<br />
 php83-iconv @8.3.11_0 (active)
<br />
 php83-imagick @3.7.0_1 (active)
<br />
 php83-pspell @8.3.11_0 (active)</p>
<p dir="auto">None of the corresponding php82 subports are installed. Why this asymmetry?</p>
</blockquote><p dir="auto">You get to this state because different ports which you've installed specify their different PHP dependencies differently.</p>
<p dir="auto">It will not usually clean itself up. Even if you run 'port reclaim' you won't remove old versions that were installed when a different default version of pHP was selected as the default.</p>
<blockquote><p dir="auto">Or is this haphazard installation of ports/subports not unusual?</p>
</blockquote><p dir="auto">It is neither "haphazard" nor unusual.</p>
<p dir="auto">If you want to clean it up manually, you would need to determine whether anything is still depending on php82. To do that you can just look at the full recursive tree of dependents for that port:</p>
<p dir="auto">  port rdependents php82</p>
<p dir="auto">That will show a tree of dependent packages. If any of those packages is something that you know you want to keep, you can check its direct explicit dependencies (port deps portname) to see if it specifies php82 or just a php binary or library. If a specific versioned port is specified in the Portfile, the only way to update that sort of specific port dependency is for the maintainer of the port to validate an update to a newer version. If only a php binary is specified as a dependency, you can remove and reinstall that tree of dependencies to switch to the new version.</p>
<p dir="auto">It is possible to get into a state where you have a tree of php82 packages installed but no longer have any requested packages still depending on them. This can be fixed by running "port uninstall php82" and verifying that the list of ports that will be damaged by that removal does not include anything explicitly wanted. This should be handled by the first step of the "port reclaim" command (which you should run after every update) but sometimes a port gets marked as requested when it should not be, such as if you install a bunch of interdependent ports in one explicit long command line rather than having MacPorts work out the dependencies of a single wanted port.</p>
<br /></div><div id="391C2EDB-51F2-44BE-8BBE-77E1377A3737"><pre>
   bill@scconsult.com or billcole@apache.org
   (AKA @grumpybozo@toad.social and many *@billmail.scconsult.com addresses)
   Not Currently Available For Hire
</pre></div>

</body>

</html>