www.cendio.com
Bug 5985 - tl-setup calls checks/init functions in different orders in GUI and text mode
: tl-setup calls checks/init functions in different orders in GUI and text mode
Status: NEW
: ThinLinc
Misc
: trunk
: PC Unknown
: P2 Normal
: Next
Assigned To:
:
:
:
: 5980
  Show dependency treegraph
 
Reported: 2016-09-12 09:57 by
Modified: 2016-09-19 10:34 (History)
Acceptance Criteria:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From cendio 2016-09-12 09:57:45
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.
------- Comment #2 From cendio 2016-09-19 10:34:58 -------
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?