Bug#1028231: unibilium: parse-terminfo test uses wrong terminfo directory
Control: found -1 2.1.0-2 On 2023-06-20 10:05 -0400, James McCoy wrote: > On Mon, Jun 19, 2023 at 09:42:39PM +0200, Sven Joachim wrote: >> FYI, the ncurses-base package in experimental has moved the terminfo >> files to /usr/share/terminfo, and indeed the parse-terminfo autopkgtest >> does not do anything[1]. Maybe it is time to upload the pending fixes, >> now that Bookworm has been released? > > Thanks for the reminder! I'll do that soon. Thanks for the upload! Unfortunately I managed to botch the test, and on [1] you can see that the autopkgtest still does nothing with ncurses-base from experimental :-(. The attached patch takes care of that, and I have also created a new merge request[2]. Sorry for the inconvenience. Cheers, Sven 1. https://ci.debian.net/data/autopkgtest/unstable/amd64/u/unibilium/34691146/log.gz 2. https://salsa.debian.org/jamessan/unibilium/-/merge_requests/4 From 4adbb343c2c1cd69ed59d673b83c4bcf797d2b25 Mon Sep 17 00:00:00 2001 From: Sven Joachim Date: Thu, 22 Jun 2023 11:48:40 +0200 Subject: [PATCH] autopkgtest: Fix path to terminfo files Contrary to what the commit message said, commit 1ee72606 did not look up the terminfo files under /usr/share/terminfo, but rather directly under /usr/share where they cannot be found. Closes: #1028231 --- debian/tests/parse-terminfo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/tests/parse-terminfo b/debian/tests/parse-terminfo index 042a80e..0e2f81b 100755 --- a/debian/tests/parse-terminfo +++ b/debian/tests/parse-terminfo @@ -10,7 +10,7 @@ FAIL=0 TESTS=0 for term in ansi xterm screen rxvt-unicode; do libterm=/lib/terminfo/${term%${term#?}}/${term} - usrterm=/usr/share/${term%${term#?}}/${term} + usrterm=/usr/share/terminfo/${term%${term#?}}/${term} if [ -e "$libterm" ]; then printf "# Parsing $libterm ...\\n" TESTS=$((TESTS + 1)) -- 2.40.1
Bug#1028231: unibilium: parse-terminfo test uses wrong terminfo directory
On Mon, Jun 19, 2023 at 09:42:39PM +0200, Sven Joachim wrote: > FYI, the ncurses-base package in experimental has moved the terminfo > files to /usr/share/terminfo, and indeed the parse-terminfo autopkgtest > does not do anything[1]. Maybe it is time to upload the pending fixes, > now that Bookworm has been released? Thanks for the reminder! I'll do that soon. Cheers, -- James GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7 2D23 DFE6 91AE 331B A3DB
Bug#1028231: unibilium: parse-terminfo test uses wrong terminfo directory
On 2023-01-08 18:17 +0100, Sven Joachim wrote: > Source: unibilium > Version: 2.1.0-1 > > The parse-terminfo autopkgtest uses a wrong directory for terminfo files > below /usr: > > , > | for term in ansi xterm screen rxvt-unicode; do > | libterm=/lib/terminfo/${term%${term#?}}/${term} > | usrterm=/usr/${libterm} > ` > > The (bulk of the) terminfo database is located below /usr/share/terminfo > rather than /usr/lib/terminfo. For now this does not matter as we > install the basic terminfo files in ncurses-base under /lib/terminfo, > but after the Bookworm release I plan to relocate them to > /usr/share/terminfo, see https://bugs.debian.org/1028202. Once that > happens, your test will still succeed but not do anything, if I read it > correctly. FYI, the ncurses-base package in experimental has moved the terminfo files to /usr/share/terminfo, and indeed the parse-terminfo autopkgtest does not do anything[1]. Maybe it is time to upload the pending fixes, now that Bookworm has been released? Cheers, Sven 1. https://ci.debian.net/data/autopkgtest/unstable/amd64/u/unibilium/34445754/log.gz
Bug#1028231: unibilium: parse-terminfo test uses wrong terminfo directory
Control: tags -1 + patch On 2023-01-08 18:17 +0100, Sven Joachim wrote: > Source: unibilium > Version: 2.1.0-1 > > The parse-terminfo autopkgtest uses a wrong directory for terminfo files > below /usr: > > , > | for term in ansi xterm screen rxvt-unicode; do > | libterm=/lib/terminfo/${term%${term#?}}/${term} > | usrterm=/usr/${libterm} > ` > > The (bulk of the) terminfo database is located below /usr/share/terminfo > rather than /usr/lib/terminfo. For now this does not matter as we > install the basic terminfo files in ncurses-base under /lib/terminfo, > but after the Bookworm release I plan to relocate them to > /usr/share/terminfo, see https://bugs.debian.org/1028202. Once that > happens, your test will still succeed but not do anything, if I read it > correctly. That seems to be quite easily fixed with a one-liner. From 1ee726065fbffa0da996e2ab4663f0d7c82c807e Mon Sep 17 00:00:00 2001 From: Sven Joachim Date: Wed, 11 Jan 2023 17:26:33 +0100 Subject: [PATCH 1/2] autopkgtest: Look for terminfo files under /usr/share/terminfo The terminfo database in Debian is distributed among the directories /lib/terminfo (ncurses-base) and /usr/share/terminfo (ncurses-term), future releases might relocate all terminfo files to /usr/share/terminfo as per https://bugs.debian.org/1028202. Closes: #1028231 --- debian/tests/parse-terminfo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/tests/parse-terminfo b/debian/tests/parse-terminfo index 43c4fee..36ae634 100755 --- a/debian/tests/parse-terminfo +++ b/debian/tests/parse-terminfo @@ -10,7 +10,7 @@ FAIL=0 TESTS=0 for term in ansi xterm screen rxvt-unicode; do libterm=/lib/terminfo/${term%${term#?}}/${term} - usrterm=/usr/${libterm} + usrterm=/usr/share/${term%${term#?}}/${term} if [ -e "$libterm" ]; then printf "# Parsing $libterm ...\\n" TESTS=$((TESTS + 1)) -- 2.39.0 > There is also a flawed logic in the parse-terminfo script, it expects > that any foo-256color terminfo entry is located at the same place as its > foo counterpart. For the terminfo entries tested this currently holds > true, but it is not guaranteed as long as the terminfo files are split > among multiple directories. I have attempted to fix that logic with the patch below, and created a merge request on Salsa: https://salsa.debian.org/jamessan/unibilium/-/merge_requests/2. Cheers, Sven From a1e47a6c605ad84c9a983b80ff411d13d9b6b4d1 Mon Sep 17 00:00:00 2001 From: Sven Joachim Date: Wed, 11 Jan 2023 17:36:05 +0100 Subject: [PATCH 2/2] autopkgtest: Fix logic to find -256color terminfo entries The code assumed that a terminfo entry and its -256color pendant always exits in the same directory, which is not guaranteed. --- debian/tests/parse-terminfo | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/debian/tests/parse-terminfo b/debian/tests/parse-terminfo index 36ae634..042a80e 100755 --- a/debian/tests/parse-terminfo +++ b/debian/tests/parse-terminfo @@ -15,20 +15,19 @@ for term in ansi xterm screen rxvt-unicode; do printf "# Parsing $libterm ...\\n" TESTS=$((TESTS + 1)) ./tdump "$libterm" || FAIL=1 -if [ -e "${libterm}-256color" ]; then - printf "# Parsing ${libterm}-256color ...\\n" - TESTS=$((TESTS + 1)) - ./tdump "${libterm}-256color" || FAIL=1 -fi elif [ -e "$usrterm" ]; then printf "# Parsing $usrterm ...\\n" TESTS=$((TESTS + 1)) ./tdump "$usrterm" || FAIL=1 -if [ -e "${usrterm}-256color" ]; then - printf "# Parsing ${usrterm}-256color ...\\n" - TESTS=$((TESTS + 1)) - ./tdump "${usrterm}-256color" || FAIL=1 -fi + fi + if [ -e "${libterm}-256color" ]; then +printf "# Parsing ${libterm}-256color ...\\n" +TESTS=$((TESTS + 1)) +./tdump "${libterm}-256color" || FAIL=1 + elif [ -e "${usrterm}-256color" ]; then +printf "# Parsing ${usrterm}-256color ...\\n" +TESTS=$((TESTS + 1)) +./tdump "${usrterm}-256color" || FAIL=1 fi done printf "1..${TESTS}\\n" -- 2.39.0
Bug#1028231: unibilium: parse-terminfo test uses wrong terminfo directory
Source: unibilium Version: 2.1.0-1 The parse-terminfo autopkgtest uses a wrong directory for terminfo files below /usr: , | for term in ansi xterm screen rxvt-unicode; do | libterm=/lib/terminfo/${term%${term#?}}/${term} | usrterm=/usr/${libterm} ` The (bulk of the) terminfo database is located below /usr/share/terminfo rather than /usr/lib/terminfo. For now this does not matter as we install the basic terminfo files in ncurses-base under /lib/terminfo, but after the Bookworm release I plan to relocate them to /usr/share/terminfo, see https://bugs.debian.org/1028202. Once that happens, your test will still succeed but not do anything, if I read it correctly. There is also a flawed logic in the parse-terminfo script, it expects that any foo-256color terminfo entry is located at the same place as its foo counterpart. For the terminfo entries tested this currently holds true, but it is not guaranteed as long as the terminfo files are split among multiple directories.