[master][PATCH] Really exit when "Exit installer" in the error dialog is clicked
by Vratislav Podzimek
The "Exit installer" button needs a response ID so that the dialog's run()
method terminates. And we then need to exit the installer.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/gui/__init__.py | 3 +++
pyanaconda/ui/gui/main.glade | 3 +++
2 files changed, 6 insertions(+)
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index df98360..0a16245 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -670,6 +670,9 @@ class GraphicalUserInterface(UserInterface):
dlg.run()
dlg.window.destroy()
+ # the dialog has the only button -- "Exit installer", so just do so
+ sys.exit(0)
+
@gtk_action_wait
def showDetailedError(self, message, details):
from pyanaconda.ui.gui.spokes.lib.detailederror import DetailedErrorDialog
diff --git a/pyanaconda/ui/gui/main.glade b/pyanaconda/ui/gui/main.glade
index 37b0d82..3d3e2e6 100644
--- a/pyanaconda/ui/gui/main.glade
+++ b/pyanaconda/ui/gui/main.glade
@@ -72,6 +72,9 @@
<property name="AtkObject::accessible-name" translatable="yes">Error</property>
</object>
</child>
+ <action-widgets>
+ <action-widget response="0">exitButton</action-widget>
+ </action-widgets>
</object>
<object class="GtkDialog" id="quitDialog">
<property name="can_focus">False</property>
--
1.9.3
9 years, 7 months
[blivet:master 0/3] Split devices.py into two parts
by Anne Mulhern
Also, fix up a few imports. If the second patch is accepted there is
an import in anaconda to fix up as well, although apparently it is nothing
to be proud of.
The split is very unequal, but it's a simple way to fight the expansion
of devices.py, so I feel like it is still worth doing.
mulhern (3):
Add a devices_lib.py file for some devices.py functionality.
Move mixin class from devices.py to devices_lib.py
Remove device_majors from devices_lib.py
blivet/__init__.py | 3 +-
blivet/devicelibs/dasd.py | 2 +-
blivet/devices.py | 208 ++++++----------------------------------------
blivet/devices_lib.py | 173 ++++++++++++++++++++++++++++++++++++++
blivet/devicetree.py | 2 +-
blivet/partitioning.py | 3 +-
blivet/udev.py | 6 +-
tests/devices_test.py | 2 +-
tests/parentlist_test.py | 2 +-
9 files changed, 211 insertions(+), 190 deletions(-)
create mode 100644 blivet/devices_lib.py
--
1.9.3
9 years, 7 months
[blivet:master 0/5] size.py related patches (v3)
by Anne Mulhern
First three patches are unchanged from (v2).
Next patch now allows type of min_value to include Decimal as well as int, long,
since I realized that it would be legitimate to specify that 0.75 GiB was how
you wanted to see that value and it does't change the code at all. Simplified
description of min_value as I realized that its specification was simpler
than I had previously thought.
Last patch is new.
mulhern (5):
Use UPPER_CASE for constants
Use named constants for binary and decimal factors.
Factor out commonalities in xlated_*_prefix() methods.
Rewrite of Size.humanReadable() method
Change default min_value from 10 to 1 in humanReadable()
blivet/size.py | 195 ++++++++++++++++++++++++++++-------------------------
tests/size_test.py | 80 +++++++++++++++++++---
2 files changed, 176 insertions(+), 99 deletions(-)
--
1.9.3
9 years, 7 months
[blivet:master 0/4] size.py related patches (v2)
by Anne Mulhern
Now using UPPER_CASE for all constants in file and insisting that
Python do a little bit more of the computation and the programmer a little
bit less.
Otherwise, no real change, just a reordering of actions.
mulhern (4):
Use UPPER_CASE for constants
Use named constants for binary and decimal factors.
Factor out commonalities in xlated_*_prefix() methods.
Rewrite of Size.humanReadable() method
blivet/size.py | 194 ++++++++++++++++++++++++++++-------------------------
tests/size_test.py | 64 ++++++++++++++++--
2 files changed, 163 insertions(+), 95 deletions(-)
--
1.9.3
9 years, 7 months
[PATCH] dracut/save-initramfs.sh: don't save /tmp
by Will Woods
When save-initramfs.sh saves a copy of initramfs, we don't need the
contents of /tmp. I mean, they're *temporary*. You shouldn't expect them
to be there later.
This is especially important when we're fetching images (squashfs.img,
updates.img, product.img, etc.) via http/ftp - they get downloaded into
/tmp by default, and we really shouldn't be saving extra copies of them
into an archive in /run.
This should save us ~275MB RAM on PXE-booted systems using http/ftp.
Resolves: rhbz#1148618
---
dracut/save-initramfs.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dracut/save-initramfs.sh b/dracut/save-initramfs.sh
index 4ebbdfe..e55291e 100755
--- a/dracut/save-initramfs.sh
+++ b/dracut/save-initramfs.sh
@@ -16,7 +16,7 @@ if [ -z "$initramfs" ]; then
gzip=$(type -P pigz || type -P gzip)
# Prune out things we don't need - modules & firmware, python, overlay file
find / -xdev | \
- grep -Ev 'lib/modules|lib/firmware|python|overlay|etc/ssl|fsck' | \
+ grep -Ev 'tmp/|lib/modules|lib/firmware|python|overlay|etc/ssl|fsck' | \
cpio -co 2>/dev/null | $gzip -c1 > $initramfs
fi
--
1.9.3
9 years, 7 months
[master/rhel7/f21] Clear errors when downloading new MD in text
by Brian C. Lane
The change to add payloadMgr didn't add a listener on metadata download
so the errors were never being reset.
Related: rhbz#1125927
---
pyanaconda/ui/tui/spokes/source.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pyanaconda/ui/tui/spokes/source.py b/pyanaconda/ui/tui/spokes/source.py
index b7940b6..d35e617 100644
--- a/pyanaconda/ui/tui/spokes/source.py
+++ b/pyanaconda/ui/tui/spokes/source.py
@@ -165,6 +165,7 @@ class SourceSpoke(SourceSwitchHandler, EditTUISpoke):
threadMgr.add(AnacondaThread(name=THREAD_SOURCE_WATCHER,
target=self._initialize))
+ payloadMgr.addListener(payloadMgr.STATE_GROUP_MD, self._downloading_package_md)
payloadMgr.addListener(payloadMgr.STATE_ERROR, self._payload_error)
def _initialize(self):
@@ -185,6 +186,10 @@ class SourceSpoke(SourceSwitchHandler, EditTUISpoke):
self._ready = True
+ def _downloading_package_md(self):
+ # Reset the error state from previous payloads
+ self.errors = []
+
def _payload_error(self):
self.errors.append(payloadMgr.error)
--
1.9.3
9 years, 7 months
[master/rhel7/f21] Return result of default key handling in text summary hub
by Brian C. Lane
'q' doesn't work from the summary hub because the return value of the
Super call wasn't being returned.
Related: rhbz#997405
---
pyanaconda/ui/tui/hubs/summary.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/tui/hubs/summary.py b/pyanaconda/ui/tui/hubs/summary.py
index c1b0dcf..64d43f9 100644
--- a/pyanaconda/ui/tui/hubs/summary.py
+++ b/pyanaconda/ui/tui/hubs/summary.py
@@ -123,4 +123,4 @@ class SummaryHub(TUIHub):
# which is the global TUI key to close the current screen
return False
else:
- super(SummaryHub, self).input(args, key)
+ return super(SummaryHub, self).input(args, key)
--
1.9.3
9 years, 7 months
[blivet:master 0/2] Remove test which needs updating on btrfs-progs version change. (v3)
by Anne Mulhern
Rebased against most recent version of master and seems OK.
Originally my plan was just to get rid of the test that was failing on Jenkins,
since it did not test anything we use. But on further consideration, it
appeared that that was a mistake, i.e., we should be using that information.
So that's what this patch set does instead.
mulhern (2):
Further abstract loopbackedtestcase on block_size.
Check the minimum member size for BtrfsVolumeDevices.
blivet/devicelibs/btrfs.py | 4 ++++
blivet/devices.py | 10 +++++++++
tests/devicelibs_test/btrfs_test.py | 21 +++++++++++++++++-
tests/devicelibs_test/mdraid_interrogate_test.py | 5 +++--
tests/devicelibs_test/mdraid_test.py | 6 +++---
tests/devices_test.py | 26 +++++++++++++++++------
tests/formats_test/fslabeling.py | 3 ++-
tests/formats_test/selinux_test.py | 3 ++-
tests/loopbackedtestcase.py | 27 +++++++++++++++---------
9 files changed, 80 insertions(+), 25 deletions(-)
--
1.9.3
9 years, 7 months
[anaconda][rhel7-branch/master][PATCH] Autostep --austoscreenshot support for new-ui
by Martin Kolman
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
QA
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
--
1.9.3
9 years, 7 months
[initial-setup][rhel7-branch][PATCH] Fix register_event_cb function signature (#1072033)
by Martin Kolman
The function signature on the anaconda side changed due to the
Help patch set, so we need to also change the signature in Initial Setup
to avoid a traceback due to incompatible number of arguments.
Related: rhbz#1072033
Signed-off-by: Martin Kolman <mkolman(a)redhat.com>
---
initial_setup/gui/hubs/initial_setup_hub.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/initial_setup/gui/hubs/initial_setup_hub.py b/initial_setup/gui/hubs/initial_setup_hub.py
index e9ea54e..24b9edd 100644
--- a/initial_setup/gui/hubs/initial_setup_hub.py
+++ b/initial_setup/gui/hubs/initial_setup_hub.py
@@ -76,11 +76,13 @@ class InitialSetupMainHub(Hub):
def quitButton(self):
return self.builder.get_object("quitButton")
- def register_event_cb(self, event, cb):
+ def register_event_cb(self, event, cb, *args):
if event == "continue" and self.continueButton:
self.continueButton.connect("clicked", lambda *args: cb())
elif event == "quit" and self.quitButton:
self.quitButton.connect("clicked", lambda *args: self._on_quit_clicked(cb))
+ elif event == "help-button":
+ self.window.connect("help-button-clicked", cb, *args)
def _on_quit_clicked(self, cb):
try:
--
1.9.3
9 years, 7 months