1 |
commit: 488872bd2a698af501f88470badb5a67bdb3b4b6 |
2 |
Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Oct 10 11:35:55 2017 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 20 07:44:59 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=488872bd |
7 |
|
8 |
app-shells/dash: remove unused patch. |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/5905 |
11 |
|
12 |
app-shells/dash/files/dash-0.5.9-dumb-echo.patch | 93 ------------------------ |
13 |
1 file changed, 93 deletions(-) |
14 |
|
15 |
diff --git a/app-shells/dash/files/dash-0.5.9-dumb-echo.patch b/app-shells/dash/files/dash-0.5.9-dumb-echo.patch |
16 |
deleted file mode 100644 |
17 |
index 9bcf6e65a8a..00000000000 |
18 |
--- a/app-shells/dash/files/dash-0.5.9-dumb-echo.patch |
19 |
+++ /dev/null |
20 |
@@ -1,93 +0,0 @@ |
21 |
-http://bugs.gentoo.org/337329 |
22 |
-http://bugs.gentoo.org/527848 |
23 |
- |
24 |
-there's no requirement for `echo` to support escape sequences. bash, by default, |
25 |
-does not, while dash always does. POSIX permits either behavior: |
26 |
-http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html |
27 |
- |
28 |
-however, since the behavior is not portable, no one should be relying on echo |
29 |
-having any specific behavior. they should use `printf` when they want an escape |
30 |
-sequence. it also makes dash smaller & faster to disable this logic entirely. |
31 |
- |
32 |
---- a/src/bltin/printf.c |
33 |
-+++ b/src/bltin/printf.c |
34 |
-@@ -442,21 +442,12 @@ |
35 |
- int |
36 |
- echocmd(int argc, char **argv) |
37 |
- { |
38 |
-- int nonl; |
39 |
-- |
40 |
-- nonl = *++argv ? equal(*argv, "-n") : 0; |
41 |
-- argv += nonl; |
42 |
-- |
43 |
-- do { |
44 |
-- int c; |
45 |
-- |
46 |
-- if (likely(*argv)) |
47 |
-- nonl += print_escape_str("%s", NULL, NULL, *argv++); |
48 |
-- if (nonl > 0) |
49 |
-- break; |
50 |
-- |
51 |
-- c = *argv ? ' ' : '\n'; |
52 |
-- out1c(c); |
53 |
-- } while (*argv); |
54 |
-+ int i; |
55 |
-+ for (i = 1; i < argc; ++i) { |
56 |
-+ outstr(argv[i], out1); |
57 |
-+ if (i < argc - 1) |
58 |
-+ outc(' ', out1); |
59 |
-+ } |
60 |
-+ outc('\n', out1); |
61 |
- return 0; |
62 |
- } |
63 |
---- a/src/dash.1 |
64 |
-+++ b/src/dash.1 |
65 |
-@@ -1182,43 +1182,15 @@ |
66 |
- option turns off the effect of any preceding |
67 |
- .Fl P |
68 |
- options. |
69 |
--.It Xo echo Op Fl n |
70 |
-+.It Xo echo |
71 |
- .Ar args... |
72 |
- .Xc |
73 |
- Print the arguments on the standard output, separated by spaces. |
74 |
--Unless the |
75 |
--.Fl n |
76 |
--option is present, a newline is output following the arguments. |
77 |
--.Pp |
78 |
--If any of the following sequences of characters is encountered during |
79 |
--output, the sequence is not output. Instead, the specified action is |
80 |
--performed: |
81 |
--.Bl -tag -width indent |
82 |
--.It Li \eb |
83 |
--A backspace character is output. |
84 |
--.It Li \ec |
85 |
--Subsequent output is suppressed. This is normally used at the end of the |
86 |
--last argument to suppress the trailing newline that |
87 |
--.Ic echo |
88 |
--would otherwise output. |
89 |
--.It Li \ef |
90 |
--Output a form feed. |
91 |
--.It Li \en |
92 |
--Output a newline character. |
93 |
--.It Li \er |
94 |
--Output a carriage return. |
95 |
--.It Li \et |
96 |
--Output a (horizontal) tab character. |
97 |
--.It Li \ev |
98 |
--Output a vertical tab. |
99 |
--.It Li \e0 Ns Ar digits |
100 |
--Output the character whose value is given by zero to three octal digits. |
101 |
--If there are zero digits, a nul character is output. |
102 |
--.It Li \e\e |
103 |
--Output a backslash. |
104 |
--.El |
105 |
- .Pp |
106 |
--All other backslash sequences elicit undefined behaviour. |
107 |
-+No arguments or backslash sequences are supported as they are not portable. |
108 |
-+They will be printed out exactly as passed in. |
109 |
-+.Pp |
110 |
-+You can replace `echo -n ...` with the portable `printf %s ...` construct. |
111 |
- .It eval Ar string ... |
112 |
- Concatenate all the arguments with spaces. |
113 |
- Then re-parse and execute the command. |