summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/coreutils/coreutils-6.9/coreutils-ls-x.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/coreutils/coreutils-6.9/coreutils-ls-x.patch')
-rw-r--r--meta/recipes-core/coreutils/coreutils-6.9/coreutils-ls-x.patch115
1 files changed, 115 insertions, 0 deletions
diff --git a/meta/recipes-core/coreutils/coreutils-6.9/coreutils-ls-x.patch b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-ls-x.patch
new file mode 100644
index 0000000000..2d61438209
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils-6.9/coreutils-ls-x.patch
@@ -0,0 +1,115 @@
1This patch was imported from the Fedora Core 8 coreutils-6.9-9 package.
2
3The package is stated as being Licensed as GPLv2+.
4
5Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
6
7--- coreutils-6.9/src/ls.c.ls-x 2007-06-13 14:27:36.000000000 +0100
8+++ coreutils-6.9/src/ls.c 2007-06-13 14:28:42.000000000 +0100
9@@ -4151,16 +4151,16 @@
10 size_t pos = 0;
11 size_t cols = calculate_columns (false);
12 struct column_info const *line_fmt = &column_info[cols - 1];
13- size_t name_length = length_of_file_name_and_frills (cwd_file);
14+ struct fileinfo const *f = sorted_file[0];
15+ size_t name_length = length_of_file_name_and_frills (f);
16 size_t max_name_length = line_fmt->col_arr[0];
17
18 /* Print first entry. */
19- print_file_name_and_frills (cwd_file);
20+ print_file_name_and_frills (f);
21
22 /* Now the rest. */
23 for (filesno = 1; filesno < cwd_n_used; ++filesno)
24 {
25- struct fileinfo const *f;
26 size_t col = filesno % cols;
27
28 if (col == 0)
29--- coreutils-6.9/tests/ls/Makefile.am.ls-x 2007-03-18 21:36:43.000000000 +0000
30+++ coreutils-6.9/tests/ls/Makefile.am 2007-06-13 14:28:42.000000000 +0100
31@@ -24,7 +24,7 @@
32 stat-dtype \
33 inode dangle file-type recursive dired infloop \
34 rt-1 time-1 symlink-slash follow-slink no-arg m-option \
35- stat-vs-dirent
36+ stat-vs-dirent x-option
37
38 EXTRA_DIST = $(TESTS)
39 TESTS_ENVIRONMENT = \
40--- /dev/null 2007-06-13 08:43:51.993263382 +0100
41+++ coreutils-6.9/tests/ls/x-option 2007-06-13 14:28:42.000000000 +0100
42@@ -0,0 +1,59 @@
43+#!/bin/sh
44+# Exercise the -x option.
45+
46+# Copyright (C) 2007 Free Software Foundation, Inc.
47+
48+# This program is free software; you can redistribute it and/or modify
49+# it under the terms of the GNU General Public License as published by
50+# the Free Software Foundation; either version 2 of the License, or
51+# (at your option) any later version.
52+
53+# This program is distributed in the hope that it will be useful,
54+# but WITHOUT ANY WARRANTY; without even the implied warranty of
55+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56+# GNU General Public License for more details.
57+
58+# You should have received a copy of the GNU General Public License
59+# along with this program; if not, write to the Free Software
60+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
61+# 02110-1301, USA.
62+
63+if test "$VERBOSE" = yes; then
64+ set -x
65+ ls --version
66+fi
67+
68+. $srcdir/../envvar-check
69+. $srcdir/../lang-default
70+
71+pwd=`pwd`
72+t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
73+trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
74+trap '(exit $?); exit $?' 1 2 13 15
75+
76+framework_failure=0
77+mkdir -p $tmp || framework_failure=1
78+cd $tmp || framework_failure=1
79+mkdir subdir || framework_failure=1
80+touch subdir/b || framework_failure=1
81+touch subdir/a || framework_failure=1
82+
83+if test $framework_failure = 1; then
84+ echo "$0: failure in testing framework" 1>&2
85+ (exit 1); exit 1
86+fi
87+
88+fail=0
89+
90+# Coreutils 6.8 and 6.9 would output this in the wrong order.
91+ls -x subdir > out || fail=1
92+ls -rx subdir >> out || fail=1
93+cat <<\EOF > exp || fail=1
94+a b
95+b a
96+EOF
97+
98+cmp out exp || fail=1
99+test $fail = 1 && diff out exp 2> /dev/null
100+
101+(exit $fail); exit $fail
102--- coreutils-6.9/NEWS.ls-x 2007-03-22 21:19:45.000000000 +0000
103+++ coreutils-6.9/NEWS 2007-06-13 14:28:42.000000000 +0100
104@@ -13,6 +13,11 @@
105 Using pr -m -s (i.e. merging files, with TAB as the output separator)
106 no longer inserts extraneous spaces between output columns.
107
108+** Bug fixes
109+
110+ ls -x DIR would sometimes output the wrong string in place of the
111+ first entry. [introduced in coreutils-6.8]
112+
113
114 * Noteworthy changes in release 6.8 (2007-02-24) [not-unstable]
115