[anaconda:master] Simplify and robustify handling of fstype combo box.
by Anne Mulhern
Changes are:
* just fill the combo from scratch rather than traversing it to remove
unwanted items.
- therefore, don't fill the combo in _initialize
* Handle possible BTRFS device type in _setup_fstype_combo().
* Sort _all_ the names alphabetically, instead of tacking on a few
unsupported filesystem names at end.
* Make _fs_types attribute be a set, not a list.
* Make a note that _update_fstype_combo() is idempotent and needs to stay
that way.
Non-changes are:
* Retain the complicated check for the original format's name. I don't
know why the check is all about the format's type instead of the name,
but it is, so I figure I'ld better leave it like that.
Advantages are:
* Get rid of a code smell. The first half of the code that removed
unsupported filesystem names assumed unsupported
filesystems names could occur anywhere in the combo box,
while the second part of the removal code assumed that unsupported
filesystem names could only occur after the device's filesystem name.
In the current setup, the second assumption is the correct one, so the
code actually worked. If the first assumption had been correct, then
the second half of the code would have been buggy. Therefore, the whole
code block looked suspicious.
* Make the custom spoke a bit less stateful.
* Make sure that btrfs name is included correctly. It currently is,
but only because _setup_device_type_combo() is invoked after
_setup_fstype_combo(), and _setup_device_type_combo() causes
_typeCombo._setActive() to be invoked, which triggers an event which
causes on_device_type_changed() to be invoked, which in turn invokes
the _update_fstype_combo() method. It seems wrong
to expect memory of that ordering requirement to be retained forever,
so better to make it unnecessary by invoking _update_fstype_combo()
explicitly in _setup_fstype_combo(). This means that _update_fstype_combo()
is called twice, but since it is idempotent, that is no problem.
* Fewer lines of code.
Signed-off-by: mulhern <amulhern(a)redhat.com>
---
pyanaconda/ui/gui/spokes/custom.py | 71 ++++++++++++++++++--------------------
1 file changed, 34 insertions(+), 37 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index fca7f3f..e65316c 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -85,7 +85,7 @@ from pyanaconda.ui.gui.spokes.lib.custom_storage_helpers import get_container_ty
from pyanaconda.ui.gui.spokes.lib.custom_storage_helpers import AddDialog, ConfirmDeleteDialog, DisksDialog, ContainerDialog, HelpDialog
from pyanaconda.ui.gui.utils import setViewportBackground, fancy_set_sensitive, ignoreEscape
-from pyanaconda.ui.gui.utils import really_hide, really_show, GtkActionList, timed_action
+from pyanaconda.ui.gui.utils import really_hide, really_show, timed_action
from pyanaconda.ui.categories.system import SystemCategory
from gi.repository import Gdk, Gtk
@@ -161,7 +161,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._devices = []
self._error = None
self._hidden_disks = []
- self._fs_types = [] # list of supported fstypes
+ self._fs_types = set() # set of supported fstypes
self._free_space = Size(0)
self._device_disks = []
@@ -273,15 +273,14 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._accordion = Accordion()
self._partitionsViewport.add(self._accordion)
- # 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.remove_all()
-
threadMgr.add(AnacondaThread(name=THREAD_CUSTOM_STORAGE_INIT, target=self._initialize))
def _initialize(self):
- self._fs_types = []
+ """ Populate the set of valid filesystem types from the format classes.
+
+ Restrict the set to ones that we might allow users to select.
+ """
+ _fs_types = []
for cls in device_formats.itervalues():
obj = cls()
@@ -292,15 +291,9 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
(isinstance(obj, FS) or
obj.type in ["biosboot", "prepboot", "swap"]))
if supported_fs:
- self._fs_types.append(obj.name)
-
- # Display the file system types in alphabetical order.
- actions = GtkActionList()
- self._fs_types.sort()
- for ty in self._fs_types:
- actions.add_action(self._fsCombo.append_text, ty)
+ _fs_types.append(obj.name)
- actions.fire()
+ self._fs_types = set(_fs_types)
@property
def _clearpartDevices(self):
@@ -1303,32 +1296,34 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
or defaultContainerRaidLevel(devicefactory.get_device_type(use_dev))
def _setup_fstype_combo(self, device):
- # remove any fs types that aren't supported
- remove_indices = []
- for idx, row in enumerate(self._fsCombo.get_model()):
- fs_type = row[0]
- if fs_type not in self._fs_types:
- remove_indices.append(idx)
- continue
-
- if fs_type == device.format.name:
- self._fsCombo.set_active(idx)
+ """ Setup the filesystem combo box.
- # remove items from the combobox in reversed order so that item 3
- # doesn't become item 2 by removing item 1 etc.
- map(self._fsCombo.remove, reversed(remove_indices))
-
- # if the current device has unsupported formatting, add an entry for it
- if device.format.name not in self._fs_types:
- self._fsCombo.append_text(device.format.name)
- self._fsCombo.set_active(len(self._fsCombo.get_model()) - 1)
+ :param device: blivet.devices.Device instance
+ """
+ type_name = device.format.name
- # Give them a way to reset to original formatting. Whenever we add a
- # "reformat this" widget this will need revisiting.
+ # Possibly unsupported but still required filesystem names
if device.exists and \
device.format.type != device.originalFormat.type and \
device.originalFormat.type not in self._fs_types:
- self._fsCombo.append_text(device.originalFormat.name)
+ extra_names = (type_name, device.originalFormat.name)
+ else:
+ extra_names = (type_name,)
+
+ names = list(self._fs_types.union(extra_names))
+ names.sort()
+
+ # Add all desired fileystem type names to the box, sorted alphabetically
+ self._fsCombo.remove_all()
+ for ty in names:
+ self._fsCombo.append_text(ty)
+
+ # set the active filesystem type
+ idx = next(i for i, data in enumerate(self._fsCombo.get_model()) if data[0] == type_name)
+ self._fsCombo.set_active(idx)
+
+ # do additional updating handled by other method
+ self._update_fstype_combo(devicefactory.get_device_type(device))
def _btrfs_in_typecombo(self, device):
""" Whether BTRFS should appear in device type combo box.
@@ -2495,6 +2490,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
* the filesystem combo contains at least the default filesystem
* the default filesystem is not the same as btrfs
* if device_type is DEVICE_TYPE_BTRFS, btrfs is supported
+
+ This method is idempotent, and must remain so.
"""
# Find unique instance of btrfs in fsCombo, if any.
btrfs_idx = next((idx for idx, data in enumerate(self._fsCombo.get_model()) if data[0] == "btrfs"), None)
--
1.9.3
9 years, 4 months
[PATCH 1/2] Add missing dnf package selection support (#1169056)
by Brian C. Lane
DNFPayload was missing the ability to remove packages, groups and
environments. This adds support for those actions, as well as re-orders
the execution in _apply_selections to match the order than YUMPayload
uses.
---
pyanaconda/packaging/dnfpayload.py | 135 ++++++++++++++++++++++++++++---------
1 file changed, 102 insertions(+), 33 deletions(-)
diff --git a/pyanaconda/packaging/dnfpayload.py b/pyanaconda/packaging/dnfpayload.py
index ad9e4d7..7a91c26 100644
--- a/pyanaconda/packaging/dnfpayload.py
+++ b/pyanaconda/packaging/dnfpayload.py
@@ -45,16 +45,11 @@ from pyanaconda.iutil import ProxyString, ProxyStringError
log = logging.getLogger("packaging")
-try:
- import dnf
- import dnf.exceptions
- import dnf.repo
- import dnf.callback
- import rpm
-except ImportError as e:
- log.error("dnfpayload: component import failed: %s", e)
- dnf = None
- rpm = None
+import dnf
+import dnf.exceptions
+import dnf.repo
+import dnf.callback
+import rpm
DNF_CACHE_DIR = '/tmp/dnf.cache'
DNF_PACKAGE_CACHE_DIR_SUFFIX = 'dnf.package.cache'
@@ -256,7 +251,11 @@ class DNFPayload(packaging.PackagePayload):
if self.data.packages.nocore:
log.info("skipping core group due to %%packages --nocore; system may not be complete")
else:
- self._select_group('core')
+ try:
+ self._select_group('core', required=True)
+ log.info("selected group: core")
+ except packaging.NoSuchGroup as e:
+ self._miss(e)
env = None
@@ -268,35 +267,58 @@ class DNFPayload(packaging.PackagePayload):
if env:
try:
self._select_environment(env)
- except NoSuchGroup as e:
- self._handleMissing(e)
-
- for pkg_name in self.data.packages.packageList:
- log.info("selecting package: '%s'", pkg_name)
- try:
- self._install_package(pkg_name)
- except packaging.NoSuchPackage as e:
+ log.info("selected env: %s", env)
+ except packaging.NoSuchGroup as e:
self._miss(e)
for group in self.data.packages.groupList:
if group.name == 'core':
continue
+ default = group.include in (GROUP_ALL,
+ GROUP_DEFAULT)
+ optional = group.include == GROUP_ALL
try:
- default = group.include in (GROUP_ALL,
- GROUP_DEFAULT)
- optional = group.include == GROUP_ALL
self._select_group(group.name, default=default, optional=optional)
+ log.info("selected group: %s", group.name)
except packaging.NoSuchGroup as e:
self._miss(e)
- for package in self.requiredPackages:
- self._install_package(package, required=True)
+ for group in self.data.packages.excludedGroupList:
+ try:
+ self._deselect_group(group.name)
+ log.info("deselected group: %s", group.name)
+ except packaging.NoSuchGroup:
+ log.info("skipped removing nonexistant group: %s", group.name)
- for group in self.requiredGroups:
- self._select_group(group, required=True)
+ for pkg_name in self.data.packages.packageList:
+ try:
+ self._install_package(pkg_name)
+ log.info("selected package: '%s'", pkg_name)
+ except packaging.NoSuchPackage as e:
+ self._miss(e)
+
+ for pkg_name in self.data.packages.excludedList:
+ try:
+ self._remove_package(pkg_name)
+ log.info("removed package: %s", pkg_name)
+ except packaging.NoSuchPackage:
+ log.info("skipped removing nonexistant package: %s", pkg_name)
self._select_kernel_package()
- self._install_package('dnf')
+
+ for pkg_name in self.requiredPackages:
+ try:
+ self._install_package(pkg_name, required=True)
+ log.debug("selected required package: %s", pkg_name)
+ except packaging.NoSuchPackage as e:
+ self._miss(e)
+
+ for group in self.requiredGroups:
+ try:
+ self._select_group(group, required=True)
+ log.debug("selected required group: %s", group)
+ except packaging.NoSuchGroup as e:
+ self._miss(e)
def _bump_tx_id(self):
if self.txID is None:
@@ -340,6 +362,12 @@ class DNFPayload(packaging.PackagePayload):
except dnf.exceptions.MarkingError:
raise packaging.NoSuchPackage(pkg_name, required=required)
+ def _remove_package(self, pkg_name):
+ try:
+ return self._base.remove(pkg_name)
+ except dnf.exceptions.PackagesNotInstalledError:
+ raise packaging.NoSuchPackage(pkg_name)
+
def _miss(self, exn):
if self.data.packages.handleMissing == KS_MISSING_IGNORE:
return
@@ -378,7 +406,47 @@ class DNFPayload(packaging.PackagePayload):
if optional:
types.add('optional')
exclude = self.data.packages.excludedList
- self._base.group_install(grp, types, exclude=exclude)
+ try:
+ self._base.group_install(grp, types, exclude=exclude)
+ except dnf.exceptions.CompsError as e:
+ # DNF raises this when it is already selected
+ log.debug(e)
+
+ def _deselect_group(self, group_id):
+ grp = self._base.comps.group_by_pattern(group_id)
+ if grp is None:
+ raise packaging.NoSuchGroup(group_id)
+ try:
+ self._base.group_remove(grp)
+ except dnf.exceptions.CompsError as e:
+ # DNF raises this when it is already not selected
+ log.debug(e)
+
+ def _select_environment(self, env_id, default=True, optional=False, required=False):
+ env = self._base.comps.environment_by_pattern(env_id)
+ if env is None:
+ raise packaging.NoSuchGroup(env_id, required=required)
+ types = {'mandatory'}
+ if default:
+ types.add('default')
+ if optional:
+ types.add('optional')
+ exclude = self.data.packages.excludedList
+ try:
+ self._base.environment_install(env, types, exclude=exclude)
+ except dnf.exceptions.CompsError as e:
+ # DNF raises this when it is already selected
+ log.debug(e)
+
+ def _deselect_environment(self, env_id):
+ env = self._base.comps.environment_by_pattern(env_id)
+ if env is None:
+ raise packaging.NoSuchGroup(env_id)
+ try:
+ self._base.environment_remove(env)
+ except dnf.exceptions.CompsError as e:
+ # DNF raises this when it is already not selected
+ log.debug(e)
def _select_kernel_package(self):
kernels = self.kernelPackages
@@ -543,7 +611,7 @@ class DNFPayload(packaging.PackagePayload):
_failure_limbo()
pkgs_to_download = self._base.transaction.install_set
- log.info('Downloading pacakges.')
+ log.info('Downloading packages.')
progressQ.send_message(_('Downloading packages'))
progress = DownloadProgress()
try:
@@ -602,7 +670,9 @@ class DNFPayload(packaging.PackagePayload):
def preInstall(self, packages=None, groups=None):
super(DNFPayload, self).preInstall(packages, groups)
- self.requiredPackages = packages
+ self.requiredPackages = ["dnf"]
+ if packages:
+ self.requiredPackages += packages
self.requiredGroups = groups
self.addDriverRepos()
@@ -611,9 +681,8 @@ class DNFPayload(packaging.PackagePayload):
self.txID = None
self._base.reset(sack=True, repos=True)
- def selectEnvironment(self, environmentid):
- env = self._base.comps.environment_by_pattern(environmentid)
- map(self.selectGroup, (id_.name for id_ in env.group_ids))
+ def selectEnvironment(self, env_id):
+ self._select_environment(env_id)
def updateBaseRepo(self, fallback=True, root=None, checkmount=True):
log.info('configuring base repo')
--
1.9.3
9 years, 4 months
[master] Hide/unhide the AM/PM part and make timezone changing work
by Vratislav Podzimek
Making the AM/PM part just insensitive may lead into things like "13:25 PM"
being shown (though greyd out) if NTP is turned off. A video preview can be
found at:
http://vpodzime.fedorapeople.org/am_pm_reveal.webm
The space between the time and AM/PM and 24-hours radio buttons is stupid, but
getting rid of it would require some more thinking and design decisions.
PATCH 1/2 is just a cherry-pick from rhel7-branch and makes time zone changes
reflected in the displayed time.
Vratislav Podzimek (2):
Fix issues with the date&time not being updated on timezone changes
Put AM/PM label and buttons in a revealer and hide/unhide them
pyanaconda/ui/gui/spokes/datetime_spoke.glade | 112 ++++++++++++++++----------
pyanaconda/ui/gui/spokes/datetime_spoke.py | 10 ++-
2 files changed, 75 insertions(+), 47 deletions(-)
--
1.9.3
9 years, 4 months
[master/rhel7-branch 1/2] Fix threading issues for dasdfmt in gui storage. (#1073982)
by Samantha N. Bueno
Prior code I committed manually issued a call to spoke.execute()
in the storage spoke once dasdfmt had been run (if doing a ks
installation). Turns out this is a Bad Idea. spoke.execute() is
called anyway from pyanaconda.ui.gui.hubs once it is detected that
a spoke has changed, so this is not necessary.
Resolves: rhbz#1073982
---
pyanaconda/ui/gui/spokes/storage.py | 4 ----
1 file changed, 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 874e3e3..a8c269e 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -717,10 +717,6 @@ class StorageSpoke(NormalSpoke, StorageChecker):
log.error(str(err))
continue
- # I really hate doing this, but the way is the way; probably the most
- # correct way to kajigger the storage spoke into becoming ready
- self.execute()
-
# signal handlers
def on_summary_clicked(self, button):
# show the selected disks dialog
--
1.8.3.1
9 years, 4 months
[blivet:master/rhel7 0/9] #1090009 related patches (v2)
by Anne Mulhern
I couldn't test previous patches on RHEL7 very easily because of the
problem with curl and authentication. When it occurred to me that I
could test them on master, I found that they achieved nothing. The new
approach is tested on master and appears to work.
The first three patches are only for master. They are efforts that I thought
would solve the problem once and I don't want to waste the work.
The #1090009 labeled patches are all necessary to actually fix the bug.
It would be good to make some separate little class to read useful information
like the array_state from the little files that mdadm likes to stow away.
mddetail sort of does this, but its output is meant to be human readable,
which also means hard to parse. But that is a worry for another day.
mulhern (9):
Change _matchNames so that it is less restrictive
Add mddetail2 method.
Substitute simple value for single element array.
Change allow_degraded_mdraid flag to allow_imperfect_devices
(#1090009)
Make a procedure for reading an array's state from its file (#1090009)
Use mdraid.new md_array_state() method to get state of md array
(#1090009)
Add mdrun method to just start, not assemble, an array. (#1090009)
Add a method that looks at DEVNAME (#1090009)
If allowing degraded array, attempt to start it (#1090009)
blivet/devicelibs/mdraid.py | 58 +++++++++++++++++
blivet/devices/md.py | 14 ++--
blivet/devicetree.py | 34 +++++++---
blivet/flags.py | 4 +-
blivet/udev.py | 3 +
tests/devicelibs_test/mdraid_interrogate_test.py | 83 +++++++++++++++++++-----
6 files changed, 161 insertions(+), 35 deletions(-)
--
1.9.3
9 years, 4 months
[PATCH] Add variable substitution to DNF (#1164803)
by Brian C. Lane
Add support for $releasever and $basearch in the kickstart url and repo
commands when using dnf.
---
pyanaconda/packaging/dnfpayload.py | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/packaging/dnfpayload.py b/pyanaconda/packaging/dnfpayload.py
index 2d4a151..8e3246a 100644
--- a/pyanaconda/packaging/dnfpayload.py
+++ b/pyanaconda/packaging/dnfpayload.py
@@ -22,6 +22,7 @@
import os
from blivet.size import Size
+import blivet.arch
from pyanaconda.flags import flags
from pyanaconda.i18n import _
from pyanaconda.progress import progressQ
@@ -196,6 +197,25 @@ class DNFPayload(packaging.PackagePayload):
super(DNFPayload, self).unsetup()
self._base = None
+ def _replace_vars(self, url):
+ """ Replace url variables with their values
+
+ :param url: url string to do replacement on
+ :type url: string
+ :returns: string with variables substituted
+ :rtype: string or None
+
+ Currently supports $releasever and $basearch
+ """
+ if not url:
+ return url
+
+ url = url.replace("$releasever", self._base.conf.releasever)
+ url = url.replace("$basearch", blivet.arch.getArch())
+
+ return url
+
+
def _add_repo(self, ksrepo):
"""Add a repo to the dnf repo object
@@ -204,8 +224,8 @@ class DNFPayload(packaging.PackagePayload):
:returns: None
"""
repo = dnf.repo.Repo(ksrepo.name, DNF_CACHE_DIR)
- url = ksrepo.baseurl
- mirrorlist = ksrepo.mirrorlist
+ url = self._replace_vars(ksrepo.baseurl)
+ mirrorlist = self._replace_vars(ksrepo.mirrorlist)
if url:
repo.baseurl = [url]
if mirrorlist:
@@ -220,7 +240,7 @@ class DNFPayload(packaging.PackagePayload):
except dnf.exceptions.RepoError as e:
raise packaging.MetadataError(e)
- log.info("added repo: '%s'", ksrepo.name)
+ log.info("added repo: '%s' - %s", ksrepo.name, url or mirrorlist)
def addRepo(self, ksrepo):
"""Add a repo to dnf and kickstart repo lists
--
1.9.3
9 years, 4 months
[PATCH 1/2] Sync up the Selected Disks and Configure Mount Points dialogs (#1171838).
by Chris Lumens
It doesn't make sense for these two dialogs to display different columns. This
adds the pretty name (like "sda") to the latter dialog and also puts its columns
in the same order as the former.
---
.../ui/gui/spokes/lib/custom_storage_helpers.glade | 34 +++++++++++-----------
.../ui/gui/spokes/lib/custom_storage_helpers.py | 4 +--
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.glade b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.glade
index cb9e925..c73e528 100644
--- a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.glade
+++ b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.glade
@@ -96,13 +96,13 @@
</object>
<object class="GtkListStore" id="disk_store">
<columns>
- <!-- column-name disk_col -->
+ <!-- column-name description_col -->
<column type="gchararray"/>
<!-- column-name capacity_col -->
<column type="gchararray"/>
<!-- column-name free_col -->
<column type="gchararray"/>
- <!-- column-name serial_col -->
+ <!-- column-name name_col -->
<column type="gchararray"/>
<!-- column-name id_col -->
<column type="gint"/>
@@ -217,12 +217,12 @@
</object>
</child>
<child>
- <object class="GtkTreeViewColumn" id="disk_column">
+ <object class="GtkTreeViewColumn" id="description_column">
<property name="spacing">6</property>
- <property name="title" translatable="yes">Disk</property>
+ <property name="title" translatable="yes">Description</property>
<property name="clickable">True</property>
<child>
- <object class="GtkCellRendererText" id="disk_renderer"/>
+ <object class="GtkCellRendererText" id="description_renderer"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
@@ -230,40 +230,40 @@
</object>
</child>
<child>
- <object class="GtkTreeViewColumn" id="capacity_column">
+ <object class="GtkTreeViewColumn" id="name_column">
<property name="spacing">6</property>
- <property name="title" translatable="yes">Capacity</property>
+ <property name="title" translatable="yes">Name</property>
<property name="clickable">True</property>
<child>
- <object class="GtkCellRendererText" id="capacity_renderer"/>
+ <object class="GtkCellRendererText" id="name_renderer"/>
<attributes>
- <attribute name="text">1</attribute>
+ <attribute name="text">3</attribute>
</attributes>
</child>
</object>
</child>
<child>
- <object class="GtkTreeViewColumn" id="free_column">
+ <object class="GtkTreeViewColumn" id="capacity_column">
<property name="spacing">6</property>
- <property name="title" translatable="yes">Free</property>
+ <property name="title" translatable="yes">Capacity</property>
<property name="clickable">True</property>
<child>
- <object class="GtkCellRendererText" id="free_renderer"/>
+ <object class="GtkCellRendererText" id="capacity_renderer"/>
<attributes>
- <attribute name="text">2</attribute>
+ <attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
- <object class="GtkTreeViewColumn" id="id_column">
+ <object class="GtkTreeViewColumn" id="free_column">
<property name="spacing">6</property>
- <property name="title" translatable="yes">ID</property>
+ <property name="title" translatable="yes">Free</property>
<property name="clickable">True</property>
<child>
- <object class="GtkCellRendererText" id="id_renderer"/>
+ <object class="GtkCellRendererText" id="free_renderer"/>
<attributes>
- <attribute name="text">3</attribute>
+ <attribute name="text">2</attribute>
</attributes>
</child>
</object>
diff --git a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
index 1e6df8c..42d0e63 100644
--- a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
+++ b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
@@ -419,10 +419,10 @@ class DisksDialog(GUIObject):
self._store = self.builder.get_object("disk_store")
# populate the store
for disk in self._disks:
- self._store.append([disk.description,
+ self._store.append(["%s (%s)" % (disk.description, disk.serial),
str(disk.size),
str(free[disk.name][0]),
- disk.serial,
+ disk.name,
disk.id])
treeview = self.builder.get_object("disk_view")
--
1.9.3
9 years, 4 months
[PATCH 0/3] widget colors and deprecation
by David Shea
David Shea (3):
Move the layout indicator color to css and fix the colors
Remove the color override from MountpointSelector.
Fix warnings about the default parameter that gdk deprecated
data/anaconda-gtk.css | 6 ++++++
widgets/src/DiskOverview.c | 2 +-
widgets/src/LayoutIndicator.c | 10 +---------
widgets/src/MountpointSelector.c | 6 +-----
widgets/src/SpokeSelector.c | 2 +-
5 files changed, 10 insertions(+), 16 deletions(-)
--
2.1.0
9 years, 5 months
[PATCH] Don't crash in pre-commit if no files changed
by David Shea
---
scripts/githooks/pre-commit | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/githooks/pre-commit b/scripts/githooks/pre-commit
index 124eb88..82dccb4 100755
--- a/scripts/githooks/pre-commit
+++ b/scripts/githooks/pre-commit
@@ -35,6 +35,10 @@ try:
except CalledProcessError:
sys.exit(1)
+# If git status returned nothing, return
+if not git_files:
+ sys.exit(0)
+
git_files = git_files.strip('\0').split('\0')
pylint_names = []
--
2.1.0
9 years, 5 months
[blivet:master] Setting NTFS._formattable to True (anaconda side)
by Anne Mulhern
Just the one small patch should do it.
My plan would be to push this before the blivet patch set and generally ensure
that there is no period where NTFS is actually supported in anaconda, however
brief.
mulhern (1):
Include "ntfs" explicitly among unsupported filesystems.
pyanaconda/ui/gui/spokes/custom.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--
1.9.3
9 years, 5 months