[anaconda][rhel7-branch/master][PATCH] Autostep --austoscreenshot support for new-ui

Martin Kolman mkolman at redhat.com
Thu Sep 25 12:49:35 UTC 2014

Autostep --autoscreenshot is back from the dead, stronger than ever before!

How does it work ?

* autostep is activated just before leaving a hub by capturing the continue-clicked signal
* it takes a screenshot of the hub and then iterates all spokes on the hub, taking screenshots
* once done, it emits the continue-clicked signal it "consumed" previously, so Anaconda can
  switch to the next hub (or quit)
* the standard screenshot everything-on-the-screen code added for global screenshot support is used,
  but was turned into a function
* the automatically taken screenshots have nice names
* if --autoscreenshot is not specified (don't ask me why would someone do that...) no screenshots are taken
  and Anaconda just pointlessly steps through all screens


Q: What about dialogs being spawned on apply/side effects of automatically visiting the spokes ?
A: While iterating over the spoke, autostep does not "press" the Done button but instead terminates the
   recursive GTK main loop the spoke has & makes sure apply/execute are not called. So no dialogs & hopefully
   also no other side effects.

Q: What about the Welcome spoke ?
A: It is for some reason present in the spoke dictionary of the summary hub, so its screenshot gets taken
   together with the other spokes (this includes also Custom Partitioning and Advanced Storage BTW).

Q: Why is the patch removing the copy-screenshots post-script ?
A: The last batch of screenshots taken before leaving the Progress hub is taken after the post-scripts have run,
   so the screenshots can't be copied by the post-scripts, but by Python code running just before Anaconda quits.

Q: Why is autostep running just before leaving a hub ?
A: Anaconda only leaves a hub after all spokes are ready, which is the ideal time to take their screenshot and
   it also makes sure nothing will change in them. Running in the continue handler also makes it possible to support
   incomplete kickstarts - the user just adds the missing info and clicks continue - and autostep can then do it's job,
   just like if the kickstart was complete and the continue signal was emitted automatically.

Martin Kolman (1):
  Add support for autostep and --autoscreenshot (#1059295)

 data/post-scripts/90-copy-screenshots.ks |  10 ---
 pyanaconda/constants.py                  |   4 +
 pyanaconda/iutil.py                      |  23 ++++++
 pyanaconda/ui/gui/__init__.py            | 127 ++++++++++++++++++++++++++-----
 pyanaconda/ui/gui/hubs/__init__.py       |  43 +++++++++++
 5 files changed, 179 insertions(+), 28 deletions(-)
 delete mode 100644 data/post-scripts/90-copy-screenshots.ks


More information about the anaconda-patches mailing list