#36977: app portgroup can fail when used with python portgroup ---------------------------+-------------------------- Reporter: gcasiraghi@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: Port: app | ---------------------------+-------------------------- Changes (by ryandesign@…): * cc: openmaintainer@… (removed) * keywords: mountain => * port: linkchecker @8.1_0 => app * owner: macports-tickets@… => ryandesign@… Comment: When the app portgroup was initially added to the linkchecker port in r83054, the port was using the python27 portgroup. The python27 portgroup was included first, so its post-destroot proc was included first and therefore ran first, setting up the symlinks to the executables, including the linkchecker-gui symlink. The app portgroup was included second, so its post-destroot proc was included second and ran second, which checked for the existence of linkchecker-gui before allowing it to be used as the executable of the application wrapper. But in r99462 the linkchecker port was updated to 8.1 and the portgroup was changed from python27 to python. The python portgroup works differently and does not define its post-destroot proc right away; it waits until python.versions gets set. By that time the app portgroup's post-destroot proc has already been included. So now the app portgroup's post-destroot proc is running first, and failing, because the program it expects to be there (the linkchecker-gui symlink) hasn't been created yet. This sounds like a problem that would affect other ports wanting to use both the python and app portgroups, and is not specific to the linkchecker port. The only other port currently using both the python and app portgroups is tortoisehg, but it is not affected because its app executable is a file in workpath. The solution could be to make the app portgroup wait to define its post- destroot proc until app.executable is set. Portfile authors typically define python.versions before dependencies are declared, so that ${python.version} can be used in the dependency names, while the app portgroup's keywords are typically defined further down, near where other destroot-phase operations happen. This would also have the advantage of making the order of portgroup inclusion irrelevant. -- Ticket URL: <https://trac.macports.org/ticket/36977#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS