[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[coreutils] 3 maint patches
From: |
Jim Meyering |
Subject: |
[coreutils] 3 maint patches |
Date: |
Thu, 27 May 2010 12:13:44 +0200 |
FYI,
commit d4201905ab4ed20ec3a5e2aea528835552e84a1d
Author: Jim Meyering <address@hidden>
Date: Wed May 26 11:33:53 2010 +0200
tests: update help-version to work with parted, too
* tests/misc/help-version: Add init code for GNU Parted.
commit 5d59808a65dc05c2777afb4b78128ca9db1ea78f
Author: Jim Meyering <address@hidden>
Date: Tue May 25 18:05:29 2010 +0200
maint: don't emit an extra newline in each of two diagnostics
* src/shuf.c (main): Remove a stray newline in a diagnostic.
* src/od.c (main): Likewise.
Detected via these:
git grep -A1 'error *(.*,$' | grep -C1 '\\n"[,)]'
git grep 'error *(.*;$' | grep '\\n"[,)]'
commit 55db9a39a818e82324e1304e5d886aa2cf137092
Author: Jim Meyering <address@hidden>
Date: Tue May 25 12:32:03 2010 +0200
maint: remove unneeded double quotes on RHS of shell assignments
Run this command:
git grep -l 'LC_[A-Z]*="' \
| xargs perl -pi -e 's/(LC_[A-Z]*)="(.*?)"/$1=$2/'
* src/Makefile.am: Write LC_ALL=$$locale, not LC_ALL="$$locale".
* src/date.c (main): Similar, in a comment.
* tests/misc/sort-month: Write LC_ALL=$LOC, not LC_ALL="$LOC".
>From 55db9a39a818e82324e1304e5d886aa2cf137092 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 25 May 2010 12:32:03 +0200
Subject: [PATCH 1/3] maint: remove unneeded double quotes on RHS of shell
assignments
Run this command:
git grep -l 'LC_[A-Z]*="' \
| xargs perl -pi -e 's/(LC_[A-Z]*)="(.*?)"/$1=$2/'
* src/Makefile.am: Write LC_ALL=$$locale, not LC_ALL="$$locale".
* src/date.c (main): Similar, in a comment.
* tests/misc/sort-month: Write LC_ALL=$LOC, not LC_ALL="$LOC".
---
src/Makefile.am | 4 ++--
src/date.c | 2 +-
tests/misc/sort-month | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 4576d28..0630a06 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -685,7 +685,7 @@ au_actual = authors-actual
.PHONY: sc_check-AUTHORS
sc_check-AUTHORS: $(all_programs)
@locale=en_US.UTF-8; \
- LC_ALL="$$locale" ./cat --version \
+ LC_ALL=$$locale ./cat --version \
| grep ' Torbjorn ' > /dev/null \
&& { echo "$@: skipping this check"; exit 0; }; \
rm -f $(au_actual) $(au_dotdot); \
@@ -699,7 +699,7 @@ sc_check-AUTHORS: $(all_programs)
elif test "$$i" = test; then \
exe='['; \
fi; \
- LC_ALL="$$locale" ./$$exe --version \
+ LC_ALL=$$locale ./$$exe --version \
| perl -0 -pi -e 's/,\n/, /gm' \
| sed -n -e '/Written by /{ s//'"$$i"': /;' \
-e 's/,* and /, /; s/\.$$//; p; }'; \
diff --git a/src/date.c b/src/date.c
index c39adb1..42f3348 100644
--- a/src/date.c
+++ b/src/date.c
@@ -450,7 +450,7 @@ main (int argc, char **argv)
if (! *format)
{
/* Do not wrap the following literal format string with _(...).
- For example, suppose LC_ALL is unset, LC_TIME="POSIX",
+ For example, suppose LC_ALL is unset, LC_TIME=POSIX,
and LANG="ko_KR". In that case, POSIX says that LC_TIME
determines the format and contents of date and time strings
written by date, which means "date" must generate output
diff --git a/tests/misc/sort-month b/tests/misc/sort-month
index 8a8e4fa..5ac6afd 100755
--- a/tests/misc/sort-month
+++ b/tests/misc/sort-month
@@ -28,9 +28,9 @@ locale --version >/dev/null 2>&1 ||
# C will be used if the locale is not present
for LOC in "$LOCALE_FR" "$LOCALE_FR_UTF8" "ja_JP.utf8"; do
- mon="$(LC_ALL="$LOC" locale abmon 2>/dev/null);"
- smon=$(LC_ALL="$LOC" locale abmon 2>/dev/null |
- tr ';' '\n' | shuf | nl | LC_ALL="$LOC" sort -k2,2M |
+ mon="$(LC_ALL=$LOC locale abmon 2>/dev/null);"
+ smon=$(LC_ALL=$LOC locale abmon 2>/dev/null |
+ tr ';' '\n' | shuf | nl | LC_ALL=$LOC sort -k2,2M |
cut -f2 | tr '\n' ';')
test "$mon" = "$smon" || { fail=1; break; }
done
--
1.7.1.348.gb26ba
>From 5d59808a65dc05c2777afb4b78128ca9db1ea78f Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 25 May 2010 18:05:29 +0200
Subject: [PATCH 2/3] maint: don't emit an extra newline in each of two
diagnostics
* src/shuf.c (main): Remove a stray newline in a diagnostic.
* src/od.c (main): Likewise.
Detected via these:
git grep -A1 'error *(.*,$' | grep -C1 '\\n"[,)]'
git grep 'error *(.*;$' | grep '\\n"[,)]'
---
src/od.c | 2 +-
src/shuf.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/od.c b/src/od.c
index 964552d..4508725 100644
--- a/src/od.c
+++ b/src/od.c
@@ -1800,7 +1800,7 @@ it must be one character from [doxn]"),
if (traditional && 1 < n_files)
{
error (0, 0, _("extra operand %s"), quote (argv[optind + 1]));
- error (0, 0, "%s\n",
+ error (0, 0, "%s",
_("compatibility mode supports at most one file"));
usage (EXIT_FAILURE);
}
diff --git a/src/shuf.c b/src/shuf.c
index 4f4ca1c..67b19af 100644
--- a/src/shuf.c
+++ b/src/shuf.c
@@ -355,7 +355,7 @@ main (int argc, char **argv)
{
if (n_operands)
{
- error (0, 0, _("extra operand %s\n"), quote (operand[0]));
+ error (0, 0, _("extra operand %s"), quote (operand[0]));
usage (EXIT_FAILURE);
}
n_lines = hi_input - lo_input + 1;
--
1.7.1.348.gb26ba
>From d4201905ab4ed20ec3a5e2aea528835552e84a1d Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 26 May 2010 11:33:53 +0200
Subject: [PATCH 3/3] tests: update help-version to work with parted, too
* tests/misc/help-version: Add init code for GNU Parted.
---
tests/misc/help-version | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/tests/misc/help-version b/tests/misc/help-version
index 10f93ad..a84c0ec 100755
--- a/tests/misc/help-version
+++ b/tests/misc/help-version
@@ -242,6 +242,9 @@ stat_setup () { args=$tmp_in; }
unlink_setup () { args=$tmp_in; }
lbracket_setup () { args=": ]"; }
+parted_setup () { args="-s $tmp_in mklabel gpt"
+ dd if=/dev/null of=$tmp_in seek=2000; }
+
# Ensure that each program "works" (exits successfully) when doing
# something more than --help or --version.
for i in $built_programs; do
--
1.7.1.348.gb26ba
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [coreutils] 3 maint patches,
Jim Meyering <=