From: "João Henrique Ferreira de Freitas" <joaohf@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: "João Henrique Ferreira de Freitas" <joaohf@gmail.com>
Subject: [PATCH] readline: backport a patch to fix for caller setting rl_prompt to NULL
Date: Thu, 30 Oct 2025 16:35:25 -0300 [thread overview]
Message-ID: <20251030193525.866305-1-joaohf@gmail.com> (raw)
I've observed this issue affecting iwctl and connmanctl.
Patching readline solves the issue.
References:
1: https://gitlab.archlinux.org/archlinux/packaging/packages/readline/-/issues/1
2: https://gitlab.archlinux.org/archlinux/packaging/packages/readline/-/commit/b30636dc66fc783a091af51b049dc5240f861dd0
3: https://lists.gnu.org/archive/html/bug-readline/2025-07/msg00007.html
4: https://lore.kernel.org/connman/20251018212411.181909-1-jsbronder@cold-front.org/
Fixes [YOCTO #16047]
Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
---
...for-caller-setting-rl_prompt-to-NULL.patch | 24 +++++++++++++++++++
meta/recipes-core/readline/readline_8.3.bb | 5 ++--
2 files changed, 27 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-core/readline/readline/fix-for-caller-setting-rl_prompt-to-NULL.patch
diff --git a/meta/recipes-core/readline/readline/fix-for-caller-setting-rl_prompt-to-NULL.patch b/meta/recipes-core/readline/readline/fix-for-caller-setting-rl_prompt-to-NULL.patch
new file mode 100644
index 0000000000..7cc366079a
--- /dev/null
+++ b/meta/recipes-core/readline/readline/fix-for-caller-setting-rl_prompt-to-NULL.patch
@@ -0,0 +1,24 @@
+From 7c1019182f928ca05e794aecd06c33a27b7d07b1 Mon Sep 17 00:00:00 2001
+From: kas User <kas@example.com>
+Date: Thu, 30 Oct 2025 14:19:41 -0300
+Subject: [PATCH] fix for caller setting rl_prompt to NULL
+
+Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/readline.git/commit/display.c?h=devel&id=488d7edc22894d30b6de7f2d4190bf7403f63ffd]
+Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
+---
+ display.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/display.c b/display.c
+index 9aa8c7b..edb525d 100644
+--- a/display.c
++++ b/display.c
+@@ -783,7 +783,7 @@ _rl_optimize_redisplay (void)
+
+ /* Useful shorthand used by rl_redisplay, update_line, rl_move_cursor_relative */
+ #define INVIS_FIRST() (local_prompt_invis_chars[0])
+-#define WRAP_OFFSET(line, offset) ((line <= prompt_last_screen_line) ? local_prompt_invis_chars[line] : 0)
++#define WRAP_OFFSET(line, offset) ((line <= prompt_last_screen_line && local_prompt_invis_chars) ? local_prompt_invis_chars[line] : 0)
+
+ #define W_OFFSET(line, offset) ((line) == 0 ? offset : 0)
+ #define VIS_LLEN(l) ((l) > _rl_vis_botlin ? 0 : (vis_lbreaks[l+1] - vis_lbreaks[l]))
diff --git a/meta/recipes-core/readline/readline_8.3.bb b/meta/recipes-core/readline/readline_8.3.bb
index a2f23eb353..8bc4477946 100644
--- a/meta/recipes-core/readline/readline_8.3.bb
+++ b/meta/recipes-core/readline/readline_8.3.bb
@@ -1,7 +1,8 @@
require readline.inc
SRC_URI += "file://norpath.patch \
- file://fix-for-readline-event-hook.patch \
- "
+ file://fix-for-readline-event-hook.patch \
+ file://fix-for-caller-setting-rl_prompt-to-NULL.patch \
+ "
SRC_URI[archive.sha256sum] = "fe5383204467828cd495ee8d1d3c037a7eba1389c22bc6a041f627976f9061cc"
next reply other threads:[~2025-10-30 19:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-30 19:35 João Henrique Ferreira de Freitas [this message]
2025-10-31 12:39 ` [OE-core] [PATCH] readline: backport a patch to fix for caller setting rl_prompt to NULL Jose Quaresma
[not found] ` <187393CCE6182CD0.23165@lists.openembedded.org>
2025-10-31 12:51 ` Jose Quaresma
2025-10-31 15:27 ` João Henrique Freitas
2025-10-31 16:03 ` Jose Quaresma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251030193525.866305-1-joaohf@gmail.com \
--to=joaohf@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox