Eric Blake wrote: > I really hate the fact that md5sum and friends output * for binary files, > and blank for text files, when used on cygwin or other platforms where > O_TEXT matters. This poor choice of defaults makes 'make > sc_immutable_NEWS' fail, because md5sum outputs: > > fa6cba1740b3f385520c1b54d90859ca *- > > and the extra * breaks the check. I'd really like to switch md5sum and > friends to match Linux output when O_BINARY, and add a different marker > character (but what?) when summing a file in O_TEXT mode, since generally > you WANT binary mode to be the default. Thoughts?
I see what you mean, but what about people who use -b on Linux. They'd still have to get the "*". Seems like it'd be hard to arrange such a change without causing too much disruption. To address the failure, I'll probably push this tomorrow: >From b102ed9ba6e529cc3dcf6be63c95d0f93d5499e0 Mon Sep 17 00:00:00 2001 From: Jim Meyering <[email protected]> Date: Wed, 25 Mar 2009 22:49:09 +0100 Subject: [PATCH] tests: don't fail "make syntax-check" on cygwin * maint.mk (NEWS_hash): Remove trailing " -" or " *-". * cfg.mk (old_NEWS_hash): Regenerate, removing " -". Reported by Eric Blake. --- cfg.mk | 2 +- maint.mk | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cfg.mk b/cfg.mk index c6b6e9b..29a03a7 100644 --- a/cfg.mk +++ b/cfg.mk @@ -45,7 +45,7 @@ gnulib_dir = /gnulib # Now that we have better (check.mk) tests, make this the default. export VERBOSE = yes -old_NEWS_hash = fa6cba1740b3f385520c1b54d90859ca - +old_NEWS_hash = fa6cba1740b3f385520c1b54d90859ca # Ensure that the list of O_ symbols used to compute O_FULLBLOCK is complete. dd = $(srcdir)/src/dd.c diff --git a/maint.mk b/maint.mk index 5444436..554b90a 100644 --- a/maint.mk +++ b/maint.mk @@ -460,9 +460,12 @@ sc_const_long_option: echo 1>&2 '$(ME): add "const" to the above declarations'; \ exit 1; } || : -NEWS_hash = \ - $$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \ - $(srcdir)/NEWS | grep -v '^Copyright .*Free Software' | md5sum -) +NEWS_hash = \ + $$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \ + $(srcdir)/NEWS \ + | grep -v '^Copyright .*Free Software' \ + | md5sum - \ + | sed 's/ .*//') # Ensure that we don't accidentally insert an entry into an old NEWS block. sc_immutable_NEWS: -- 1.6.2.rc1.285.gc5f54 _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
