Detect OS upgrades and refer users to Migration

Joshua Root jmr at macports.org
Sun Nov 17 08:11:28 PST 2013


On 2013-11-18 02:30 , Ryan Schmidt wrote:
> On Nov 17, 2013, at 08:37, Joshua Root wrote:
>> On 2013-11-18 01:11 , Rainer Müller wrote:
>>> On 2013-11-17 14:44, Ryan Schmidt wrote:
>>>> Thanks. I see you’re checking OS_PLATFORM and OS_MAJOR. Could we check OS_ARCH as well?
>>>
>>> That's difficult as the distributed pkg installers for Tiger and Leopard
>>> are universal. Therefore it's not a fixed value, but from a list of
>>> supported archs.
>>>
>>> However, there is no configure option for that list yes, as only the
>>> MacPorts Portfile passes multiple -arch options to the compiler and does
>>> not tell configure about it.
>>
>> Are there actually any cases where base will not just fail to run when
>> built for an inappropriate arch? Certainly if you have a ppc
>> MacPorts.dylib you have to really try to get it to load into the system
>> tclsh on an Intel machine even when you have Rosetta.
> 
> Do you? I don’t remember. 10.4 PPC contained PPC code only, but 10.4 Intel and 10.5 on both platforms contained both Intel and PPC code.

Yes, and on Intel machines the i386 slice of the executable will be
preferred, and you can't load a ppc lib into an i386 process. You would
have to run 'arch -ppc /usr/bin/tclsh /opt/local/bin/port' for it to
load. The same applies if you migrated an i386 build to an x86_64
machine (both running 10.6).

If base is a universal build for the right OS version, there is no problem.

- Josh


More information about the macports-dev mailing list