On Oct 15, 2013, at 8:36, Joshua Root <[email protected]> wrote:

> On 2013-10-16 02:21 , James Berry wrote:
>> 
>> On Oct 15, 2013, at 8:02 AM, Jeremy Huddleston Sequoia 
>> <[email protected]> wrote:
>>> On Oct 15, 2013, at 3:36, Rainer Müller <[email protected]> wrote:
>>>> 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”.
> 
> It's not a matter of "correct" or "incorrect", we get to define what the
> variable should mean. I can only guess that Jeremy thinks it should
> contain the full version by analogy with os.version?

Yes, exactly.

> If that's the case,
> then we could add a new variable analogous to os.major that works just
> like macosx_version does now and can be directly compared for equality
> (and used in all the places that macosx_version currently is). Or we
> could not break compatibility with everything that uses macosx_version
> and add a new variable that contains the full OS X version.

If you want to define macosx_version to mean just the "10.x" major version, 
that's fine.  I'm just trying to eliminate the hacky version setting and make 
things more consistent (and thus more robust).  If you want to keep it the 
"10.x" major version, then I suggest we still get that data from sw_vers rather 
than hacky math of the major os version.

Also, macosx_deployment_target is getting set to just the major version because 
of this and not the full OS dot version.  This can cause some (minor) 
differences, but I'm not sure if there are any in practice (certainly not any I 
can think of off the top of my head) ... just something to be aware of.

--Jeremy

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to