Detect OS upgrades and refer users to Migration

Rainer Müller raimue at macports.org
Sun Nov 17 04:57:20 PST 2013


On 2013-11-06 17:25, Daniel J. Luke wrote:
> On Nov 6, 2013, at 5:06 AM, Rainer Müller <raimue at macports.org> wrote:
>> On 2013-11-05 02:06, Ryan Schmidt wrote:
>>> Is there a way that we could detect that the OS has been upgraded so that we could refer users to the Migration wiki page? I don’t think we keep track of the last-used OS X version anywhere, but maybe it’s as simple as checking if any installed port was installed for a different OS version than the current one (e.g. we’re now on darwin 13 but there are ports installed with darwin 12).
>>
>> As our base system is already targeting a specific OS release, we should
>> just store the platform it was built for in *_autoconf.tcl and issue an
>> error if that does not match on launch.
> 
> That sounds good to me.

Implemented now on trunk:
http://trac.macports.org/changeset/113478

If you want to test it, just temporarily change os_platform or os_major
in ${prefix}/share/macports/Tcl/macports1.0/macports_autoconf.tcl and
then run any port command.

Rainer


More information about the macports-dev mailing list