This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Drop textmode from setup?


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Gary R. Van Sickle on 9/8/2005 7:56 PM:
> 
> I've always seen it the opposite way: only use binary mounts if you know
> what you're doing, otherwise you'll constantly have two problems:
> 
> - Text files created by Cygwin programs will trip up many native programs.
> - Text files created by native Windows programs will almost certainly trip
> up Cygwin programs.

I disagree, Gary; and am more inclined to agree with the other opinions in
this thread about dropping text mode as an option from setup.exe.  Text
mounts should only be used on directories where TEXT files (not binaries)
are intended to be shared between native and cygwin tools.  A system-wide
text mode is WRONG because it sets too many directories (including /bin)
to text mode, when those directories do not contain text files, let alone
files to be shared with native programs.

However, text mounts themselves are still useful, and should not be
dropped, just don't do it in setup.exe for the entire system.
Furthermore, there are POSIX ramifications - text mounts violate POSIX
semantics when binary mounts don't, which makes porting programs to text
mounts more difficult when upstream assumed POSIX semantics.

> 
> The second has historically been a much bigger problem for me than the
> first, so I've been using text mounts forever.

You quickly learn which programs are not forgiving of text files.  Windows
notepad is broken when it comes to mixed line endings, but wordpad works
just fine.  Any good editor will adapt to the line endings of a text file
(and yes, I will argue that notepad is a lousy editor).

> 
>>At least, it's about time to publish the latest setup version 
>>with the improved interface which very explicit recommends UNIX mode.
> 
> Unless the Unix world has turned from its evil ways while I wasn't looking,
> I don't see how that makes sense.  Didn't we just go through a bunch of
> hassle because tar (*tar* of all gotta-have-it-working-and-solid programs)
> was trying to read everything as a text file (i.e. "r")?

Cygwin's philosophy (as I have learned from the recent tar episode) is to
prefer binary mode for file creation, to match the behavior of POSIX and
Linux, even on text mounts, but to be forgiving of text files when the
semantics of the program allow processing by line of human readable text.
   The debate over tar-1.15.1-1 was not about reading files, but creating
files - Chris wanted me to change text file creation on text mounts to be
binary mode, when I had attempted to create them in the mode dictated by
the mount point; so I fixed it per cgf's wishes for tar-1.15.1-2.  Binary
files always have to be handled in binary mode, whether on a text mount
point or binary mount point.  But because cygwin tools prefer creating
binary files even on text mounts, your earlier statement about these files
being interoperable with native programs is not always true.  d2u and u2d
are your friends, you don't need a mount point sledgehammer to solve what
a couple of judicious file changes can do.

- --
Life is short - so eat dessert first!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDIXaH84KuGfSFAYARAuSCAJ9cRe0coYJfHJbMikHxiJS0aqGvQQCfS3CK
7M8luc/h1H7o1XkKEGPGfdI=
=avrX
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]