1 |
commit: a5774d47a8ed447e046f613064e057c835f66191 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Apr 1 15:12:38 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 1 15:13:17 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a5774d47 |
7 |
|
8 |
app-editors/nano: Revbump to apply upstream fix. Removed old. |
9 |
|
10 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
.../files/nano-4.0-variable_initialization.patch | 39 ++++++++++++++++++++++ |
14 |
.../nano/{nano-4.0.ebuild => nano-4.0-r1.ebuild} | 5 +++ |
15 |
2 files changed, 44 insertions(+) |
16 |
|
17 |
diff --git a/app-editors/nano/files/nano-4.0-variable_initialization.patch b/app-editors/nano/files/nano-4.0-variable_initialization.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..c72122ed703 |
20 |
--- /dev/null |
21 |
+++ b/app-editors/nano/files/nano-4.0-variable_initialization.patch |
22 |
@@ -0,0 +1,39 @@ |
23 |
+From 7ad232d71470cd8c4dc63aeb02f11c9e8df9ecdb Mon Sep 17 00:00:00 2001 |
24 |
+From: Devin Hussey <husseydevin@×××××.com> |
25 |
+Date: Thu, 28 Mar 2019 17:28:47 -0400 |
26 |
+Subject: [PATCH] files: initialize a variable before referencing it |
27 |
+ |
28 |
+The lack of initialization caused a nasty bug on some targets (such as |
29 |
+ARMv7) which would make it so that ^S would just say "Cancelled". |
30 |
+ |
31 |
+While x86 (both 64 and 32 bits) seems to initialize 'response' to zero or |
32 |
+a positive number, ARM does not, and there is usually a negative value in |
33 |
+its place, which triggers the 'if (response < 0)' check and, as a result, |
34 |
+the code says "Cancelled". |
35 |
+ |
36 |
+This fixes https://savannah.gnu.org/bugs/?56023. |
37 |
+Reported-by: Devin Hussey <husseydevin@×××××.com> |
38 |
+ |
39 |
+Bug existed since version 4.0, commit 0f9d60a3. |
40 |
+ |
41 |
+Signed-off-by: Devin Hussey <husseydevin@×××××.com> |
42 |
+--- |
43 |
+ src/files.c | 2 +- |
44 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
45 |
+ |
46 |
+diff --git a/src/files.c b/src/files.c |
47 |
+index 84e3f684..fd54c168 100644 |
48 |
+--- a/src/files.c |
49 |
++++ b/src/files.c |
50 |
+@@ -2101,7 +2101,7 @@ int do_writeout(bool exiting, bool withprompt) |
51 |
+ |
52 |
+ while (TRUE) { |
53 |
+ const char *msg; |
54 |
+- int response, choice; |
55 |
++ int response = 0, choice = 0; |
56 |
+ functionptrtype func; |
57 |
+ #ifndef NANO_TINY |
58 |
+ const char *formatstr, *backupstr; |
59 |
+-- |
60 |
+2.20.1 |
61 |
+ |
62 |
|
63 |
diff --git a/app-editors/nano/nano-4.0.ebuild b/app-editors/nano/nano-4.0-r1.ebuild |
64 |
similarity index 97% |
65 |
rename from app-editors/nano/nano-4.0.ebuild |
66 |
rename to app-editors/nano/nano-4.0-r1.ebuild |
67 |
index aa130516a9a..05e4012530b 100644 |
68 |
--- a/app-editors/nano/nano-4.0.ebuild |
69 |
+++ b/app-editors/nano/nano-4.0-r1.ebuild |
70 |
@@ -32,6 +32,11 @@ BDEPEND=" |
71 |
nls? ( sys-devel/gettext ) |
72 |
virtual/pkgconfig |
73 |
" |
74 |
+ |
75 |
+PATCHES=( |
76 |
+ "${FILESDIR}/${P}-variable_initialization.patch" |
77 |
+) |
78 |
+ |
79 |
src_prepare() { |
80 |
default |
81 |
if [[ ${PV} == "9999" ]] ; then |