Commit Graph

81 Commits

Author SHA1 Message Date
Michael Hudson-Doyle f2918fa30b
Merge pull request #550 from mwhudson/reprobe-block-devices-on-shell-exit
Reprobe block devices on debug shell exit
2019-10-09 15:37:23 +13:00
Dimitri John Ledkov 3e39db4013 Asciify color pallete 2019-10-07 22:30:23 +01:00
Dimitri John Ledkov 3f548665e1 Add ASCII mode 2019-10-04 17:17:26 +01:00
Michael Hudson-Doyle 7a3a88ab0c add a signal that is fired when a debug shell exits 2019-10-04 15:10:11 +13:00
Michael Hudson-Doyle 36cdf0effd some better names 2019-10-04 13:39:39 +13:00
Michael Hudson-Doyle 415db68e36 always use vt100 codes for white/black/default
For maximum compatibility in mono mode.
2019-10-04 13:39:39 +13:00
Michael Hudson-Doyle cea3a65ca1 refactor how palettes and colors and screens are set up 2019-10-04 13:39:39 +13:00
Michael Hudson-Doyle 29c9e0c984 add a hot key (f4) for turning color on and off 2019-10-04 13:39:39 +13:00
Michael Hudson-Doyle 93732dfb73 fix run_command_in_foreground to disconnect from stdin while in backgound
Not sure how I didn't notice this when implementing it for the first
time but well. This is all fairly confusing.
2019-09-30 16:26:24 +13:00
Michael Hudson-Doyle b6bf3fcc42 a bit too much effort making one particular log statement look nice 2019-09-09 15:32:49 +12:00
Michael Hudson-Doyle 0eb4dcfdfb more logging tweaks 2019-09-09 15:27:56 +12:00
Michael Hudson-Doyle ca6ebf84f4 only call is_linux_tty once 2019-09-09 15:27:34 +12:00
Michael Hudson-Doyle 5dca5e861e remove some pointless wrapping of exceptions 2019-09-09 14:30:49 +12:00
Michael Hudson-Doyle 3d9cbeac95 light sanitization of log statements 2019-09-09 14:28:48 +12:00
Dimitri John Ledkov 25ed1e281f
Merge pull request #533 from mwhudson/app-specific-uis
allow the application to have a widget in the bottom right
2019-09-05 14:36:12 +01:00
Michael Hudson-Doyle 3f8c005237 allow console_conf and subiquity to use different UI classes
Subiquity is going to grow some global UI elements that console_conf
does not want.
2019-09-05 11:58:25 +12:00
Michael Hudson-Doyle 9a05653150 Tweak Controller API
* rename 'default' method to 'start_ui'
 * add 'end_ui' hook
 * add Application.cur_controller helper
2019-09-04 15:18:45 +12:00
Michael Hudson-Doyle 3605514d30 extract some methods out of Application.run 2019-09-03 13:14:17 +12:00
Michael Hudson-Doyle 43f414da1f add a way to suspend the subiquity UI and run some other command
This will be used for the drop to shell functionality and also to allow
viewing an error report before we submit it to daisy.

It is almost but not quite surprisingly easy (I added a long-ish comment
about the difficulties).
2019-08-23 11:19:21 +12:00
Michael Hudson-Doyle 1947abcc5e fix mismerge self.common["loop"] vs self.loop 2019-08-20 10:34:31 +12:00
Dimitri John Ledkov 1dfffbda01
Merge pull request #523 from mwhudson/run_in_bg-fd-leak
fix fd leak in run_in_bg
2019-08-19 11:30:52 +01:00
Michael Hudson-Doyle b38f47bf42 Merge branch 'master' into core-cleanups 2019-08-16 14:24:56 +12:00
Michael Hudson-Doyle 9b7eb8883c fix fd leak in run_in_bg
Notices this while debugging something entirely different.
2019-08-15 13:59:29 +12:00
Michael Hudson-Doyle 90d376fbbd put the terminal into raw mode
For whatever reason, urwid puts the terminal into cbreak mode during
initialization. If we put the terminal into raw mode instead, then we
don't have to ignore SIGINT and SIGQUIT, which is good, because when we
support dropping to a subshell we don't want to run that subshell with
those signals ignored, because that is extremely confusing.

This also lets me dump the code that puts the terminal into raw mode
during keyboard detection.
2019-08-15 13:50:23 +12:00
Michael Hudson-Doyle 518e52e8e2 move "global" key handling to an unhandled_input handler
The only observable difference here is that ctrl-x now exits in dry-run
mode when a pop up is open.
2019-08-15 13:34:10 +12:00
Michael Hudson-Doyle 98908e91b2 get rid of silly common dictionary that was passed around a bit everywhere 2019-08-15 13:33:38 +12:00
Dimitri John Ledkov e46de5def8 Drop Installpath 2019-05-14 15:09:55 +02:00
Michael Hudson-Doyle bdf33a2adf make SubiquityModel objects easier to construct
So I can write a unittest more easily.

This involves shuffling around how locale changes are done but as my new
design document says the "controller also manages the relationship
between the outside world and the model and views" this does make things
more consistent.
2019-05-10 09:44:01 +12:00
Michael Hudson-Doyle 3e8bc81190 add some logging around moving between screens
my best guess at why CI is currently hanging sometimes is that the
'next-screen' signal is being sent too often / too early.  add some
logging around this so that we will be able to confirm / deny this by
reading the logs.
2019-04-18 10:22:05 +12:00
Dimitri John Ledkov 488f6fd2c0
Lock answers file. 2019-04-12 17:36:12 +01:00
Michael Hudson-Doyle 7cc56a8b58 trying to debug edge ci failures
* add a bit more logging
* wait for initial network apply to finish before moving on from
  network screen
2019-04-04 12:06:41 +13:00
Michael Hudson-Doyle b169d35316 display any error received when checking for updates 2019-03-12 11:49:03 +13:00
Michael Hudson-Doyle b91c961165 implement screens up to the point of offering the update
don't display anything about check failures yet, or actually allow the
user to start the update
2019-03-12 11:49:03 +13:00
Michael Hudson-Doyle 9aea579027 support a controller being shown more than once 2019-03-12 11:48:58 +13:00
Michael Hudson-Doyle a51f04b02c start network probing after all signals have been connected 2019-03-07 15:31:39 +13:00
Michael Hudson-Doyle 6e077ef457 move code for configuring snapd proxy out of snaplist controller 2019-03-07 15:18:34 +13:00
Michael Hudson-Doyle d0c41469a7 remove login model/controller/view from subiquitycore
long ago subsumed into other code
2019-03-07 14:01:52 +13:00
Michael Hudson-Doyle 9937ebe6e1 add a more systematic way for controllers to record their state
so we can return the point where the user left off on update
2019-03-06 15:55:15 +13:00
Michael Hudson-Doyle 98bf6a4254 add a way for a controller to be skipped
will need this for the refresh screen if there is no update
2019-03-06 15:32:31 +13:00
Michael Hudson-Doyle b77aa9499e make sure all delays during replaying answers repsect SUBIQUITY_REPLAY_TIMESCALE 2019-02-21 11:07:54 +01:00
Dimitri John Ledkov 0d35fa613c core: special case s390x vt220 console on /dev/ttysclp0, as it supports colors. 2018-11-23 01:24:34 +00:00
Ryan Harper d7c8b1111b pep8 fixes for subiquitycore/core.py 2018-05-24 16:59:31 -05:00
Ryan Harper 9159cd0003 pep8 fixes for subiquitycore/core.py 2018-05-24 16:51:51 -05:00
Michael Hudson-Doyle 384dadc5ed hack to stop ThreadPoolExecutor blocking exit 2018-05-21 11:58:10 +12:00
Michael Hudson-Doyle 35c08f1d6f up thread pool limit
otherwise we can only do one thing at once! many of the things
we do in the background do not really require an OS thread but oh well
2018-05-18 12:33:25 +12:00
Michael Hudson-Doyle 5a6d0ac90f a docstring 2018-05-01 13:00:27 +12:00
Michael Hudson-Doyle acdd3bdec7 refactor a bit 2018-05-01 12:57:03 +12:00
Michael Hudson-Doyle 58d64eb419 over engineered way to delay command-line supplied script invocation
use this to allow click helper to wait for a button to appear
2018-05-01 12:49:39 +12:00
Michael Hudson-Doyle db4d8a537e add a way to specify actions to take in the UI on the command line
--script takes a little python snippet to run in a helpful namespace
--click is a wrapper around --script to click a button
2018-05-01 12:29:29 +12:00
Michael Hudson-Doyle 1794ed53dd
implement keyboard selection (#276)
A new screen immediately after language.
2018-02-08 10:37:22 +13:00