summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2019-08-23 09:55:45 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-28 11:31:22 +0100
commit12bca525d52501e60841d8f3949ae31c0195c68a (patch)
tree50cf26de77ca0178009ea2416f4086b094d86d94 /meta
parente97ed8dcaa139b52484697d1020ba2eb2bd2b909 (diff)
downloadpoky-12bca525d52501e60841d8f3949ae31c0195c68a.tar.gz
libedit: fix failed to get history
Reproduce steps: run fileman under examples, history command not work, nothing is output. Fix by increase history_offset when add history, if not, it will make current history event not align with offset, and cannot get history correctly. (From OE-Core rev: a1ff64bee270c151532e68a5151e622de71b5321) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/libedit/libedit/0001-readline.c-fix-cannot-get-history.patch34
-rw-r--r--meta/recipes-devtools/libedit/libedit_20190324-3.1.bb1
2 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-devtools/libedit/libedit/0001-readline.c-fix-cannot-get-history.patch b/meta/recipes-devtools/libedit/libedit/0001-readline.c-fix-cannot-get-history.patch
new file mode 100644
index 0000000000..7e54ac97ea
--- /dev/null
+++ b/meta/recipes-devtools/libedit/libedit/0001-readline.c-fix-cannot-get-history.patch
@@ -0,0 +1,34 @@
1From ef1fa9bef497d9491a51017f3cad0135a23bb0b4 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Tue, 20 Aug 2019 17:33:15 +0800
4Subject: [PATCH] readline.c: fix cannot get history
5
6if history_offset not increate when add history,
7it will make current history event not align with offset,
8and cannot get history correctly.
9
10Upstream-Status: Submitted [tech-userlevel@NetBSD.org]
11
12Signed-off-by: Changqing Li <changqing.li@windriver.com>
13---
14 src/readline.c | 3 +++
15 1 file changed, 3 insertions(+)
16
17diff --git a/src/readline.c b/src/readline.c
18index 43ac5bd..54b0548 100644
19--- a/src/readline.c
20+++ b/src/readline.c
21@@ -1476,7 +1476,10 @@ add_history(const char *line)
22 if (ev.num == history_length)
23 history_base++;
24 else
25+ {
26+ history_offset++;
27 history_length = ev.num;
28+ }
29 return 0;
30 }
31
32--
332.7.4
34
diff --git a/meta/recipes-devtools/libedit/libedit_20190324-3.1.bb b/meta/recipes-devtools/libedit/libedit_20190324-3.1.bb
index 6a599ebca5..8585541186 100644
--- a/meta/recipes-devtools/libedit/libedit_20190324-3.1.bb
+++ b/meta/recipes-devtools/libedit/libedit_20190324-3.1.bb
@@ -14,6 +14,7 @@ inherit autotools
14FETCHCMD_wget += "-U bitbake" 14FETCHCMD_wget += "-U bitbake"
15SRC_URI = "http://www.thrysoee.dk/editline/${BP}.tar.gz \ 15SRC_URI = "http://www.thrysoee.dk/editline/${BP}.tar.gz \
16 file://stdc-predef.patch \ 16 file://stdc-predef.patch \
17 file://0001-readline.c-fix-cannot-get-history.patch \
17 " 18 "
18SRC_URI[md5sum] = "bec755c8044ad84b752dfe49a0b371d8" 19SRC_URI[md5sum] = "bec755c8044ad84b752dfe49a0b371d8"
19SRC_URI[sha256sum] = "ac8f0f51c1cf65492e4d1e3ed2be360bda41e54633444666422fbf393bba1bae" 20SRC_URI[sha256sum] = "ac8f0f51c1cf65492e4d1e3ed2be360bda41e54633444666422fbf393bba1bae"