summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorLi Zhou <li.zhou@windriver.com>2019-07-01 10:07:16 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-07-02 08:13:07 +0100
commit223885877370513e643c98f573b42a62c69145ce (patch)
treec1a5ab849d0bf49a181dec820189090bfee4ec6e /meta/recipes-extended
parentdad470264ab471848acd88ce9a3f883275bb1942 (diff)
downloadpoky-223885877370513e643c98f573b42a62c69145ce.tar.gz
bc: dc: fix exit code of q command
The exit code for "echo q | dc" is 1 for dc-1.4.1; while the exit code for "echo q | dc" is 0 for dc-1.4. Here is the answer from ken@gnu.org: dc-1.4 was right. There was a rewrite of a chunk of code for 1.4.1 to fix a corner case in the Q command, and somehow the placement of the clean-up label for the 'q' command got misplaced on the error-handling branch instead of the clean-exit branch. The patch below fixes this (it is committed for whenever the next bc/dc release gets made). Thanks for the report, --Ken Pizzini (From OE-Core rev: ab16d9ccaf824fbda5e43c5b3cbdc43ec70be87f) Signed-off-by: Li Zhou <li.zhou@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/bc/bc/0001-dc-fix-exit-code-of-q-command.patch44
-rw-r--r--meta/recipes-extended/bc/bc_1.07.1.bb3
2 files changed, 46 insertions, 1 deletions
diff --git a/meta/recipes-extended/bc/bc/0001-dc-fix-exit-code-of-q-command.patch b/meta/recipes-extended/bc/bc/0001-dc-fix-exit-code-of-q-command.patch
new file mode 100644
index 0000000000..1ef797dd66
--- /dev/null
+++ b/meta/recipes-extended/bc/bc/0001-dc-fix-exit-code-of-q-command.patch
@@ -0,0 +1,44 @@
1From e174b6e7d195d5a7465575641b7f68581f162574 Mon Sep 17 00:00:00 2001
2From: Li Zhou <li.zhou@windriver.com>
3Date: Thu, 27 Jun 2019 13:10:47 +0800
4Subject: [PATCH] dc: fix exit code of q command
5
6The exit code for "echo q | dc" is 1 for dc-1.4.1;
7while the exit code for "echo q | dc" is 0 for dc-1.4.
8
9Here is the answer from ken@gnu.org:
10dc-1.4 was right. There was a rewrite of a chunk of code for 1.4.1 to
11fix a corner case in the Q command, and somehow the placement of the
12clean-up label for the 'q' command got misplaced on the error-handling
13branch instead of the clean-exit branch. The patch below fixes this
14(it is committed for whenever the next bc/dc release gets made).
15
16Thanks for the report,
17 --Ken Pizzini
18
19Upstream-Status: Backport [Got the solution from maintainer]
20
21Signed-off-by: Li Zhou <li.zhou@windriver.com>
22---
23 dc/eval.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26diff --git a/dc/eval.c b/dc/eval.c
27index 05a3d9e..bcab8db 100644
28--- a/dc/eval.c
29+++ b/dc/eval.c
30@@ -814,10 +814,10 @@ error_fail:
31 fprintf(stderr, "%s: ", progname);
32 perror("error reading input");
33 return DC_FAIL;
34-reset_and_exit_quit:
35 reset_and_exit_fail:
36 signal(SIGINT, sigint_default);
37 return DC_FAIL;
38+reset_and_exit_quit:
39 reset_and_exit_success:
40 signal(SIGINT, sigint_default);
41 return DC_SUCCESS;
42--
431.9.1
44
diff --git a/meta/recipes-extended/bc/bc_1.07.1.bb b/meta/recipes-extended/bc/bc_1.07.1.bb
index 809b864c1a..4a51302492 100644
--- a/meta/recipes-extended/bc/bc_1.07.1.bb
+++ b/meta/recipes-extended/bc/bc_1.07.1.bb
@@ -13,7 +13,8 @@ DEPENDS = "flex-native"
13 13
14SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ 14SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
15 file://no-gen-libmath.patch \ 15 file://no-gen-libmath.patch \
16 file://libmath.h" 16 file://libmath.h \
17 file://0001-dc-fix-exit-code-of-q-command.patch"
17SRC_URI[md5sum] = "cda93857418655ea43590736fc3ca9fc" 18SRC_URI[md5sum] = "cda93857418655ea43590736fc3ca9fc"
18SRC_URI[sha256sum] = "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a" 19SRC_URI[sha256sum] = "62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a"
19 20