You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2006/05/15 17:26:45 UTC

DO NOT REPLY [Bug 39585] New: - Core task Condition/Os does not detect "Mac OS X"

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39585>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39585

           Summary: Core task Condition/Os does not detect "Mac OS X"
           Product: Ant
           Version: 1.7Alpha (nightly)
          Platform: Other
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: crossley@apache.org


Using the "fixcrlf" task with default "eol" on Mac OS X doesn't set the
line-endings to UNIX CRLF but instead uses CR. This seems to be because the
os.name is not detected properly in tools/ant/taskdefs/condition/Os.java

os.name: Mac OS X

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 39585] - Core task Condition/Os does not detect "Mac OS X"

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39585>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39585





------- Additional Comments From crossley@apache.org  2006-05-16 01:21 -------
Woops, i was wrong. I get the same problem with Ant-1.6.5 and with today's trunk.

Doing 'build test'
----
...
     [echo] java.vm.info=mixed mode
     [echo] java.vm.name=Java HotSpot(TM) Client VM
     [echo] java.vm.vendor="Apple Computer, Inc."
     [echo] java.vm.version=1.4.2-54
     [echo] os.arch=ppc
     [echo] os.name=Mac OS X
     [echo] os.version=10.4.6
...
----

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 39585] - Core task Condition/Os does not detect "Mac OS X"

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39585>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39585


crossley@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|1.7Alpha (nightly)          |1.6.2




------- Additional Comments From crossley@apache.org  2006-05-16 00:14 -------
Using java version "1.4.2_09". Also i was using Ant 1.6.2 and switching to Ant
1.6.5 all is well. Sorry for the noise.





-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 39585] - fixcrlf should use LF instead of CR as default eol on OS X

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39585>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39585


gudnabrsam@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |1.7




------- Additional Comments From gudnabrsam@yahoo.com  2006-05-18 13:43 -------
Okay, like a genius :| I finally thought to google "OS X" JVM line.separator,
and turned up this:

http://gemma.apple.com/documentation/Java/Conceptual/Java14Development/06-JavaVM/JavaVM.html

which confirms that line.separator is \n, with the comment "This is consistent
with UNIX-based Java implementations, but different from Mac OS 9 and Windows."
 So there is no controversy, current implementation is wrong.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 39585] - fixcrlf should use LF instead of CR as default eol on OS X

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39585>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39585


gudnabrsam@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|questionable:  fixcrlf uses |fixcrlf should use LF
                   |CR (mac) vs. LF (unix) for  |instead of CR as default eol
                   |OS X.  Which is "correct"?  |on OS X




------- Additional Comments From gudnabrsam@yahoo.com  2006-05-17 15:45 -------
Rick Genter responded to my followup query on ant-dev with this link:

http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/Articles/FileSystemGuidelines.html#//apple_ref/doc/uid/20002296-DontLinkElementID_2

I accept this as definitive and support the reworking of fixcrlf to give the
unix higher priority than mac when determining the appropriate line ending.  I
can only assume this means that OS X JVMs use \n for line.separator as well.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 39585] - fixcrlf should use LF instead of CR as default eol on OS X

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39585>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39585





------- Additional Comments From gudnabrsam@yahoo.com  2006-05-22 16:50 -------
Kev posted to ant-dev (as his bugzilla account is in transition ATM):
---
I've just tested this now against the latest trunk on the latest  
version of OSX (10.4.6) with Java 1.5.0_06 - everything is fine using  
the defaults against a CRLF file modifies the file to LF (unix style).
---

Thanks Kev!

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 39585] - fixcrlf should use LF instead of CR as default eol on OS X

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39585>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39585





------- Additional Comments From kevin.jackson@it.fts-vn.com  2006-05-18 01:19 -------
As a fellow OSX user and developer, I've always assumed that the line-ending was
the same as unix - any file created with the command line tools (vi etc)
definitely uses the unix line-endings (as they don't transfer to windows boxes
cleanly)

+1 on making fixcrlf use unix style for Mac OSX (there's an X in the name for a
reason :)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 39585] - Core task Condition/Os does not detect "Mac OS X"

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39585>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39585





------- Additional Comments From gudnabrsam@yahoo.com  2006-05-16 15:39 -------
wait... okay, what is the standard eol on OS X?  According to your original
report, fixcrlf is using cr i.e. \r and that is what its code is telling it to
do... using the Os condition:  Os.isFamily(MAC).  So the only problem I see is
if OS X uses standard Unix line endings; then we need to rearrange the tests in
fixcrlf to detect OS X as Unix "more strongly" than as "mac".  I was not able to
locate a definitive answer here though, so in the absence of some kind of
statement that would explicitly or implicitly declare a "standard" OS X line
ending this issue might remain in limbo as a "threat" to backwards compatibility
(were it implemented).  Documentation affirming that LF is the correct separator
on this platform would, for me, identify this positively as a bug, rendering the
backwards-compatibility issue moot.

br,
Matt

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 39585] - fixcrlf should use LF instead of CR as default eol on OS X

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39585>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39585





------- Additional Comments From kevin.jackson@it.fts-vn.com  2006-05-19 02:29 -------
(In reply to comment #11)
> fixed in SVN HEAD. Thanks for the report!  Oh, probably best if someone (KEV!)
> with OS X tests the change.  ;)

I'll check it this weekend - btw last day at fts, so gmail from now on...



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 39585] - questionable: fixcrlf uses CR (mac) vs. LF (unix) for OS X. Which is "correct"?

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39585>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39585


gudnabrsam@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Core task Condition/Os does |questionable:  fixcrlf uses
                   |not detect "Mac OS X"       |CR (mac) vs. LF (unix) for
                   |                            |OS X.  Which is "correct"?




------- Additional Comments From gudnabrsam@yahoo.com  2006-05-17 13:54 -------
Good point RE the issue summary.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: DO NOT REPLY [Bug 39585] - Core task Condition/Os does not detect "Mac OS X"

Posted by Matt Benson <gu...@yahoo.com>.
> ------- Additional Comments From crossley@apache.org
>  2006-05-17 01:55 -------
> I tried to scour the net and managed to find one
> useful reference. Of course my
> search was not exhaustive and i am not really a Mac
> developer so do not know how
> to find authoritative references.
> 
>
http://developer.apple.com/technotes/tn2002/tn2065.html
> See "What are the rules for line endings?"
> They also describe the problems that will be
> encountered if UNIX-style line
> endings are not used, e.g. 'grep' returns the whole
> file content as a "matching
> line".
> 
> I presume when they say "Mac-style" they mean MacOs
> prior to "Mac OS X".
> 
> We have implemented a workaround by detecting 'os
> family="unix"' as per my
> Comment #4, and specifically using fixcrlf/@eol=unix
> and otherwise using fixcrlf
> with no @eol value.
> 
> p.s. The initial issue Description should say: "UNIX
> LF" and the second sentence
> should be ignored. See Comment #5.
> p.p.s. You might want to change the issue Summary.
> 

Any of you OS X using Ant developers have an opinion
on this, esp. based on the link David provides above? 
i.e. _should_ OS X's Unix-ness override its Mac-ness
with regard to line endings?  This is actually an easy
question, come to think of it... if Java versions on
OS X continue to say that the System line.separator
property is CR, probably that's what fixcrlf should do
and we note the discrepancy in the manual.  So if
someone could verify the value of line.separator on OS
X, we can probably resolve this.  Assuming noone
disagrees with this means of resolving the issue.

-Matt

> -- 
> Configure bugmail:
>
http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching
> the assignee.
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> dev-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> dev-help@ant.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 39585] - Core task Condition/Os does not detect "Mac OS X"

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39585>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39585





------- Additional Comments From crossley@apache.org  2006-05-17 01:55 -------
I tried to scour the net and managed to find one useful reference. Of course my
search was not exhaustive and i am not really a Mac developer so do not know how
to find authoritative references.

http://developer.apple.com/technotes/tn2002/tn2065.html
See "What are the rules for line endings?"
They also describe the problems that will be encountered if UNIX-style line
endings are not used, e.g. 'grep' returns the whole file content as a "matching
line".

I presume when they say "Mac-style" they mean MacOs prior to "Mac OS X".

We have implemented a workaround by detecting 'os family="unix"' as per my
Comment #4, and specifically using fixcrlf/@eol=unix and otherwise using fixcrlf
with no @eol value.

p.s. The initial issue Description should say: "UNIX LF" and the second sentence
should be ignored. See Comment #5.
p.p.s. You might want to change the issue Summary.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 39585] - fixcrlf should use LF instead of CR as default eol on OS X

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39585>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39585


gudnabrsam@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From gudnabrsam@yahoo.com  2006-05-18 14:36 -------
fixed in SVN HEAD. Thanks for the report!  Oh, probably best if someone (KEV!)
with OS X tests the change.  ;)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 39585] - Core task Condition/Os does not detect "Mac OS X"

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39585>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39585





------- Additional Comments From crossley@apache.org  2006-05-16 03:47 -------
Using ant-trunk and following the second example at
http://ant.apache.org/manual/CoreTasks/condition.html
shows that it is *not* detected as MacOS, and doing
<condition property="isUnix">
 <os family="unix"/>
</condition>
shows that it *is* being detected as "unix".

So perhaps the problem is that fixcrlf task is not handling Mac OS X properly
for the default setting of no "eol" attribute.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


DO NOT REPLY [Bug 39585] - Core task Condition/Os does not detect "Mac OS X"

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39585>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39585





------- Additional Comments From stevel@apache.org  2006-05-15 15:36 -------
What version of Java are you using? They may have gone and changed the version
string (again).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org