[GRASS5] MacOSX file name recognition bug in G6?

Hi,

today I worked on a colleague's MacOSX. Surprisingly I had
the following problem:

#Remove MASK:
GRASS 6.1.cvs (pat_gaussboaga):~ > g.remove MASK
REMOVE [MASK]
raster
header
category
color
history
misc
fcell MISSING
g3dcell MISSING

#create file with name 'mask' (but not MASK):
GRASS 6.1.cvs (pat_gaussboaga):~ > r.mapcalc "mask=if(isnull(po06_snow007),null(),1)"
100%
[Raster MASK present]
-> ouch.

GRASS 6.1.cvs (pat_gaussboaga):~/0.875/SCRIPTS/geotop0.875 > g.copy mask,MASK
ERROR: <MASK> already exists
[Raster MASK present]

Is MacOSX unable to distinguish between mask and MASK?

######################
Test in Linux:

GRASS 6.1.cvs (spearfish60):~ > r.mapcalc "mask=1"
100%
GRASS 6.1.cvs (spearfish60):~ > g.copy mask,MASK
COPY [mask@PERMANENT] to current mapset as [MASK]
raster
header
category
color MISSING
history
misc
fcell MISSING
g3dcell MISSING
[Raster MASK present]

-> works ok.

######################

Surprised,

Markus

(looks like Lorenzo responded on the other list, but I'll expand on it a bit)

On a (standard) HFS+ file system, the Mac is _case-aware_, but not case-sensitive. (it stores filenames with case, but doesn't care). works in unicode too: á = Á, but á != a.

If the file system where the GRASS files are is UFS (not reccomended by most Mac users), it should be case-sensitive.

This creates porting problems sometimes, but these days I think most 'nix developers have taken care of it when it's an issue in the source (ie the source including different case-sensitive files, or trying to create them in compilation or when running). Then it's just up to non-Mac users to be aware of this (ie in your case trying to use both mask and MASK).

I'm a little confused here:

#Remove MASK:
GRASS 6.1.cvs (pat_gaussboaga):~ > g.remove MASK
REMOVE [MASK]
raster
header
category
color
history
misc
fcell MISSING
g3dcell MISSING

#create file with name 'mask' (but not MASK):
GRASS 6.1.cvs (pat_gaussboaga):~ > r.mapcalc "mask=if(isnull(po06_snow007),null(),1)"
100%
[Raster MASK present]
-> ouch.

did the mapcalc create 'MASK' or 'mask' at this point? That would be odd - it should create 'mask', since it's case-aware.

GRASS 6.1.cvs (pat_gaussboaga):~/0.875/SCRIPTS/geotop0.875 > g.copy mask,MASK
ERROR: <MASK> already exists
[Raster MASK present]

Is MacOSX unable to distinguish between mask and MASK?

######################
Test in Linux:

GRASS 6.1.cvs (spearfish60):~ > r.mapcalc "mask=1"
100%
GRASS 6.1.cvs (spearfish60):~ > g.copy mask,MASK
COPY [mask@PERMANENT] to current mapset as [MASK]
raster
header
category
color MISSING
history
misc
fcell MISSING
g3dcell MISSING
[Raster MASK present]

-> works ok.

######################

Surprised,

Markus

_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5

-----
William Kyngesburye <kyngchaos@charter.net>
http://webpages.charter.net/kyngchaos/

"I ache, therefore I am. Or in my case - I am, therefore I ache."

- Marvin

Markus Neteler wrote:

Is MacOSX unable to distinguish between mask and MASK?

Maybe; it depends upon the filesystem format. My memory is hazy, but I
think that HFS/HFS+ is case-insensitive while UFS is case-sensitive.

--
Glynn Clements <glynn@gclements.plus.com>

It seems to me that 'pure' Mac OSX does NOT differentiate between upper and
lower case letters. For example,

cd /Users
cd /users

gets me to the same place.

also

anthgradpc7:~ cmbarton$ cp temp TEMP
cp: TEMP and temp are identical (not copied).

Sometimes case does seem to matter, however. I just can't remember where it
does.

Michael
______________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Markus Neteler <neteler@itc.it>
Date: Thu, 21 Apr 2005 15:35:37 +0200
To: grass5 developers list <grass5@grass.itc.it>
Subject: [GRASS5] MacOSX file name recognition bug in G6?

Hi,

today I worked on a colleague's MacOSX. Surprisingly I had
the following problem:

#Remove MASK:
GRASS 6.1.cvs (pat_gaussboaga):~ > g.remove MASK
REMOVE [MASK]
raster
header
category
color
history
misc
fcell MISSING
g3dcell MISSING

#create file with name 'mask' (but not MASK):
GRASS 6.1.cvs (pat_gaussboaga):~ > r.mapcalc
"mask=if(isnull(po06_snow007),null(),1)"
100%
[Raster MASK present]
-> ouch.

GRASS 6.1.cvs (pat_gaussboaga):~/0.875/SCRIPTS/geotop0.875 > g.copy mask,MASK
ERROR: <MASK> already exists
[Raster MASK present]

Is MacOSX unable to distinguish between mask and MASK?

######################
Test in Linux:

GRASS 6.1.cvs (spearfish60):~ > r.mapcalc "mask=1"
100%
GRASS 6.1.cvs (spearfish60):~ > g.copy mask,MASK
COPY [mask@PERMANENT] to current mapset as [MASK]
raster
header
category
color MISSING
history
misc
fcell MISSING
g3dcell MISSING
[Raster MASK present]

-> works ok.

######################

Surprised,

Markus