is archcheck portgroup history?
Ryan Schmidt
ryandesign at macports.org
Fri Aug 6 12:55:38 PDT 2010
In short, at this time, no, IMHO.
On Aug 6, 2010, at 14:35, Bradley Giesbrecht wrote:
> I can't find mention of archcheck in "man portgroup" or the MP Guide.
Unfortunately, many useful parts of MacPorts are not documented in the guide. Many contributors (myself included) seem to prefer to code than write documentation.
> Looking in Trac I see there was talk of removing portgroup archcheck but didn't find confirmation that it was removed.
The archcheck portgroup exists to ensure that when you install a port with a certain set of architectures, its dependencies are installed with at least those architectures as well. This was extremely necessary after Snow Leopard came out and changed the default build architecture from i386 to x86_64 and people did not realize they were supposed to uninstall and reinstall all ports when changing major OS versions.
The archcheck portgroup works by using "lipo -info" to actually check the architecture(s) of files that got installed by dependencies to ensure they match the architecture(s) being built now. This works, but is inconvenient, because it must be added to each port separately, and each port must basically list its dependencies twice: once in the "depends_lib" section, and a second time in the "archcheck.files" section (where a representative file from each dependency is listed).
MacPorts 1.9 includes build-in arch checking, but of a different kind. At install time, it records in the registry what architecture(s) a port was built for. When installing a new port, it checks that the architecture(s) recorded in the registry for each dependency matches the architecture(s) being built now. There are two problems with this. The most acute at this time, since MacPorts 1.9 has only recently been released, is that only ports installed with MacPorts 1.9 and up have their architecture(s) recorded in the registry. For ports installed earlier, MacPorts assumes they're ok; for this reason, the archcheck portgroup seems to still be necessary until such a time as all ports have been rebuilt with MacPorts 1.9, and we have no way to enforce that all users will do this. The second problem is that MacPorts only records the architecture(s) it *asked* the port to build for -- it does nothing to check that the port actually ended up building those architecture(s). For example, a port not using a configure script will not support building for the non-default build_arch unless the port author has explicitly added code to do that. For this reason, the archcheck portgroup seems to still be necessary until such a time as MacPorts ensures that the architecture(s) a port installed match what was intended to be installed.
More information about the macports-dev
mailing list