[112183] trunk/base/src/macports1.0/macports.tcl

Jeremy Huddleston Sequoia jeremyhu at macports.org
Tue Oct 15 08:37:52 PDT 2013


On Oct 15, 2013, at 8:21, James Berry <jberry at macports.org> wrote:

> 
> On Oct 15, 2013, at 8:02 AM, Jeremy Huddleston Sequoia <jeremyhu at macports.org> wrote:
>> On Oct 15, 2013, at 3:36, Rainer Müller <raimue at macports.org> wrote:
>>> On 2013-10-15 01:53, Jeremy Huddleston Sequoia wrote:
>>>> 
>>>> On Oct 14, 2013, at 12:34, Rainer Müller <raimue at macports.org> wrote:
>>>> 
>>>>> On 2013-10-14 21:22, jeremyhu at macports.org wrote:
>>>>>> Modified: trunk/base/src/macports1.0/macports.tcl
>>>>>> ===================================================================
>>>>>> --- trunk/base/src/macports1.0/macports.tcl	2013-10-14 19:00:23 UTC (rev 112182)
>>>>>> +++ trunk/base/src/macports1.0/macports.tcl	2013-10-14 19:22:30 UTC (rev 112183)
>>>>>> @@ -597,8 +597,7 @@
>>>>>>  set os_endian [string range $tcl_platform(byteOrder) 0 end-6]
>>>>>>  set macosx_version {}
>>>>>>  if {$os_platform eq {darwin}} {
>>>>>> -        # This will probably break when Apple changes versioning
>>>>>> -        set macosx_version 10.[expr {$os_major - 4}]
>>>>>> +        set macosx_version [exec sw_vers -productVersion]
>>>>> 
>>>>> Afther this change, macosx_version contains the string "10.8.5" instead
>>>>> of "10.8" as it did before. This breaks some code in base that compares
>>>>> this variable as a string to "10.5" or "10.4".
>>>> 
>>>> Well then those are bugs that certainly should be fixed as well =)
>>> 
>>> The question would be whether we want macosx_version to story "10.X"
>>> only as it did before or fix the comparisons to use version comparison.
>> 
>> We should fix the comparisons.
>> 
>>> Writing this condition as
>>> [vercmp $macosx_version 10.5] >= 0 && [vercmp $macosx_version 10.6] < 0
>>> seems a bit cumbersome.
>> 
>> Cumbersome yet correct.
> 
> Maybe we just need to add a new version comparison verb, like vercmp_major_minor that compares only the major and minor segments of the version.This would accomplish both goals I think: simplify the version comparison while still allowing us to keep the full version around for “correctness”.

That's not needed.  You can accomplish that with current comparisons. (eg 10.4.x is satisfied by "< 10.5").


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4145 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20131015/63f2927f/attachment.p7s>


More information about the macports-dev mailing list