OSProcess behaves wrong on Mac OS Sierra - Pharo 6

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

OSProcess behaves wrong on Mac OS Sierra - Pharo 6

cdelaunay
Hello,

I am running a Pharo 6 image (Latest update: #60498) on a mac sierra machine (10.12.1).
I loaded version 4.6.4 of OSProcess (which is the one loaded with stable version of CommandShell project).

I expected these methods to tell that I am running on a "mac unix" system:

OSProcess class >> isNonUnixMac
OSProcess class >> isUnix
OSProcess class >> isUnixMac

But they all answer that i am running on a "non unix mac" system.

Problem seems to come from the following check to decide if  a mac platform is "unix mac"  :

(self platformName = 'Mac OS') and: [numericOsVersion >= 1000]

In my case, numericOsVersion is '10.12.1' asInteger, which gives 10 => "non unix"



--
Cyrille Delaunay
Reply | Threaded
Open this post in threaded view
|

Re: OSProcess behaves wrong on Mac OS Sierra - Pharo 6

Stephane Ducasse-3
thanks cyril
Can you open a bug entry?



On Tue, Jun 6, 2017 at 4:21 PM, Cyrille Delaunay <[hidden email]> wrote:

> Hello,
>
> I am running a Pharo 6 image (Latest update: #60498) on a mac sierra machine
> (10.12.1).
> I loaded version 4.6.4 of OSProcess (which is the one loaded with stable
> version of CommandShell project).
>
> I expected these methods to tell that I am running on a "mac unix" system:
>
> OSProcess class >> isNonUnixMac
> OSProcess class >> isUnix
> OSProcess class >> isUnixMac
>
> But they all answer that i am running on a "non unix mac" system.
>
> Problem seems to come from the following check to decide if  a mac platform
> is "unix mac"  :
>
> (self platformName = 'Mac OS') and: [numericOsVersion >= 1000]
>
> In my case, numericOsVersion is '10.12.1' asInteger, which gives 10 => "non
> unix"
>
>
>
> --
> Cyrille Delaunay

Reply | Threaded
Open this post in threaded view
|

Re: OSProcess behaves wrong on Mac OS Sierra - Pharo 6

Eliot Miranda-2
In reply to this post by cdelaunay
Hi Cyrille,


On Jun 6, 2017, at 7:21 AM, Cyrille Delaunay <[hidden email]> wrote:

Hello,

I am running a Pharo 6 image (Latest update: #60498) on a mac sierra machine (10.12.1).
I loaded version 4.6.4 of OSProcess (which is the one loaded with stable version of CommandShell project).

I expected these methods to tell that I am running on a "mac unix" system:

OSProcess class >> isNonUnixMac
OSProcess class >> isUnix
OSProcess class >> isUnixMac

But they all answer that i am running on a "non unix mac" system.

Problem seems to come from the following check to decide if  a mac platform is "unix mac"  :

(self platformName = 'Mac OS') and: [numericOsVersion >= 1000]

In my case, numericOsVersion is '10.12.1' asInteger, which gives 10 => "non unix"

I broke this last week by changing getSystemAttribute: 1002 to answer e.g. '10.12.1'  instead of '1095' which the old code (Mac call Gestalt IIRC) always returned.

I fixed it today by changing getSystemAttribute: 1002 to answer e.g. '1012.1'  instead of '10.12.1', so '1012.1' asNumber >= 1000 once again.  Apologies for the inconvenience.  The next VMs which are built automatically should be fixed.

-- 
Cyrille Delaunay


_,,,^..^,,,_ (phone)
Reply | Threaded
Open this post in threaded view
|

Re: OSProcess behaves wrong on Mac OS Sierra - Pharo 6

cdelaunay
Perfect, thank you Eliot

2017-06-06 23:41 GMT+02:00 Eliot Miranda <[hidden email]>:
Hi Cyrille,


On Jun 6, 2017, at 7:21 AM, Cyrille Delaunay <[hidden email]> wrote:

Hello,

I am running a Pharo 6 image (Latest update: #60498) on a mac sierra machine (10.12.1).
I loaded version 4.6.4 of OSProcess (which is the one loaded with stable version of CommandShell project).

I expected these methods to tell that I am running on a "mac unix" system:

OSProcess class >> isNonUnixMac
OSProcess class >> isUnix
OSProcess class >> isUnixMac

But they all answer that i am running on a "non unix mac" system.

Problem seems to come from the following check to decide if  a mac platform is "unix mac"  :

(self platformName = 'Mac OS') and: [numericOsVersion >= 1000]

In my case, numericOsVersion is '10.12.1' asInteger, which gives 10 => "non unix"

I broke this last week by changing getSystemAttribute: 1002 to answer e.g. '10.12.1'  instead of '1095' which the old code (Mac call Gestalt IIRC) always returned.

I fixed it today by changing getSystemAttribute: 1002 to answer e.g. '1012.1'  instead of '10.12.1', so '1012.1' asNumber >= 1000 once again.  Apologies for the inconvenience.  The next VMs which are built automatically should be fixed.

-- 
Cyrille Delaunay


_,,,^..^,,,_ (phone)



--
Cyrille Delaunay