[oe-commits] [openembedded-core] 25/26: libedit: fix failed to get history

git at git.openembedded.org git at git.openembedded.org
Tue Aug 27 15:57:42 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit eb8aa22e53d5dd7bf91ec43d1c50f77e42f815f6
Author: Changqing Li <changqing.li at windriver.com>
AuthorDate: Fri Aug 23 09:55:45 2019 +0800

    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.
    
    Signed-off-by: Changqing Li <changqing.li at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 .../0001-readline.c-fix-cannot-get-history.patch   | 34 ++++++++++++++++++++++
 .../libedit/libedit_20190324-3.1.bb                |  1 +
 2 files changed, 35 insertions(+)

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 0000000..7e54ac9
--- /dev/null
+++ b/meta/recipes-devtools/libedit/libedit/0001-readline.c-fix-cannot-get-history.patch
@@ -0,0 +1,34 @@
+From ef1fa9bef497d9491a51017f3cad0135a23bb0b4 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li at windriver.com>
+Date: Tue, 20 Aug 2019 17:33:15 +0800
+Subject: [PATCH] readline.c: fix cannot get history
+
+if history_offset not increate when add history,
+it will make current history event not align with offset,
+and cannot get history correctly.
+
+Upstream-Status: Submitted [tech-userlevel at NetBSD.org] 
+
+Signed-off-by: Changqing Li <changqing.li at windriver.com>
+---
+ src/readline.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/readline.c b/src/readline.c
+index 43ac5bd..54b0548 100644
+--- a/src/readline.c
++++ b/src/readline.c
+@@ -1476,7 +1476,10 @@ add_history(const char *line)
+ 	if (ev.num == history_length)
+ 		history_base++;
+ 	else
++        {
++                history_offset++;
+ 		history_length = ev.num;
++        }
+ 	return 0;
+ }
+ 
+-- 
+2.7.4
+
diff --git a/meta/recipes-devtools/libedit/libedit_20190324-3.1.bb b/meta/recipes-devtools/libedit/libedit_20190324-3.1.bb
index 6a599eb..8585541 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
 FETCHCMD_wget += "-U bitbake"
 SRC_URI = "http://www.thrysoee.dk/editline/${BP}.tar.gz \
            file://stdc-predef.patch \
+           file://0001-readline.c-fix-cannot-get-history.patch \
           "
 SRC_URI[md5sum] = "bec755c8044ad84b752dfe49a0b371d8"
 SRC_URI[sha256sum] = "ac8f0f51c1cf65492e4d1e3ed2be360bda41e54633444666422fbf393bba1bae"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list