Problem found during work on bug 5828. Apparently, in GUI mode, tl-setup calls the "init" function of a certain module very early, before any other functions. However, in text mode, the "checks" are executed first, then the init function. This means that some code might fail. As of writing, the latest version of lsb.py (r31638) is broken on GUI mode due to this problem.
Actually, "init" is a package installer thing and not something fundamental in tl-setup. It does however end up being called at different times because of how tl-setup works: - In GUI mode the module handler is expected to register its GUI elements, and hence every module is called right at the start. - In text mode there is no need to register things beforehand, so the handler is called when it is its turn and can do the interaction right away. The problem occurs because the package installer calls the init function right away[1], rather than when it is time to do something. We could have it trigger on display instead, or update the package list after the check has been run. [1] Which is odd, why not just have the result as an argument in that case?
Should be restructured properly now. Actual effects are tested on bug 5980. However, I've tested here that everything otherwise still works. Tested tl-setup on RHEL 8 and Ubuntu 20.04: Ubuntu 20.04: - ghostscript - libnss3 - libnspr4 - nfs-common - python3-ldap RHEL 8: - xauth - libX11 - ghostscript - nss - nspr - postfix - nfs-utils - python3-gobject - gtk3 - python3-ldap - selinux-policy-devel
The fix for this bug restructures much of user interface code for package installation in tl-setup. We thus need to test *at least* these two scenarios: 1. That tl-setup correctly installs all required packages 2. That tl-setup does not ask about installing packages that are already installed The testing is to be performed in both GUI- and text-mode.
tl-setup crashes on openSuSE Leap 15.3 with the following stack trace during the GTK step: > 2021-08-16 09:43:34,826: Traceback (most recent call last): > 2021-08-16 09:43:34,826: File "/opt/thinlinc/sbin/../libexec/tl-setup.py", line 303, in <module> > 2021-08-16 09:43:34,826: oOoO00 ( ) > 2021-08-16 09:43:34,826: File "/opt/thinlinc/sbin/../libexec/tl-setup.py", line 259, in oOoO00 > 2021-08-16 09:43:34,827: I11 = O00oOoo0 . run ( ) > 2021-08-16 09:43:34,827: File "/opt/thinlinc/modules/thinlinc/wizard.py", line 99, in run > 2021-08-16 09:43:34,827: return self . _run_text ( ) > 2021-08-16 09:43:34,827: File "/opt/thinlinc/modules/thinlinc/wizard.py", line 117, in _run_text > 2021-08-16 09:43:34,827: Oo0O0o0oO000 ( ) > 2021-08-16 09:43:34,827: File "/opt/thinlinc/modules/thinlinc/tlsetup/requirements.py", line 191, in <lambda> > 2021-08-16 09:43:34,827: i1ii1 ) > 2021-08-16 09:43:34,827: File "/opt/thinlinc/modules/thinlinc/tlsetup/pkginsthelp.py", line 61, in generic_text_installer > 2021-08-16 09:43:34,827: o0O0ooOoo00o = IIii . run ( ) > 2021-08-16 09:43:34,827: File "/opt/thinlinc/modules/thinlinc/tlsetup/pkginsthelp.py", line 420, in run > 2021-08-16 09:43:34,827: if IiIi1I11I is None or len ( Ooo000oo0O00o ) == 0 : > 2021-08-16 09:43:34,828: TypeError: object of type 'NoneType' has no len() This is a regression.
I have tested the fix (Jenkins server build #2248) for the issue highlighted in comment 8: - [4/4] Ubuntu 20.04 LTS - [X] Running graphical tl-setup on a fresh system - [X] Running text-mode tl-setup on a fresh system - [X] Rerunning graphical tl-setup after all dependencies have already been installed - [X] Rerunning text-mode tl-setup after all dependencies have already been installed - [4/4] openSUSE Leap 15.3 - [X] Running graphical tl-setup on a fresh system - [X] Running text-mode tl-setup on a fresh system - [X] Rerunning graphical tl-setup after all dependencies have already been installed - [X] Rerunning text-mode tl-setup after all dependencies have already been installed Marking as resolved.
The issue in comment #8 could in theory happen in GUI mode also, but looking at the code this seems to have been missed. This was not found in the testing since the package that triggered the issue was GTK+. You need to manually install that to run GUI mode in the first place, thus circumvent the problem.
Ok, so apparently we have another crash in the GUI code. Steps to reproduce: 1. Start a minimal openSUSE Leap 15.3 machine 2. Install gnome =sudo zypper install -t pattern gnome_basic= 3. Remove ghostscript =sudo zypper remove ghostscript= 4. Install a recent build of the ThinLinc server 5. Run tl-setup in GUI-mode and we will crash on "Library and binary requirements"
The issue has now been fixed.
Created attachment 987 [details] packages installed by tl-setup Looks good. I tested both text and GUI mode on OpenSUSE Leap 15.3, Fedora 34, RHEL 7 and Ubuntu 18.04. The packages that were installed looked sane. I created an attachment that shows all the installed packages on these distros.
Used the tl-4.13.0rc2 server for testing.