Created attachment 394308 [details] emerge --info for bsd-games The problem is not with cribbage, but the symptom is. I hope the bug wrangler can get it to the right place. The cribbage game gives a series of prompts and status messages. As soon as I touch a valid key in response, the prompt is eradicated and the response remains. The prompt should not be erased in a proper version of the game. At least, not until is scrolled past several moves later. I have an old version of Debian on my alpha. The Debian cribbage plays correctly from Debian. The Debian cribbage plays wrongly from Gentoo. The Gentoo cribbage plays correctly in Debian. The Gentoo cribbage plays wrongly in Gentoo. The Debian installation is a few years old. It's linux 2.6.x and has libc-2.7.so and libncurses.so.5.7. My Gentoo installation is pretty recent. It's linux 3.17.4-gentoo, with libc-2.15.so and libncurses.so.5.9 This problem has manifested itself on all versions of Gentoo I've used. I used a separate Gentoo installation to enable a backtrace, but I lack the knowledge to properly acquire/interpret such data. I don't know if any alpha developers play cribbage. Please let me know how I can help pinpoint the cause. Cribbage is small, but its dependencies are pretty fundamental. Thanks.
To clarify, the responses are not erased. The prompt is erased. For example: *Cut to see whose crib it is -- low card wins?_ When a number is entered, the prompt should remain, like: *Cut to see whose crib it is -- low card wins?23 But, the prompt disappears when a number it touched, leaving: *23 FWIW, the first two prompts are not affected. Those are asking if the player wants instructions and a long/short game. The improper erasures begin with the third prompt (the cut) and continue there forward.
I just tried on my amd64 machine and the opening dialogue looks like this: Do you need instructions for cribbage? N Long (to 121) or Short (to 61)? L *5 wins? So there is some breakage in how cribbage uses the terminal, but it is not Alpha-specific. Cribbage uses ncurses, so the bug might be in the interaction between it and the terminal library. Removing Alpha from CC, since it's reproducible on amd64.
I'm no programmer, but I looked around the internet for the cribbage source. The cribbage io.c code has a part that reads: /* loop reading in the string, and put it in a temporary buffer */ for (sp = linebuf; (c = readchar()) != '\n'; clrtoeol(), refresh()) { I'd speculate that the problem is there. The clrtoeol() function is from ncurses. It looks like the clrtoeol() function is supposed to clear from the cursor to the end of line. In this bug, the part on the left I call the prompt is removed too. Since the cribbage program works on an older installation, perhaps an ncurses update is what caused this problem. If it is ncurses, I'd like to refer the problem to their developers. I don't know how to confirm my speculation before I do such a thing. I'm changing hardware to ALL, since it happens on amd64 too. I built a 32 bit ncurses library for my own amd64 Gentoo multilib installation, but an old 32 bit cribbage showed the same bug. That was useless. Slackware64 cribbage is broken too, ha ha. The Gentoo developers may have bigger bugs to wrangle. The backtrace is a mystery to me and might not be useful anyway. Can anyone refer me somewhere for help on proving whether it's ncurses or not? I can't imagine why an ncurses bug would only show up in cribbage. Thanks, DW
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6898e5b44450c1c69205203bc8f9d1ee3f9b08d3 commit 6898e5b44450c1c69205203bc8f9d1ee3f9b08d3 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-03-31 17:56:11 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-03-31 23:38:45 +0000 games-misc/bsd-games: add 3.1 This is a fork of bsd-games after many years. Thanks to the new maintainer upstream for reaching out to us. Closes: https://bugs.gentoo.org/732374 Bug: https://bugs.gentoo.org/537010 Bug: https://bugs.gentoo.org/715778 Signed-off-by: Sam James <sam@gentoo.org> games-misc/bsd-games/Manifest | 2 + games-misc/bsd-games/bsd-games-3.1.ebuild | 151 +++++++++++++++++++++ ...mes-3.1-no-install-manpages-automatically.patch | 15 ++ 3 files changed, 168 insertions(+) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c13ca36bf039e92078a64b63d84d04949948ef4 commit 0c13ca36bf039e92078a64b63d84d04949948ef4 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-03-31 20:28:10 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-03-31 23:38:44 +0000 games-misc/bsd-games: add 2.17_p28 Upgrade to new Debian patchset (p28) which may help resolve some of the open bugs. It's also a nice stopgap because the new fork upstream drops some games and it means we don't take as big of a risk when simply porting away from games.eclass. (Not dumping games.eclass *AND* choosing a new upstream all at once, with no option for users to downgrade.) Bug: https://bugs.gentoo.org/732374 Bug: https://bugs.gentoo.org/537010 Bug: https://bugs.gentoo.org/715778 Signed-off-by: Sam James <sam@gentoo.org> games-misc/bsd-games/Manifest | 2 + games-misc/bsd-games/bsd-games-2.17_p28.ebuild | 155 +++++++++++++++++++++ .../bsd-games-2.17-rename-getdate-clash.patch | 39 ++++++ 3 files changed, 196 insertions(+)
Still an issue?
The problem has not been resolved with the cribbage game. My gentoo system is up to date on my AMD64 machine and cribbage is still broken. Presumably, all linux versions have the same problem. I've tried three different ones. I'm not a developer. I can say that it happened when ncurses updated its version way back then. I wish the linux developers had a buddy who plays with OpenBSD. It's the same code and their version still works.