[PATCH] use can_touch_runtime_system fix
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
---
anaconda | 5 ++---
pyanaconda/flags.py | 4 ++++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/anaconda b/anaconda
index 8e32b87..a294d5b 100755
--- a/anaconda
+++ b/anaconda
@@ -791,8 +791,7 @@ if __name__ == "__main__":
flags.mpath = opts.mpath
flags.selinux = opts.selinux
- if not flags.livecdInstall and not flags.imageInstall \
- and not flags.dirInstall:
+ if flags.can_touch_runtime_system("start audit daemon"):
startAuditDaemon()
# setup links required for all install types
@@ -989,7 +988,7 @@ if __name__ == "__main__":
atexit.register(exitHandler, ksdata.reboot, anaconda.storage)
# setup ntp servers and start NTP daemon if not requested otherwise
- if not flags.imageInstall and not flags.dirInstall:
+ if flags.can_touch_runtime_system("start chronyd"):
if anaconda.ksdata.timezone.ntpservers:
ntp.save_servers_to_config(anaconda.ksdata.timezone.ntpservers)
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
index 8d24d13..7fb3a78 100644
--- a/pyanaconda/flags.py
+++ b/pyanaconda/flags.py
@@ -191,6 +191,10 @@ def can_touch_runtime_system(msg):
log.info("Not doing '%s' in image installation" % msg)
return False
+ if flags.dirInstall:
+ log.info("Not doing '%s' in directory installation" % msg)
+ return False
+
if flags.testing:
log.info("Not doing '%s', because we are just testing" % msg)
return False
--
1.8.1
11 years, 2 months
[PATCH] Convert the mount point entry to one containing a drop down.
by Chris Lumens
The idea here is that it makes things like "swap" more discoverable because
the user can pick them, plus it gets rid of the tooltip that is not at all
accessible.
---
pyanaconda/ui/gui/spokes/custom.glade | 38 +++++++++++++++++++++--------------
pyanaconda/ui/gui/spokes/custom.py | 8 +++++---
2 files changed, 28 insertions(+), 18 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.glade b/pyanaconda/ui/gui/spokes/custom.glade
index 39e3866..6319a50 100644
--- a/pyanaconda/ui/gui/spokes/custom.glade
+++ b/pyanaconda/ui/gui/spokes/custom.glade
@@ -205,21 +205,6 @@ after creating the mount point below.</property>
</packing>
</child>
<child>
- <object class="GtkEntry" id="addMountPointEntry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="tooltip_text" translatable="yes">eg: "/", "/home", "swap" (minus the quotation marks)</property>
- <property name="invisible_char">●</property>
- <property name="completion">mountPointCompletion</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
<object class="GtkBox" id="addLabelWarningBox">
<property name="can_focus">False</property>
<property name="valign">start</property>
@@ -278,6 +263,28 @@ use. Try something else?</property>
</packing>
</child>
<child>
+ <object class="GtkComboBoxText" id="addMountPointEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="has_entry">True</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ <child internal-child="entry">
+ <object class="GtkEntry" id="comboboxtext-entry">
+ <property name="can_focus">True</property>
+ <property name="buffer">mountPointEntryBuffer</property>
+ <property name="completion">mountPointCompletion</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
<placeholder/>
</child>
</object>
@@ -1981,6 +1988,7 @@ use. Try something else?</property>
<object class="GtkEntryCompletion" id="mountPointCompletion">
<property name="model">mountPointStore</property>
</object>
+ <object class="GtkEntryBuffer" id="mountPointEntryBuffer"/>
<object class="GtkListStore" id="mountPointStore">
<columns>
<!-- column-name path -->
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 8d00108..503ff11 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -192,7 +192,7 @@ def validate_mountpoint(mountpoint, used_mountpoints, strict=True):
return valid
class AddDialog(GUIObject):
- builderObjects = ["addDialog", "mountPointStore", "mountPointCompletion"]
+ builderObjects = ["addDialog", "mountPointStore", "mountPointCompletion", "mountPointEntryBuffer"]
mainWidgetName = "addDialog"
uiFile = "spokes/custom.glade"
@@ -205,13 +205,14 @@ class AddDialog(GUIObject):
store = self.builder.get_object("mountPointStore")
populate_mountpoint_store(store, self.mountpoints)
+ self.builder.get_object("addMountPointEntry").set_model(store)
completion = self.builder.get_object("mountPointCompletion")
completion.set_text_column(0)
completion.set_popup_completion(True)
def on_add_confirm_clicked(self, button, *args):
- self.mountpoint = self.builder.get_object("addMountPointEntry").get_text()
+ self.mountpoint = self.builder.get_object("addMountPointEntry").get_active_text()
self._error = validate_mountpoint(self.mountpoint, self.mountpoints,
strict=False)
self._warningLabel.set_text(_(mountpoint_validation_msgs[self._error]))
@@ -417,7 +418,8 @@ class HelpDialog(GUIObject):
class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
builderObjects = ["customStorageWindow", "sizeAdjustment",
"partitionStore", "raidStoreFiltered", "raidLevelStore",
- "addImage", "removeImage", "settingsImage"]
+ "addImage", "removeImage", "settingsImage",
+ "mountPointCompletion", "mountPointStore"]
mainWidgetName = "customStorageWindow"
uiFile = "spokes/custom.glade"
--
1.7.11.2
11 years, 2 months
[blivet] device ignorance and non-installer-mode scanning
by David Lehman
Patches 1 and 2 give blivet the ability to populate the devicetree
without 70-anaconda.rules being present.
Patches 3, 4, and 5 finally extend the handling of ignored disks
introduced in F18 anaconda so it will work even with partial
kickstart configs that specify ignored disks.
11 years, 2 months
[PATCH 0/2] Add directory install support to Anaconda
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
This is the result of an idea I had at fudcon. It turns off storage and
installs to /mnt/sysimage/ or whatever you have previously mounted on it.
I am using this with a modified version of livemedia-creator to make live isos
and various disk images. It speeds up the creation time for an iso by 'a bunch'
because it removes the need for copying the whole filesystem from one place to
another during the install sequence. It should also allow anaconda and
livemedia-creator to be run inside a mock environment because it removes the
need for device-mapper which has caused problems in the past inside a mock.
My plan for these patches is to apply them to both master+blivet and to
f18-branch and to do a new build of f18 (18.37.12) so that people using
livemedia-creator with f18 can take advantage of this without waiting for f19.
Brian C. Lane (2):
Add mountOnly to turnOnFilesystems
Add --dirinstall command
anaconda | 31 ++++++++++------
pyanaconda/flags.py | 1 +
pyanaconda/install.py | 10 +++---
pyanaconda/storage/__init__.py | 70 +++++++++++++++++++++----------------
pyanaconda/ui/gui/spokes/storage.py | 4 +++
pyanaconda/ui/tui/spokes/storage.py | 4 +++
6 files changed, 75 insertions(+), 45 deletions(-)
--
1.8.1
11 years, 2 months
[PATCH 1/2] Rework all the dialogs after you click Done on the storage spoke (#903501).
by Chris Lumens
(1) Change a lot of wording and button text to make it clear what happens next.
(2) Allow going to the reclaim dialog even if you have enough space to begin
with.
(3) Get rid of the custom partitioning checkbox, and make it a button instead.
(4) Get rid of the modify software selection button from one dialog, since
there's now too many buttons.
---
pyanaconda/ui/gui/spokes/storage.glade | 192 ++++++++++++---------------------
pyanaconda/ui/gui/spokes/storage.py | 192 +++++++++++++++++----------------
2 files changed, 166 insertions(+), 218 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.glade b/pyanaconda/ui/gui/spokes/storage.glade
index 72c1ebf..c38a738 100644
--- a/pyanaconda/ui/gui/spokes/storage.glade
+++ b/pyanaconda/ui/gui/spokes/storage.glade
@@ -31,7 +31,6 @@
<property name="halign">start</property>
<property name="border_width">6</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_cancel_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -49,18 +48,19 @@
<property name="receives_default">True</property>
<property name="border_width">6</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_continue_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
+ <property name="non_homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
+ <property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
@@ -92,7 +92,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Here we'll describe what your options are.</property>
+ <property name="label">Here we'll describe what your options are.</property>
<property name="wrap">True</property>
<attributes>
<attribute name="font-desc" value="Cantarell 11"/>
@@ -105,6 +105,59 @@
</packing>
</child>
<child>
+ <object class="GtkRadioButton" id="options1_autopart_radio">
+ <property name="label">Here's the autopart label.</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="options1_reclaim_radio">
+ <property name="label">Here's the reclaim label.</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">options1_autopart_radio</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="options1_custom_radio">
+ <property name="label">Here's the custom label.</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">options1_autopart_radio</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkExpander" id="options1_expander">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -162,25 +215,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="options1_custom_check">
- <property name="label" translatable="yes">Let me customize the _partitioning of the disks instead.</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_custom_toggled" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">3</property>
+ <property name="position">5</property>
</packing>
</child>
</object>
@@ -225,7 +260,6 @@
<property name="receives_default">True</property>
<property name="border_width">6</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_cancel_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -235,43 +269,43 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="options2_modify_sw_button">
- <property name="label" translatable="yes">_Modify software selection</property>
+ <object class="GtkButton" id="options2_custom_button">
+ <property name="label" translatable="yes">_Custom partitioning</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes">Please wait... software metadata still loading.</property>
<property name="border_width">6</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_modify_sw_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
+ <property name="non_homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkButton" id="options2_reclaim_button">
- <property name="label" translatable="yes">Reclaim _space</property>
+ <property name="label" translatable="yes">_Reclaim space</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_focus">True</property>
<property name="receives_default">True</property>
<property name="border_width">6</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_reclaim_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
+ <property name="non_homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
+ <property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
@@ -397,42 +431,6 @@
<property name="height">1</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="options2_disks_size_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">disks size</property>
- <attributes>
- <attribute name="font-desc" value="Cantarell Bold 11"/>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="options2_disks_size_desc_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Space in selected disks reclaimable by deleting existing partitions.</property>
- <property name="wrap">True</property>
- <attributes>
- <attribute name="font-desc" value="Cantarell 11"/>
- </attributes>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -518,24 +516,6 @@
<property name="position">4</property>
</packing>
</child>
- <child>
- <object class="GtkCheckButton" id="options2_custom_check">
- <property name="label" translatable="yes">I don't need help; let me customize disk _partitioning.</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="on_custom_toggled" swapped="no"/>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">5</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -547,7 +527,7 @@
</child>
<action-widgets>
<action-widget response="0">options2_cancel_button</action-widget>
- <action-widget response="2">options2_modify_sw_button</action-widget>
+ <action-widget response="5">options2_custom_button</action-widget>
<action-widget response="3">options2_reclaim_button</action-widget>
</action-widgets>
</object>
@@ -579,7 +559,6 @@
<property name="receives_default">True</property>
<property name="border_width">6</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_quit_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
@@ -597,12 +576,12 @@
<property name="tooltip_text" translatable="yes">Please wait... software metadata still loading.</property>
<property name="border_width">6</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_modify_sw_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
+ <property name="non_homogeneous">True</property>
</packing>
</child>
<child>
@@ -614,18 +593,19 @@
<property name="receives_default">True</property>
<property name="border_width">6</property>
<property name="use_underline">True</property>
- <signal name="clicked" handler="on_cancel_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
+ <property name="non_homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
+ <property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
@@ -749,42 +729,6 @@
<property name="height">1</property>
</packing>
</child>
- <child>
- <object class="GtkLabel" id="options3_disks_size_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="label" translatable="yes">disks size</property>
- <attributes>
- <attribute name="font-desc" value="Cantarell Bold 11"/>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="options3_disks_size_desc_label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Space in selected disks reclaimable by deleting existing partitions.</property>
- <property name="wrap">True</property>
- <attributes>
- <attribute name="font-desc" value="Cantarell 11"/>
- </attributes>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -1028,9 +972,9 @@
<property name="halign">end</property>
<property name="valign">end</property>
<property name="hexpand">True</property>
+ <property name="use_underline">True</property>
<property name="xalign">1</property>
<property name="draw_indicator">True</property>
- <property name="use_underline">True</property>
</object>
<packing>
<property name="left_attach">1</property>
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 69ed7fd..ece68e0 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -124,11 +124,19 @@ class InstallOptions1Dialog(GUIObject):
mainWidgetName = "options1_dialog"
uiFile = "spokes/storage.glade"
+ # Response ID codes for all the various buttons on all the dialogs.
RESPONSE_CANCEL = 0
RESPONSE_CONTINUE = 1
RESPONSE_MODIFY_SW = 2
RESPONSE_RECLAIM = 3
RESPONSE_QUIT = 4
+ RESPONSE_CUSTOM = 5
+
+ # Which radiobutton is selected on the options1 dialog?
+ RESPONSE_CONTINUE_NONE = -1
+ RESPONSE_CONTINUE_AUTOPART = 0
+ RESPONSE_CONTINUE_RECLAIM = 1
+ RESPONSE_CONTINUE_CUSTOM = 2
def __init__(self, *args, **kwargs):
self.payload = kwargs.pop("payload", None)
@@ -139,28 +147,51 @@ class InstallOptions1Dialog(GUIObject):
self.window.destroy()
return rc
- def refresh(self, required_space, disks_size, disk_free, fs_free, autopart,
- autoPartType):
- self.custom = not autopart
- self.custom_checkbutton = self.builder.get_object("options1_custom_check")
- self.custom_checkbutton.set_active(self.custom)
-
+ def refresh(self, required_space, disk_free, fs_free, autoPartType):
self.autoPartType = autoPartType
self.autoPartTypeCombo = self.builder.get_object("options1_combo")
self.autoPartTypeCombo.set_active(self.autoPartType)
options_label = self.builder.get_object("options1_label")
- options_text = (_("You have plenty of space to install <b>%s</b>, so "
- "we can automatically\n"
- "configure the rest of the installation for you.")
- % productName)
+ options_text = _("You have <b>%(freeSpace)s</b> of free space, which is "
+ "enough to install %(productName)s. What would you "
+ "like to do?") % {"freeSpace": disk_free, "productName": productName}
options_label.set_markup(options_text)
- def _set_free_space_labels(self, disks_size, disk_free, fs_free):
- disks_size_text = size_str(disks_size)
- self.disks_size_label.set_text(disks_size_text)
+ label = self.builder.get_object("options1_autopart_radio").get_children()[0]
+ label.set_markup(_("<span font-desc=\"Cantarell 11\">A_utomatically "
+ "configure my %(productName)s installation to the "
+ "disk(s) I selected and return me to the main "
+ "menu.</span>") % {"productName": productName})
+ label.set_line_wrap(True)
+ label.set_use_underline(True)
+
+ label = self.builder.get_object("options1_reclaim_radio").get_children()[0]
+ label.set_markup(_("<span font-desc=\"Cantarell 11\">I want more space. "
+ "_Guide me through shrinking and/or removing partitions "
+ "so I can have more space for %(productName)s.</span>") % {"productName": productName})
+ label.set_line_wrap(True)
+ label.set_use_underline(True)
+
+ label = self.builder.get_object("options1_custom_radio").get_children()[0]
+ label.set_markup(_("<span font-desc=\"Cantarell 11\">I want to review/_modify "
+ "my disk partitions before continuing.</span>"))
+ label.set_line_wrap(True)
+ label.set_use_underline(True)
+
+ @property
+ def continue_response(self):
+ if self.builder.get_object("options1_autopart_radio").get_active():
+ return self.RESPONSE_CONTINUE_AUTOPART
+ elif self.builder.get_object("options1_reclaim_radio").get_active():
+ return self.RESPONSE_CONTINUE_RECLAIM
+ elif self.builder.get_object("options1_custom_radio").get_active():
+ return self.RESPONSE_CONTINUE_CUSTOM
+ else:
+ return self.RESPONSE_CONTINUE_NONE
+ def _set_free_space_labels(self, disk_free, fs_free):
disk_free_text = size_str(disk_free)
self.disk_free_label.set_text(disk_free_text)
@@ -203,27 +234,6 @@ class InstallOptions1Dialog(GUIObject):
GLib.timeout_add_seconds(1, self._check_for_storage_thread, modify_button)
# signal handlers
- def on_cancel_clicked(self, button):
- # return to the spoke without making any changes
- print "CANCEL CLICKED"
-
- def on_quit_clicked(self, button):
- print "QUIT CLICKED"
-
- def on_modify_sw_clicked(self, button):
- # switch to the software selection hub
- print "MODIFY SOFTWARE CLICKED"
-
- def on_reclaim_clicked(self, button):
- # show reclaim screen/dialog
- print "RECLAIM CLICKED"
-
- def on_continue_clicked(self, button):
- print "CONTINUE CLICKED"
-
- def on_custom_toggled(self, checkbutton):
- self.custom = checkbutton.get_active()
-
def on_type_changed(self, combo):
self.autoPartType = combo.get_active()
@@ -231,12 +241,7 @@ class InstallOptions2Dialog(InstallOptions1Dialog):
builderObjects = ["options2_dialog"]
mainWidgetName = "options2_dialog"
- def refresh(self, required_space, disks_size, disk_free, fs_free, autopart,
- autoPartType):
- self.custom = not autopart
- self.custom_checkbutton = self.builder.get_object("options2_custom_check")
- self.custom_checkbutton.set_active(self.custom)
-
+ def refresh(self, required_space, disk_free, fs_free, autoPartType):
self.autoPartType = autoPartType
self.autoPartTypeCombo = self.builder.get_object("options2_combo")
self.autoPartTypeCombo.set_active(self.autoPartType)
@@ -248,30 +253,24 @@ class InstallOptions2Dialog(InstallOptions1Dialog):
self.disk_free_label = self.builder.get_object("options2_disk_free_label")
self.fs_free_label = self.builder.get_object("options2_fs_free_label")
- self.disks_size_label = self.builder.get_object("options2_disks_size_label")
- self._set_free_space_labels(disks_size, disk_free, fs_free)
+ self._set_free_space_labels(disk_free, fs_free)
- label_text = (_("<b>You don't have enough space available to install "
- "%s</b>, but we can help you\n"
- "reclaim space by shrinking or removing existing partitions.")
- % productName)
+ label_text = _("<b>You don't have enough space available to install "
+ "%s</b>. You can shrink or remove existing partitions "
+ "via our guided reclaim space tool, or you can adjust your "
+ "partitions on your own in the custom partitioning "
+ "interface.") % productName
self.builder.get_object("options2_label2").set_markup(label_text)
- self._add_button_watcher("options2_modify_sw_button")
-
- def on_custom_toggled(self, checkbutton):
- super(InstallOptions2Dialog, self).on_custom_toggled(checkbutton)
- self.builder.get_object("options2_cancel_button").set_sensitive(not self.custom)
- sensitive = not self.custom and self._software_is_ready()
- self.builder.get_object("options2_modify_sw_button").set_sensitive(sensitive)
+ @property
+ def continue_response(self):
+ return self.RESPONSE_CONTINUE_NONE
class InstallOptions3Dialog(InstallOptions1Dialog):
builderObjects = ["options3_dialog"]
mainWidgetName = "options3_dialog"
- def refresh(self, required_space, disks_size, disk_free, fs_free, autopart,
- autoPartType):
- self.custom = not autopart
+ def refresh(self, required_space, disk_free, fs_free, autoPartType):
sw_text = self._get_sw_needs_text(required_space)
label_text = (_("%s\nYou don't have enough space available to install "
"<b>%s</b>, even if you used all of the free space\n"
@@ -281,8 +280,7 @@ class InstallOptions3Dialog(InstallOptions1Dialog):
self.disk_free_label = self.builder.get_object("options3_disk_free_label")
self.fs_free_label = self.builder.get_object("options3_fs_free_label")
- self.disks_size_label = self.builder.get_object("options3_disks_size_label")
- self._set_free_space_labels(disks_size, disk_free, fs_free)
+ self._set_free_space_labels(disk_free, fs_free)
label_text = _("<b>You don't have enough space available to install "
"%s</b>, even if you used all of the free space\n"
@@ -294,6 +292,10 @@ class InstallOptions3Dialog(InstallOptions1Dialog):
self._add_button_watcher("options3_modify_sw_button")
+ @property
+ def continue_response(self):
+ return self.RESPONSE_CONTINUE_NONE
+
class StorageChecker(object):
errors = []
warnings = []
@@ -637,6 +639,23 @@ class StorageSpoke(NormalSpoke, StorageChecker):
return rc
+ def _check_encrypted(self):
+ # even if they're not doing autopart, setting autopart.encrypted
+ # establishes a default of encrypting new devices
+ encrypt_button = self.builder.get_object("encryption_checkbutton")
+ self.encrypted = encrypt_button.get_active()
+
+ if not self.encrypted:
+ return True
+
+ dialog = PassphraseDialog(self.data)
+ rc = self.run_lightbox_dialog(dialog)
+ if rc == 0:
+ return False
+
+ self.passphrase = dialog.passphrase
+ return True
+
def on_back_clicked(self, button):
# Remove all non-existing devices if autopart was active when we last
# refreshed.
@@ -698,28 +717,23 @@ class StorageSpoke(NormalSpoke, StorageChecker):
else:
dialog = InstallOptions3Dialog(self.data, payload=self.payload)
- dialog.refresh(required_space, disks_size, disk_free, fs_free, self.autopart, self.autoPartType)
+ dialog.refresh(required_space, disk_free, fs_free, self.autoPartType)
rc = self.run_lightbox_dialog(dialog)
if rc == dialog.RESPONSE_CONTINUE:
- # depending on custom/autopart, either set up autopart or show
- # custom partitioning ui
- self.autopart = not dialog.custom
self.autoPartType = dialog.autoPartType
- # even if they're not doing autopart, setting autopart.encrypted
- # establishes a default of encrypting new devices
- encrypt_button = self.builder.get_object("encryption_checkbutton")
- self.encrypted = encrypt_button.get_active()
+ if not self._check_encrypted():
+ return
- if dialog.custom:
+ if dialog.continue_response == dialog.RESPONSE_CONTINUE_AUTOPART:
+ self.autopart = True
+ elif dialog.continue_response == dialog.RESPONSE_CONTINUE_RECLAIM:
+ self.apply()
+ gtk_call_once(self._show_resize_dialog, disks)
+ return
+ elif dialog.continue_response == dialog.RESPONSE_CONTINUE_CUSTOM:
+ self.autopart = False
self.skipTo = "CustomPartitioningSpoke"
- elif self.encrypted:
- dialog = PassphraseDialog(self.data)
- rc = self.run_lightbox_dialog(dialog)
- if rc == 0:
- return
-
- self.passphrase = dialog.passphrase
NormalSpoke.on_back_clicked(self, button)
elif rc == dialog.RESPONSE_CANCEL:
@@ -730,30 +744,20 @@ class StorageSpoke(NormalSpoke, StorageChecker):
self.skipTo = "SoftwareSelectionSpoke"
NormalSpoke.on_back_clicked(self, button)
elif rc == dialog.RESPONSE_RECLAIM:
- self.autopart = not dialog.custom
self.autoPartType = dialog.autoPartType
+ if not self._check_encrypted():
+ return
- # even if they're not doing autopart, setting autopart.encrypted
- # establishes a default of encrypting new devices
- encrypt_button = self.builder.get_object("encryption_checkbutton")
- self.encrypted = encrypt_button.get_active()
-
- if dialog.custom:
- self.skipTo = "CustomPartitioningSpoke"
- NormalSpoke.on_back_clicked(self, button)
- else:
- if self.encrypted:
- dialog = PassphraseDialog(self.data)
- rc = self.run_lightbox_dialog(dialog)
- if rc == 0:
- return
-
- self.passphrase = dialog.passphrase
-
- self.apply()
- gtk_call_once(self._show_resize_dialog, disks)
+ self.apply()
+ gtk_call_once(self._show_resize_dialog, disks)
elif rc == dialog.RESPONSE_QUIT:
raise SystemExit("user-selected exit")
+ elif rc == dialog.RESPONSE_CUSTOM:
+ self.autopart = False
+ self.autoPartType = dialog.autoPartType
+
+ self.skipTo = "CustomPartitioningSpoke"
+ NormalSpoke.on_back_clicked(self, button)
def _show_resize_dialog(self, disks):
resizeDialog = ResizeDialog(self.data, self.storage, self.payload)
--
1.7.11.2
11 years, 2 months
[master] [PATCH] Overrides for the Gdk have _2BUTTON_PRESS defined
by Vratislav Podzimek
Gdk.EventType.2BUTTON_PRESS results in syntax error in Python.
However it is not necessary to use getattr() because there is
Gtk.EventType._2BUTTON_PRESS defined in Gdk's overrides.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/gui/spokes/keyboard.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/keyboard.py b/pyanaconda/ui/gui/spokes/keyboard.py
index 10ede4c..082702c 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.py
+++ b/pyanaconda/ui/gui/spokes/keyboard.py
@@ -152,8 +152,7 @@ class AddLayoutDialog(GUIObject):
self._entry.set_text("")
def on_layout_view_button_press(self, widget, event, *args):
- # BUG: Gdk.EventType.2BUTTON_PRESS results in syntax error
- if event.type == getattr(Gdk.EventType, "2BUTTON_PRESS") and \
+ if event.type == Gdk.EventType._2BUTTON_PRESS and \
self._confirmAddButton.get_sensitive():
# double-click should close the dialog if something is selected
# (i.e. the Add button is sensitive)
--
1.7.11.7
11 years, 2 months
[blivet] patch dump
by David Lehman
Patch 8 needs to get into a build so that composes with the new anaconda
have a chance of working without updates image.
Patch 4 is relevant to anaconda. The populate following user providing a
passphrase for an existing luks device currently brings removed and
hidden devices back into play.
Patches 2,3,7,11 are all for non-installer usage.
11 years, 2 months
[master] Entries with completions for timezone selection
by Vratislav Podzimek
This patch adds entries with completions to the city and region comboboxes
on the Datetime spoke so that the timezone can be easily chosen by using
keyboard. The preview can be seen at [1], but due to the bug #907946 I cannot
record a new preview because the completion doesn't show on our images. The
difference from to the old preview is that the same works also with the region
combobox and both comboboxes/entries are wider so that it is more obvious that
one can type into them. Also when ESC is hit, the old value is restored and
when TAB is hit or some other widget is clicked then depending on the value
entered being valid or invalid it is accepted or the old value is restored
respectively.
[1] http://vpodzime.fedorapeople.org/DatetimeSpoke-city_completion.webm
Vratislav Podzimek (1):
Add entries with completions to the comboboxes (DatetimeSpoke)
pyanaconda/ui/gui/spokes/datetime_spoke.glade | 152 +++++++++++++-------------
pyanaconda/ui/gui/spokes/datetime_spoke.py | 87 +++++++++++++--
2 files changed, 155 insertions(+), 84 deletions(-)
--
1.7.11.7
11 years, 2 months
[PATCH 1/2] DMI_CHASSIS_VENDOR has moved into blivet.
by David Lehman
---
pyanaconda/constants.py | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/constants.py b/pyanaconda/constants.py
index ad2737a..faf37e9 100644
--- a/pyanaconda/constants.py
+++ b/pyanaconda/constants.py
@@ -91,9 +91,6 @@ DEFAULT_LANG = "en_US.UTF-8"
DRACUT_SHUTDOWN_EJECT = "/run/initramfs/usr/lib/dracut/hooks/shutdown/99anaconda-eject.sh"
-# DMI information paths
-DMI_CHASSIS_VENDOR = "/sys/class/dmi/id/chassis_vendor"
-
# VNC questions
USEVNC = _("Start VNC")
USETEXT = _("Use text mode")
--
1.7.6.5
11 years, 2 months
[PATCH 1/3] Point gobject-introspection at our updates directory for overrides.
by Chris Lumens
---
anaconda | 3 +++
1 file changed, 3 insertions(+)
diff --git a/anaconda b/anaconda
index d0dd05e..10d1abb 100755
--- a/anaconda
+++ b/anaconda
@@ -133,6 +133,7 @@ def set_x_resolution(runres):
def setupPythonUpdates():
from distutils.sysconfig import get_python_lib
+ import gi.overrides
# Temporary hack for F18 alpha to symlink updates and product directories
# into tmpfs. To be removed after beta in order to directly use content
@@ -166,6 +167,8 @@ def setupPythonUpdates():
# the updates directory.
symlink_updates(dest, d)
+ gi.overrides.__path__.insert(0, "/run/install/updates")
+
import glob
import shutil
for rule in glob.glob("/tmp/updates/*.rules"):
--
1.7.11.2
11 years, 2 months