[master] UTC/localtime HW clock heuristic
by Vratislav Podzimek
PATCH [1/2] is just a minor change without any significant result.
PATCH [2/2] adds a heuristic to guess wheter HW clock uses UTC or local
time by searching for bootable NTFS partitions. It adds two threads, but
these are really lightweight and just handle the potential long storage
initialization.
Vratislav Podzimek (2):
Return bool value from the GRUB.has_windows method
Set system time from HW clock and guess if it is UTC
anaconda | 11 ++++++++-
pyanaconda/bootloader.py | 2 +-
pyanaconda/kickstart.py | 7 ------
pyanaconda/timezone.py | 38 ++++++++++++++++++++++++++++++
pyanaconda/ui/gui/spokes/datetime_spoke.py | 20 ++++++++++++++++
5 files changed, 69 insertions(+), 9 deletions(-)
--
1.7.11.7
10 years, 10 months
[PATCH yum/anaconda] allow environment options to default to enabled
by Bill Nottingham
(Apologies for the cross-post, but the patches go together.)
There have been multiple requests that environments in anaconda be able
to be 'default-selected'. The general use cases are:
- to select the office suite by default when installing desktops, while
allowing users to deselect it
- to split some applications out of the desktop groups so users can choose
to have a more minimal desktop installation, while remaining selected for
the simple choice
These two patches implement it; first by allowing 'default=true' to be
set for the group and parsed by the yum comps module, and then by changing
anaconda to honor it.
Bill
10 years, 10 months
[PATCH] Add realm command support
by Martin Kolman
This is basically just the patch originally sent by Stef,
applied to pykickstart master.
It adds support for parsing the realm command from kickstart;
the join, permit and deny sub-commands are supported.
Martin Kolman (1):
Add support for the realm command
pykickstart/commands/__init__.py | 2 +-
pykickstart/commands/realm.py | 120 +++++++++++++++++++++++++++++++++++++++
pykickstart/handlers/control.py | 1 +
tests/commands/realm.py | 54 ++++++++++++++++++
4 files changed, 176 insertions(+), 1 deletion(-)
create mode 100644 pykickstart/commands/realm.py
create mode 100644 tests/commands/realm.py
--
1.8.1.4
10 years, 11 months
[master-post-alpha] Add current layout indication
by Vratislav Podzimek
These are the results of joint work of me and Máirín to implement layout
indication in Anaconda's GUI.
PATCH 1/3 adds a new Anaconda widget called LayoutIndicator. It is based on the
libxklavier library (no way to use the GNOME's replacement yet (if ever)) and
uses the XklEngine singleton instance to get information about layout switching,
configuration changes etc. I hope the code is vastly commented, but in case of
any doubts I'm glad to explain anything.
PATCH 2/3 adds the LayoutIndicator to our BaseWindow class, so that it appears
in the header of every spoke and hub. The patch also includes some changes that
create more space for the indicator and rearrange the heading a little bit.
Among the other things the red "beta warning" label became smaller. But for some
reason on the WelcomeSpoke it has the same size. Any ideas?
Anyway, that is the "global indicator". Since for dialogs we use lightboxing
that hides the underlying spoke/hub, we would need to place some more indicators
to places where they are needed. The only one so far seems to be the LUKS
passphrase dialog which is the case covered with PATCH 3/3.
The static preview can be seen at:
http://vpodzime.fedorapeople.org/making_room_for_LI_new.png
(the smaller indicator just shows the one that is used in the LUKS dialog)
Tomorrow I will also post a screencast I cannot record it now via SSH.
Vratislav Podzimek (3):
LayoutIndicator widget
Add layout indicator to the BaseWindow
Add layout indicator to the LUKS passphrase dialog
data/pixmaps/anaconda_spoke_header.png | Bin 185 -> 183 bytes
pyanaconda/ui/gui/spokes/lib/passphrase.glade | 19 +-
pyanaconda/ui/gui/spokes/lib/passphrase.py | 20 +-
widgets/configure.ac | 1 +
widgets/glade/AnacondaWidgets.xml | 10 +
widgets/src/BaseWindow.c | 15 +-
widgets/src/LayoutIndicator.c | 446 ++++++++++++++++++++++++++
widgets/src/LayoutIndicator.h | 78 +++++
widgets/src/Makefile.am | 8 +-
widgets/src/SpokeWindow.c | 4 +-
10 files changed, 578 insertions(+), 23 deletions(-)
create mode 100644 widgets/src/LayoutIndicator.c
create mode 100644 widgets/src/LayoutIndicator.h
--
1.7.11.7
10 years, 11 months
[master] do not BR python-bugzilla on RHEL
by David Cantrell
We may have to do this for other components as well.
--
David Cantrell <dcantrell(a)redhat.com>
Manager, Installer Engineering Team
Red Hat, Inc. | Westford, MA | EST5EDT
10 years, 11 months
[PATCH 1/3] Clean up some of the get_object usage in custom.py.
by Chris Lumens
This doesn't handle all of it (there's an awful lot of objects to get), but
it clears up the places in the spoke where we grab the same objects multiple
times.
---
pyanaconda/ui/gui/spokes/custom.glade | 12 +--
pyanaconda/ui/gui/spokes/custom.py | 198 ++++++++++++++++------------------
2 files changed, 97 insertions(+), 113 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.glade b/pyanaconda/ui/gui/spokes/custom.glade
index efdee1a..c969a86 100644
--- a/pyanaconda/ui/gui/spokes/custom.glade
+++ b/pyanaconda/ui/gui/spokes/custom.glade
@@ -418,7 +418,7 @@ use. Try something else?</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <object class="GtkLabel" id="label15">
+ <object class="GtkLabel" id="nameLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">_Name:</property>
@@ -850,7 +850,7 @@ use. Try something else?</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label4">
+ <object class="GtkLabel" id="labelLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@@ -882,7 +882,7 @@ use. Try something else?</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label13">
+ <object class="GtkLabel" id="nameLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@@ -915,7 +915,7 @@ use. Try something else?</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label5">
+ <object class="GtkLabel" id="sizeLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
@@ -955,7 +955,7 @@ use. Try something else?</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<child>
- <object class="GtkLabel" id="label9">
+ <object class="GtkLabel" id="deviceTypeLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
@@ -972,7 +972,7 @@ use. Try something else?</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label10">
+ <object class="GtkLabel" id="fileSystemTypeLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 2e9bdf1..c104d1e 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -372,9 +372,8 @@ class ContainerDialog(GUIObject):
dialog_label.set_text(dialog_text)
# populate the dialog widgets
- name_entry = self.builder.get_object("container_name_entry")
- name_entry.set_text(self.name)
- name_entry.set_sensitive(not self.exists)
+ self._nameEntry.set_text(self.name)
+ self._nameEntry.set_sensitive(not self.exists)
self._store = self.builder.get_object("disk_store")
# populate the store
@@ -610,27 +609,39 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._partitionsViewport = self.builder.get_object("partitionsViewport")
self._partitionsNotebook = self.builder.get_object("partitionsNotebook")
+ self._whenCreateLabel = self.builder.get_object("whenCreateLabel")
+
+ # Buttons
self._addButton = self.builder.get_object("addButton")
- self._removeButton = self.builder.get_object("removeButton")
+ self._applyButton = self.builder.get_object("applyButton")
self._configButton = self.builder.get_object("configureButton")
+ self._removeButton = self.builder.get_object("removeButton")
+ # Detailed configuration stuff
+ self._encryptCheckbox = self.builder.get_object("encryptCheckbox")
+ self._fsCombo = self.builder.get_object("fileSystemTypeCombo")
+ self._labelEntry = self.builder.get_object("labelEntry")
+ self._mountPointEntry = self.builder.get_object("mountPointEntry")
+ self._nameEntry = self.builder.get_object("nameEntry")
+ self._raidLevelCombo = self.builder.get_object("raidLevelCombo")
+ self._raidLevelLabel = self.builder.get_object("raidLevelLabel")
self._reformatCheckbox = self.builder.get_object("reformatCheckbox")
self._sizeEntry = self.builder.get_object("sizeEntry")
+ self._typeCombo = self.builder.get_object("deviceTypeCombo")
- self._applyButton = self.builder.get_object("applyButton")
+ # Stores
+ self._raidStoreFilter = self.builder.get_object("raidStoreFiltered")
def initialize(self):
NormalSpoke.initialize(self)
+ self._grabObjects()
- label = self.builder.get_object("whenCreateLabel")
- self._when_create_text = label.get_text()
+ self._when_create_text = self._whenCreateLabel.get_text()
- self._grabObjects()
setViewportBackground(self.builder.get_object("availableSpaceViewport"), "#db3279")
setViewportBackground(self.builder.get_object("totalSpaceViewport"), "#60605b")
- raidStoreFilter = self.builder.get_object("raidStoreFiltered")
- raidStoreFilter.set_visible_func(self._raid_level_visible)
+ self._raidStoreFilter.set_visible_func(self._raid_level_visible)
self._accordion = Accordion()
self._partitionsViewport.add(self._accordion)
@@ -638,15 +649,14 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# Populate the list of valid filesystem types from the format classes.
# Unfortunately, we have to narrow them down a little bit more because
# this list will include things like PVs and RAID members.
- self.fsCombo = self.builder.get_object("fileSystemTypeCombo")
- self.fsCombo.remove_all()
+ self._fsCombo.remove_all()
threadMgr.add(AnacondaThread(name=THREAD_CUSTOM_STORAGE_INIT, target=self._initialize))
def _initialize(self):
@gtk_action_wait
def gtk_action(name):
- self.fsCombo.append_text(name)
+ self._fsCombo.append_text(name)
self._fs_types = []
for cls in device_formats.itervalues():
@@ -830,8 +840,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._accordion.addPage(page, cb=self.on_page_clicked)
self._partitionsNotebook.set_current_page(NOTEBOOK_LABEL_PAGE)
- label = self.builder.get_object("whenCreateLabel")
- label.set_text(self._when_create_text % (productName, productVersion))
+ self._whenCreateLabel.set_text(self._when_create_text % (productName, productVersion))
else:
swaps = [d for d in new_devices if d.format.type == "swap"]
mounts = dict((d.format.mountpoint, d) for d in new_devices
@@ -1010,9 +1019,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
old_name = getattr(use_dev, "lvname", use_dev.name)
name = old_name
changed_name = False
- name_entry = self.builder.get_object("nameEntry")
- if name_entry.get_sensitive():
- name = name_entry.get_text()
+ if self._nameEntry.get_sensitive():
+ name = self._nameEntry.get_text()
changed_name = (name != old_name)
else:
# name entry insensitive means we don't control the name
@@ -1044,9 +1052,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# FS TYPE
old_fs_type = device.format.type
- fs_type_combo = self.builder.get_object("fileSystemTypeCombo")
- fs_type_index = fs_type_combo.get_active()
- fs_type = fs_type_combo.get_model()[fs_type_index][0]
+ fs_type_index = self._fsCombo.get_active()
+ fs_type = self._fsCombo.get_model()[fs_type_index][0]
fs_type_short = getFormat(fs_type).type
changed_fs_type = (old_fs_type != fs_type_short)
log.debug("old fs type: %s" % old_fs_type)
@@ -1054,17 +1061,15 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# ENCRYPTION
old_encrypted = isinstance(device, LUKSDevice)
- encryption_checkbox = self.builder.get_object("encryptCheckbox")
- encrypted = encryption_checkbox.get_active()
+ encrypted = self._encryptCheckbox.get_active()
changed_encryption = (old_encrypted != encrypted)
log.debug("old encryption setting: %s" % old_encrypted)
log.debug("new encryption setting: %s" % encrypted)
# FS LABEL
- label_entry = self.builder.get_object("labelEntry")
label = ""
- if label_entry.get_sensitive():
- label = label_entry.get_text()
+ if self._labelEntry.get_sensitive():
+ label = self._labelEntry.get_text()
old_label = getattr(device.format, "label", "") or ""
changed_label = (label != old_label)
@@ -1073,9 +1078,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# MOUNTPOINT
mountpoint = None # None means format type is not mountable
- mountPointEntry = self.builder.get_object("mountPointEntry")
- if mountPointEntry.get_sensitive():
- mountpoint = mountPointEntry.get_text()
+ if self._mountPointEntry.get_sensitive():
+ mountpoint = self._mountPointEntry.get_text()
old_mountpoint = getattr(device.format, "mountpoint", "") or ""
log.debug("old mountpoint: %s" % old_mountpoint)
@@ -1454,9 +1458,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
return model[itr][3]
def _get_raid_level(self):
- combo = self.builder.get_object("raidLevelCombo")
- itr = combo.get_active_iter()
- store = combo.get_model()
+ itr = self._raidLevelCombo.get_active_iter()
+ store = self._raidLevelCombo.get_model()
if not itr:
return
@@ -1473,13 +1476,10 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
device_type = self._get_current_device_type()
log.debug("populate_raid: %s, %s" % (device_type, raid_level))
- raid_label = self.builder.get_object("raidLevelLabel")
- raid_combo = self.builder.get_object("raidLevelCombo")
-
if device_type == DEVICE_TYPE_MD:
base_level = "raid1"
else:
- for widget in [raid_label, raid_combo]:
+ for widget in [self._raidLevelLabel, self._raidLevelCombo]:
widget.set_no_show_all(True)
widget.hide()
@@ -1489,18 +1489,17 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
raid_level = base_level
# Set a default RAID level in the combo.
- for (i, row) in enumerate(raid_combo.get_model()):
+ for (i, row) in enumerate(self._raidLevelCombo.get_model()):
if row[0].upper().startswith(raid_level.upper()):
- raid_combo.set_active(i)
+ self._raidLevelCombo.set_active(i)
break
- for widget in [raid_label, raid_combo]:
+ for widget in [self._raidLevelLabel, self._raidLevelCombo]:
widget.set_no_show_all(False)
widget.show()
def _get_current_device_type(self):
- typeCombo = self.builder.get_object("deviceTypeCombo")
- device_type_text = typeCombo.get_active_text()
+ device_type_text = self._typeCombo.get_active_text()
log.info("getting device type for %s" % device_type_text)
device_type = None
if device_type_text == _(DEVICE_TEXT_LVM):
@@ -1520,15 +1519,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
def _populate_right_side(self, selector):
log.debug("populate_right_side: %s" % selector._device)
- encryptCheckbox = self.builder.get_object("encryptCheckbox")
- labelEntry = self.builder.get_object("labelEntry")
- mountPointEntry = self.builder.get_object("mountPointEntry")
- nameEntry = self.builder.get_object("nameEntry")
selectedDeviceLabel = self.builder.get_object("selectedDeviceLabel")
selectedDeviceDescLabel = self.builder.get_object("selectedDeviceDescLabel")
- typeCombo = self.builder.get_object("deviceTypeCombo")
- fsCombo = self.builder.get_object("fileSystemTypeCombo")
- raidLevelCombo = self.builder.get_object("raidLevelCombo")
device = selector._device
if device.type == "luks/dm-crypt":
@@ -1564,23 +1556,23 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
selectedDeviceDescLabel.set_text(self._description(selector.props.name))
device_name = getattr(use_dev, "lvname", use_dev.name)
- nameEntry.set_text(device_name)
+ self._nameEntry.set_text(device_name)
- mountPointEntry.set_text(getattr(device.format, "mountpoint", "") or "")
- mountPointEntry.set_sensitive(device.format.mountable)
+ self._mountPointEntry.set_text(getattr(device.format, "mountpoint", "") or "")
+ self._mountPointEntry.set_sensitive(device.format.mountable)
# FIXME: Make sure you cannot set a label for specific btrfs subvols
- labelEntry.set_text(getattr(device.format, "label", "") or "")
+ self._labelEntry.set_text(getattr(device.format, "label", "") or "")
# We could label existing formats that have a labelFsProg if we added an
# ActionLabelFormat class.
can_label = (hasattr(device.format, "label") and
not device.format.exists)
- labelEntry.set_sensitive(can_label)
+ self._labelEntry.set_sensitive(can_label)
if hasattr(device.format, "label"):
- labelEntry.props.has_tooltip = False
+ self._labelEntry.props.has_tooltip = False
else:
- labelEntry.set_tooltip_text(_("This file system does not support labels."))
+ self._labelEntry.set_tooltip_text(_("This file system does not support labels."))
self._sizeEntry.set_text(Size(spec="%d MB" % device.size).humanReadable(max_places=None))
self._sizeEntry.set_sensitive(device.resizable or not device.exists)
@@ -1595,14 +1587,14 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
use_dev.exists and
not use_dev.type.startswith("btrfs"))
- encryptCheckbox.set_active(isinstance(device, LUKSDevice))
- encryptCheckbox.set_sensitive(self._reformatCheckbox.get_active())
+ self._encryptCheckbox.set_active(isinstance(device, LUKSDevice))
+ self._encryptCheckbox.set_sensitive(self._reformatCheckbox.get_active())
ancestors = use_dev.ancestors
ancestors.remove(use_dev)
if any(a.format.type == "luks" and a.format.exists for a in ancestors):
# The encryption checkbutton should not be sensitive if there is
# existing encryption below the leaf layer.
- encryptCheckbox.set_sensitive(False)
+ self._encryptCheckbox.set_sensitive(False)
##
## Set up the filesystem type combo.
@@ -1610,29 +1602,29 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# remove any fs types that aren't supported
remove_indices = []
- for idx, data in enumerate(fsCombo.get_model()):
+ for idx, data in enumerate(self._fsCombo.get_model()):
fs_type = data[0]
if fs_type not in self._fs_types:
remove_indices.insert(0, idx)
continue
if fs_type == device.format.name:
- fsCombo.set_active(idx)
+ self._fsCombo.set_active(idx)
for remove_idx in remove_indices:
- fsCombo.remove(remove_idx)
+ self._fsCombo.remove(remove_idx)
# if the current device has unsupported formatting, add an entry for it
if device.format.name not in self._fs_types:
- fsCombo.append_text(device.format.name)
- fsCombo.set_active(len(fsCombo.get_model()) - 1)
+ self._fsCombo.append_text(device.format.name)
+ self._fsCombo.set_active(len(self._fsCombo.get_model()) - 1)
# Give them a way to reset to original formatting. Whenever we add a
# "reformat this" widget this will need revisiting.
if device.exists and \
device.format.type != device.originalFormat.type and \
device.originalFormat.type not in self._fs_types:
- fsCombo.append_text(device.originalFormat.name)
+ self._fsCombo.append_text(device.originalFormat.name)
##
## Set up the device type combo.
@@ -1644,7 +1636,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
md_included = False
disk_pos = None
disk_included = False
- for idx, itr in enumerate(typeCombo.get_model()):
+ for idx, itr in enumerate(self._typeCombo.get_model()):
if itr[0] == _(DEVICE_TEXT_BTRFS):
btrfs_pos = idx
btrfs_included = True
@@ -1661,7 +1653,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
include_md = (use_dev.type == "mdarray" or
len(self._clearpartDevices) > 1)
if include_md and not md_included:
- typeCombo.append_text(_(DEVICE_TEXT_MD))
+ self._typeCombo.append_text(_(DEVICE_TEXT_MD))
elif md_included and not include_md:
remove_indices.append(md_pos)
@@ -1669,25 +1661,25 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
include_btrfs = (use_dev.format.type not in
partition_only_format_types + ["swap"])
if include_btrfs and not btrfs_included:
- typeCombo.append_text(_(DEVICE_TEXT_BTRFS))
+ self._typeCombo.append_text(_(DEVICE_TEXT_BTRFS))
elif btrfs_included and not include_btrfs:
remove_indices.append(btrfs_pos)
# only include disk if the current device is a disk
include_disk = use_dev.isDisk
if include_disk and not disk_included:
- typeCombo.append_text(_(DEVICE_TEXT_DISK))
+ self._typeCombo.append_text(_(DEVICE_TEXT_DISK))
elif disk_included and not include_disk:
remove_indices.append(disk_pos)
remove_indices.sort(reverse=True)
- map(typeCombo.remove, remove_indices)
+ map(self._typeCombo.remove, remove_indices)
md_pos = None
btrfs_pos = None
partition_pos = None
lvm_pos = None
- for idx, itr in enumerate(typeCombo.get_model()):
+ for idx, itr in enumerate(self._typeCombo.get_model()):
if itr[0] == _(DEVICE_TEXT_BTRFS):
btrfs_pos = idx
elif itr[0] == _(DEVICE_TEXT_MD):
@@ -1723,13 +1715,13 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._device_name_dict[_type] = name
- typeCombo.set_active(type_index_map[device_type])
- fsCombo.set_sensitive(self._reformatCheckbox.get_active() and
- device_type != DEVICE_TYPE_BTRFS)
+ self._typeCombo.set_active(type_index_map[device_type])
+ self._fsCombo.set_sensitive(self._reformatCheckbox.get_active() and
+ device_type != DEVICE_TYPE_BTRFS)
# you can't change the type of an existing device
- typeCombo.set_sensitive(not use_dev.exists)
- raidLevelCombo.set_sensitive(not use_dev.exists)
+ self._typeCombo.set_sensitive(not use_dev.exists)
+ self._raidLevelCombo.set_sensitive(not use_dev.exists)
# FIXME: device encryption should be mutually exclusive with container
# encryption
@@ -1737,13 +1729,13 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# FIXME: device raid should be mutually exclusive with container raid
# you can't encrypt a btrfs subvolume -- only the volume/container
- encryptCheckbox.set_sensitive(device_type != DEVICE_TYPE_BTRFS)
+ self._encryptCheckbox.set_sensitive(device_type != DEVICE_TYPE_BTRFS)
self._populate_raid(raid_level)
self._populate_container(device=use_dev)
# do this last in case this was set sensitive in on_device_type_changed
if use_dev.exists:
- nameEntry.set_sensitive(False)
+ self._nameEntry.set_sensitive(False)
###
### SIGNAL HANDLERS
@@ -2370,8 +2362,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
def on_reformat_toggled(self, widget):
active = widget.get_active()
- encryption_checkbutton = self.builder.get_object("encryptCheckbox")
- encryption_checkbutton.set_sensitive(active)
+ self._encryptCheckbox.set_sensitive(active)
if self._current_selector:
device = self._current_selector._device
if device.type == "luks/dm-crypt":
@@ -2382,27 +2373,25 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
if any(a.format.type == "luks" and a.format.exists for a in ancestors):
# The encryption checkbutton should not be sensitive if there is
# existing encryption below the leaf layer.
- encryption_checkbutton.set_sensitive(False)
+ self._encryptCheckbox.set_sensitive(False)
# you can't encrypt a btrfs subvolume -- only the volume/container
device_type = self._get_current_device_type()
if device_type == DEVICE_TYPE_BTRFS:
- encryption_checkbutton.set_active(False)
+ self._encryptCheckbox.set_active(False)
- encryption_checkbutton.set_sensitive(device_type != DEVICE_TYPE_BTRFS)
+ self._encryptCheckbox.set_sensitive(device_type != DEVICE_TYPE_BTRFS)
- fs_combo = self.builder.get_object("fileSystemTypeCombo")
- fs_combo.set_sensitive(active)
+ self._fsCombo.set_sensitive(active)
# The label entry can only be sensitive if reformat is active and the
# currently selected filesystem can be labeled.
label_active = active
if active:
- fmt = getFormat(fs_combo.get_active_text())
+ fmt = getFormat(self._fsCombo.get_active_text())
label_active = active and hasattr(fmt, "label")
- label_entry = self.builder.get_object("labelEntry")
- label_entry.set_sensitive(label_active)
+ self._labelEntry.set_sensitive(label_active)
def on_fs_type_changed(self, combo):
if not self._initialized:
@@ -2413,12 +2402,10 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
return
log.debug("fs type changed: %s" % new_type)
fmt = getFormat(new_type)
- mountPointEntry = self.builder.get_object("mountPointEntry")
- labelEntry = self.builder.get_object("labelEntry")
# FIXME: can't set a label on an existing format as of now
- labelEntry.set_sensitive(self._reformatCheckbox.get_active() and
- hasattr(fmt, "label"))
- mountPointEntry.set_sensitive(fmt.mountable)
+ self._labelEntry.set_sensitive(self._reformatCheckbox.get_active() and
+ hasattr(fmt, "label"))
+ self._mountPointEntry.set_sensitive(fmt.mountable)
def _populate_container(self, device=None):
""" Set up the vg widgets for lvm or hide them for other types. """
@@ -2531,19 +2518,16 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# this has to be done before calling populate_raid since it will need
# the raid level combo to contain the relevant raid levels for the new
# device type
- raidStoreFilter = self.builder.get_object("raidStoreFiltered")
- raidStoreFilter.refilter()
+ self._raidStoreFilter.refilter()
self._populate_raid(raid_level)
self._populate_container()
- nameEntry = self.builder.get_object("nameEntry")
- nameEntry.set_sensitive(new_type in (DEVICE_TYPE_LVM, DEVICE_TYPE_MD))
- nameEntry.set_text(self._device_name_dict[new_type])
+ self._nameEntry.set_sensitive(new_type in (DEVICE_TYPE_LVM, DEVICE_TYPE_MD))
+ self._nameEntry.set_text(self._device_name_dict[new_type])
# begin btrfs magic
- fsCombo = self.builder.get_object("fileSystemTypeCombo")
- model = fsCombo.get_model()
+ model = self._fsCombo.get_model()
btrfs_included = False
btrfs_pos = None
for idx, data in enumerate(model):
@@ -2551,22 +2535,22 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
btrfs_included = True
btrfs_pos = idx
- active_index = fsCombo.get_active()
- fstype = fsCombo.get_active_text()
+ active_index = self._fsCombo.get_active()
+ fstype = self._fsCombo.get_active_text()
if btrfs_included and not include_btrfs:
for i in range(0, len(model)):
if fstype == "btrfs" and \
model[i][0] == self.storage.defaultFSType:
active_index = i
break
- fsCombo.remove(btrfs_pos)
+ self._fsCombo.remove(btrfs_pos)
elif include_btrfs and not btrfs_included:
- fsCombo.append_text("btrfs")
- active_index = len(fsCombo.get_model()) - 1
+ self._fsCombo.append_text("btrfs")
+ active_index = len(self._fsCombo.get_model()) - 1
- fsCombo.set_active(active_index)
- fsCombo.set_sensitive(self._reformatCheckbox.get_active() and
- fs_type_sensitive)
+ self._fsCombo.set_active(active_index)
+ self._fsCombo.set_sensitive(self._reformatCheckbox.get_active() and
+ fs_type_sensitive)
# end btrfs magic
def clear_errors(self):
--
1.8.1.2
10 years, 11 months
[PATCH] Fix a probably rare traceback in resizing from the custom part UI.
by Chris Lumens
As far as I can tell, this really only happens if you have previous partitions
taking up the entire disk, blank out the desired capacity for a partition that
is resizeable, and click the update button. Since it cannot be resized, we
hit a traceback that our earlier tests for this condition do not catch.
---
pyanaconda/ui/gui/spokes/custom.py | 46 +++++++++++++++++++++-----------------
1 file changed, 25 insertions(+), 21 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 092b9a2..7c4590f 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -1327,35 +1327,39 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self.__storage.resetDevice(original_device)
if changed_size and device.resizable:
- log.debug("scheduling resize of device %s to %s MB"
- % (device.name, size))
# If no size was specified, we just want to grow to
# the maximum. But resizeDevice doesn't take None for
# a value.
if not size:
size = device.maxSize
- with ui_storage_logger():
- try:
- self.__storage.resizeDevice(device, size)
- except StorageError as e:
- log.error("failed to schedule device resize: %s" % e)
- device.size = old_size
- self._error = e
- self.set_warning(_("Device resize request failed. "
- "Click for details."))
- self.window.show_all()
- else:
- log.debug("%r" % device)
- log.debug("new size: %s" % device.size)
- log.debug("target size: %s" % device.targetSize)
+ # And then we need to re-check that the max size is actually
+ # different from the current size.
+ if size != device.size:
+ log.debug("scheduling resize of device %s to %s MB"
+ % (device.name, size))
- # update the selector's size property
- selectorFromDevice(device, selector=selector)
+ with ui_storage_logger():
+ try:
+ self.__storage.resizeDevice(device, size)
+ except StorageError as e:
+ log.error("failed to schedule device resize: %s" % e)
+ device.size = old_size
+ self._error = e
+ self.set_warning(_("Device resize request failed. "
+ "Click for details."))
+ self.window.show_all()
+ else:
+ log.debug("%r" % device)
+ log.debug("new size: %s" % device.size)
+ log.debug("target size: %s" % device.targetSize)
- # update size props of all btrfs devices' selectors
- self._update_selectors()
- self._updateSpaceDisplay()
+ # update the selector's size property
+ selectorFromDevice(device, selector=selector)
+
+ # update size props of all btrfs devices' selectors
+ self._update_selectors()
+ self._updateSpaceDisplay()
# it's possible that reformat is active but fstype is unchanged, in
# which case we're not going to schedule another reformat unless
--
1.8.1.2
10 years, 11 months
[PATCH] Add support for realm command
by Martin Kolman
As it has been decided to implement support for the realm command directly
in anaconda, this patch adds support for the realm command. It needs the corresponding
realm patch for pykickstart, which handles command parsing.
The patch is based on Stef's original realm patch and Vratislav's realm addon.
Martin Kolman (1):
Add support for the realm command
anaconda.spec.in | 1 +
pyanaconda/install.py | 26 +++++++++++---
pyanaconda/kickstart.py | 95 +++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 118 insertions(+), 4 deletions(-)
--
1.8.1.4
10 years, 11 months
[master] Fixes for the Datetime spoke
by Vratislav Podzimek
PATCH 1/3 fixes a potential issue that probably cannot be hit.
PATCH 2/3 is needed for the PATCH 3/3 that changes the flow of the data when the
timezone information is updated. Instead of selecting timezone on the map and
relying on the signals it emits to update the other UI elements, it sets the
timezone in the comboboxes and relies on their signals to propagate the change.
The result is more robust because the indication on the map is more like an
optional feature that may do internally anything with the data it gets and may
even fail safely if we want to allow users set timezone that is not supported by
the map (e.g. "Etc/UTC"). It also fixes bug #953311 that was caused by the map
reporting America/SOMETHING (synonyms) for US/SOMETHING timezones selected.
Vratislav Podzimek (3):
Sensitivity of the date&time settings doesn't depend on timezone
Allow setting timezone on the map without signal
Streamline DatetimeSpoke's timezone updating (#953311)
pyanaconda/ui/gui/spokes/datetime_spoke.py | 74 +++++++++++++++++-------------
widgets/python/AnacondaWidgets.py | 7 +++
widgets/src/TimezoneMap.c | 19 +++++---
widgets/src/TimezoneMap.h | 5 +-
4 files changed, 64 insertions(+), 41 deletions(-)
--
1.7.11.7
10 years, 11 months
[python-meh][trivialPATCH] Epoch of the package from RPM db can be None (#957789)
by Vratislav Podzimek
None has to be replaced with some default ("0"), otherwise libreport raises
expcetion and bug reporting doesn't work.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
meh/dump.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meh/dump.py b/meh/dump.py
index 5137719..cc049c0 100644
--- a/meh/dump.py
+++ b/meh/dump.py
@@ -144,7 +144,7 @@ class ExceptionDump(object):
raise RPMinfoError("Cannot get package and component for file "+
"{0}".format(file_))
pkg_info = PackageInfo(header["name"], header["version"],
- header["release"], header["epoch"],
+ header["release"], header["epoch"] or "0",
header["arch"])
# cuts the name from the NVR format: foo-blah-2.8.8-2.fc17.src.rpm
--
1.7.11.7
10 years, 11 months