Bug#1030054: kitty: build-time test failures in some environments

2023-01-30 Thread James McCoy
On Mon, Jan 30, 2023 at 11:31:56AM -0800, Steve Langasek wrote:
> [...]
> ==
> ERROR: test_ssh_shell_integration (kitty_tests.ssh.SSHKitten)
> --
> Traceback (most recent call last):
>   File "/<>/kitty/launcher/../../kitty_tests/ssh.py", line 239, 
> in test_ssh_shell_integration
> pty.wait_till(lambda: 'kitty=fruity' in pty.screen_contents())
> login_shell = 'bash'
> num_lines = 2
> ok_login_shell = 'bash'
> pty = 
> self = 
> sh = 'dash'
> tdir = '/tmp/tmpct5s6c0x'
> val = ''
>   File "/<>/kitty/launcher/../../kitty_tests/__init__.py", line 
> 297, in wait_till
> raise TimeoutError(f'The condition was not met. Screen contents: \n 
> {repr(self.screen_contents())}')
> end_time = 1963.133780143
> q = . at 
> 0x7fd0c33475b0>
> self = 
> TimeoutError: The condition was not met. Screen contents: 
>  'UNTAR_DONE\nbuildd@lcy02-amd64-004:~$ echo 
> "$TERM=fruity"\nunknown=fruity\nbuildd@lcy02-amd64-004:~$ '
> 
> [...]
> 
>   (https://launchpad.net/ubuntu/+source/kitty/0.26.5-2/+build/25419959)
> 
> It appears this works in Debian but not in Ubuntu because Debian's builders
> have an empty $TERM in the build environment, whereas Ubuntu has it set by
> default to 'unknown' (as shown above).

This sounds like the issue I filed upstream[0].  I can cherry-pick the
fix[1] Kovid made.

[0]: https://github.com/kovidgoyal/kitty/issues/5852
[1]: 
https://github.com/kovidgoyal/kitty/commit/e2543e8968496223d760f403b9c683c484f02d2c

Cheers,
-- 
James
GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7  2D23 DFE6 91AE 331B A3DB


signature.asc
Description: PGP signature


Bug#1030054: kitty: build-time test failures in some environments

2023-01-30 Thread Steve Langasek
Package: kitty
Followup-For: Bug #1030054
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu lunar ubuntu-patch
Control: tags -1 patch

See attached patch.

Thanks,
-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developer   https://www.debian.org/
slanga...@ubuntu.com vor...@debian.org
diff -Nru kitty-0.26.5/debian/rules kitty-0.26.5/debian/rules
--- kitty-0.26.5/debian/rules   2023-01-04 03:14:15.0 -0800
+++ kitty-0.26.5/debian/rules   2023-01-30 11:29:49.0 -0800
@@ -30,8 +30,8 @@
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
mkdir -p "$(HOME)"
mkdir -p "$(KITTY_RUNTIME_DIRECTORY)"
-   env HOME="$(HOME)" KITTY_RUNTIME_DIRECTORY="$(KITTY_RUNTIME_DIRECTORY)" 
python3 setup.py $(V) build-launcher
-   env HOME="$(HOME)" KITTY_RUNTIME_DIRECTORY="$(KITTY_RUNTIME_DIRECTORY)" 
LC_ALL=C.UTF-8 python3 setup.py $(V) test
+   env HOME="$(HOME)" TERM= 
KITTY_RUNTIME_DIRECTORY="$(KITTY_RUNTIME_DIRECTORY)" python3 setup.py $(V) 
build-launcher
+   env HOME="$(HOME)" TERM= 
KITTY_RUNTIME_DIRECTORY="$(KITTY_RUNTIME_DIRECTORY)" LC_ALL=C.UTF-8 python3 
setup.py $(V) test
 endif
 
 override_dh_auto_install:


Bug#1030054: kitty: build-time test failures in some environments

2023-01-30 Thread Steve Langasek
Source: kitty
Version: 0.26.5-2
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu lunar

Hi James,

Since version 0.26.5, kitty has been failing to build from source on Ubuntu
with test failures, even though it builds fine on Debian:

[...]
==
ERROR: test_ssh_shell_integration (kitty_tests.ssh.SSHKitten)
--
Traceback (most recent call last):
  File "/<>/kitty/launcher/../../kitty_tests/ssh.py", line 239, in 
test_ssh_shell_integration
pty.wait_till(lambda: 'kitty=fruity' in pty.screen_contents())
login_shell = 'bash'
num_lines = 2
ok_login_shell = 'bash'
pty = 
self = 
sh = 'dash'
tdir = '/tmp/tmpct5s6c0x'
val = ''
  File "/<>/kitty/launcher/../../kitty_tests/__init__.py", line 
297, in wait_till
raise TimeoutError(f'The condition was not met. Screen contents: \n 
{repr(self.screen_contents())}')
end_time = 1963.133780143
q = . at 
0x7fd0c33475b0>
self = 
TimeoutError: The condition was not met. Screen contents: 
 'UNTAR_DONE\nbuildd@lcy02-amd64-004:~$ echo 
"$TERM=fruity"\nunknown=fruity\nbuildd@lcy02-amd64-004:~$ '

[...]

  (https://launchpad.net/ubuntu/+source/kitty/0.26.5-2/+build/25419959)

It appears this works in Debian but not in Ubuntu because Debian's builders
have an empty $TERM in the build environment, whereas Ubuntu has it set by
default to 'unknown' (as shown above).  But if I build this in either a
Debian or Ubuntu chroot locally, the test fails because of a non-empty TERM
in the environment, causing this test to fail.

Since this only concerns the behavior of a test rather than a problem with
the package's code, it seems the appropriate fix is to set TERM= in the
environment when calling the tests.

-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developer   https://www.debian.org/
slanga...@ubuntu.com vor...@debian.org


signature.asc
Description: PGP signature