delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/03/17/09:32:59

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
Message-ID: <4D820D62.4030403@cwilson.fastmail.fm>
Date: Thu, 17 Mar 2011 09:32:18 -0400
From: Charles Wilson <cygwin AT cwilson DOT fastmail DOT fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: Cygwin Mailing List <cygwin AT cygwin DOT com>
Subject: Re: ITP dos2unix 5.2.1-1
References: <4D7FE2A7 DOT 8080409 AT xs4all DOT nl> <4D7FE57A DOT 4020903 AT redhat DOT com> <4D806DCF DOT 5090803 AT xs4all DOT nl> <4D80C0B8 DOT 8090603 AT cwilson DOT fastmail DOT fm> <4D80CEB4 DOT 7090005 AT xs4all DOT nl> <20110316154913 DOT GA18995 AT ednor DOT casa DOT cgf DOT cx> <4D80DEAF DOT 6020307 AT xs4all DOT nl> <4D810FAF DOT 6040609 AT t-online DOT de> <20110316193249 DOT GA15365 AT ednor DOT casa DOT cgf DOT cx> <4D8117FD DOT 40507 AT cwilson DOT fastmail DOT fm> <20110316201821 DOT GA773 AT ednor DOT casa DOT cgf DOT cx> <4D812DBE DOT 1090607 AT cwilson DOT fastmail DOT fm> <4D81CED1 DOT 9050601 AT xs4all DOT nl>
In-Reply-To: <4D81CED1.9050601@xs4all.nl>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Dropped cygwin-apps.

On 3/17/2011 5:05 AM, Erwin Waterlander wrote:
> On 03/16/2011 10:38 PM, Charles Wilson wrote:
>>     5) cygutils always follows symlinks. This new package does not,
>>        unless --force, according to the man page (which is
>>        unfortunate: the same option means "follow symlinks" AND
>>        "convert everything even if you think it is binary"
> The new package does not follow symlinks, so you don't damage files on
> other locations. If you force conversion a copy is created. The symlink
> target remains unmodified. There is not a separate option to force
> conversion of symlinks. Perhaps the creation of copies should be default.

>> 5: if the new package is used, I think we should patch it to always
>> follow symlinks (or add a new option, and make it default to follow).
> 
> I would propose a new option to follow symlinks. By default not follow,
> but copy (don't damage files on other locations).

Erwin, you don't seem to understand the importance of not changing
current behavior, when replacing existing apps.  I'm trying to point out
(a) how little your proposed package actually differs from the current
cygutils implementations, and (b) what needs to change to make the new
version a drop-in replacement.

Because that's what you're trying to do: make a drop in replacement.

Regardless of whether some current behavior of cygutils-dos2unix is good
or bad, CHANGE is worse -- since people have been relying on the current
behavior for years.

Now, if you REALLY feel strongly about some particular point, then I
would suggest a stepwise conversion.  FIRST, patch and release the new
package, dos2unix, such that it is a drop-in replacement with NO
expected changes in behavior (other than, obviously, its new
capabilities like 7bit, iso, etc).

For instance, a --no-follow / --follow pair of options, where --follow
is the default (to match the behavior of cygutils-dos2unix), but users
can specify --no-follow if they want.

Then, after a suitable time has elapsed -- 1 month? 3 months? -- change
the default to be --no-follow, and make a BIG DEAL of this behavior
change in your announcement.

Rule:
Users don't like change.  Only make one change at a time.

So, change #1: switch from cygutils-dos2unix to the new package.
change #2, somewhat later: change the default "follow" behavior.

BTW: I *guarantee* that there will be some behavioral change in your
"drop in" replacement that we missed.  A bug, packaging oops, SOMETHING.
 You'll want to use the 1-month (3?) grace period to wait for those
reports, and fix 'em, before introducing any new, deliberate, behavior
changes.  (BTW, you'll want to test the behavior of the apps, on files,
on pipes with redirection to a file, etc, on DOS mounts in addition to
UNIX ones...voice of experience... :-(


Note also that my proposal (TWO new options, where one reasserts the
default -- whatever that default may be) is similar to the
--force/--safe pair.  Good command-line option design usually requires
these paired options, so that the CLI doesn't change even when/if you
(later) decide to change the default.  It's not about overriding an
Administrative alias; it's about easily overriding MY OWN alias, if I
generally like the opposite default from what the base executable does
but SOMETIMES want to behave the "other way".  Sure, I can use
full-path-to-exe to avoid the alias, but given
alias d2u='/usr/bin/d2u --force --follow'

	/usr/bin/d2u *
vs	d2u --safe --no-follow *

The latter is more expressive: HERE'S what I want to do right now,
rather than "Oh yeah, my alias does X but the default app does !X, so to
get !X I need to override some alias in my ~/.bashrc that I haven't
edited in years, and just usually take for granted as THE behavior of
that app..."

Or, "interactively I like --follow, but I don't want scripts to run
amuck, so I'll alias d2u to 'd2u --follow' but explicitly use 'd2u
--no-follow' in scripts so they DTRT regardless of any alias settings."

Or, my alias sets LOTS of (anti-)defaults, and I just want to reassert
the real default behavior for ONE of them:
	d2u --safe (but keep the alias --follow behavior)


Think '-i' vs. '-f' for 'rm'


FYI, I think a patch to add --safe, plus the patch to add
--follow/--no-follow (where --follow does NOT also imply --force) would
be suitable patches to go upstream.  Assuming that patch was adopted
upstream, the only (temporary) difference between cygwin's new package
and upstream would be the default behavior of the follow/no-follow pair.

--
Chuck

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019