resource forks and cp

Gary Byers <[email protected]>
Newsgroups gmane.lisp.mcl.general
Message-ID <[email protected]>
[I don't subscribe to this list; I did look at the web archives last night, 
and saw that people were getting the same whining from 'cp' that Doug 
originally reported.]

On OSX, if "f is the name of a regular file (not a directory), then 
"f/rsrc" historically is the name of its resource fork.  (Apparently, that 
syntax has been deprecated in favor of the obviously much better 
"f/..namedfork/rsrc" sometime in the last several years, certainly since 
the last time I paid attention ...  it seems that the deprecated f/rsrc 
convention still works as of 10.6.1, but it might be better to use the new 
convention until Apple decides to deprecate it.)

The post-checkout.sh and pre-checkin.sh scripts - as of r291 or so - were 
using the idioms

$ cp file-containing-resource-fork-of-f f/rsrc # join
and
$ cp f/rsrc file-containing-resource-fork-of f # split

to join/split the data and resource forks of a file.  I won't claim to 
understand why, but it seems that some versions of "cp" will complain that 
they can't update the file's "extended attributes", seemingly after having 
done so.

Using 'cat' instead of 'cp', as in:

$ cat file-containing-resource-fork-of-f > f/rsrc # join
and
$ cat f/rsrc > file-containing-resource-fork-of-f # split

seems to avoid the issue (whatever it is.)  I checked in new versions of 
these scripts that use "cat" instead of "cp", and AFAICT they work on 
10.5.7 and 10.6.1 without making any cryptic whiny noises.

Terje: I made these changes (r292-r294) after Matt had generated the 
"svnadmin dump" file; if that's the easiest way for you to initialize the 
repository on Google Code, we can generate a newer copy of that file.

All concerned: all that I can claim about the new scheme is that it worked 
for me on a couple of machines running a couple of different OS releases. 
If I ever knew anything more about how resource forks are accessed on OSX, 
I've forgotten it, and am looking forward to forgetting the little that I 
now know as soon as that's possible.



_______________________________________________
info-mcl mailing list
[email protected]
http://clozure.com/mailman/listinfo/info-mcl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.