[PATCH 1/7] Fix padding around the addons view in the software spoke.
by Chris Lumens
This removes a thin little grey border you could see if you looked close
enough.
---
pyanaconda/ui/gui/spokes/software.glade | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/software.glade b/pyanaconda/ui/gui/spokes/software.glade
index 888fdc1..d0e7ad2 100644
--- a/pyanaconda/ui/gui/spokes/software.glade
+++ b/pyanaconda/ui/gui/spokes/software.glade
@@ -188,10 +188,7 @@
<object class="GtkTreeView" id="addonView">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="margin_left">6</property>
- <property name="margin_right">6</property>
- <property name="margin_top">6</property>
- <property name="margin_bottom">6</property>
+ <property name="border_width">6</property>
<property name="model">addonStore</property>
<property name="headers_visible">False</property>
<property name="headers_clickable">False</property>
--
1.7.11.2
11 years, 7 months
[python-meh] Various bug-fixing patches
by Vratislav Podzimek
Vratislav Podzimek (3):
Spelling corrections (#865993)
Parse component name correctly (#866526)
Handle tracebacks with no stack (#866441)
meh/dump.py | 54 +++++++++++++++++++++++++++++++++--------------
ui/exception-dialog.glade | 4 ++--
2 files changed, 40 insertions(+), 18 deletions(-)
--
1.7.11.4
11 years, 7 months
[PATCH] Add "b" back in as a possible valid size specifier (#866115).
by Chris Lumens
---
pyanaconda/storage/size.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/storage/size.py b/pyanaconda/storage/size.py
index a8da321..b045536 100644
--- a/pyanaconda/storage/size.py
+++ b/pyanaconda/storage/size.py
@@ -53,7 +53,7 @@ _binaryPrefix = [(1024, _("kibi"), _("Ki")),
(1024**7, _("zebi"), None),
(1024**8, _("yobi"), None)]
-_bytes = [_('B'), _('byte'), _('bytes')]
+_bytes = [_('B'), _("b"), _('byte'), _('bytes')]
_prefixes = _decimalPrefix + _binaryPrefix
def _makeSpecs(prefix, abbr):
--
1.7.11.2
11 years, 7 months
[master] [PATCH] There is no anaconda object available in writeSysconfigKernel
by Vratislav Podzimek
This change was introduced in commit c308c8978e2d27 that is a port
from rhel6-branch where we use anaconda.id.bootloader instead of
storage.bootloader.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/bootloader.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 58c3690..c0c12df 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -2140,7 +2140,7 @@ def writeSysconfigKernel(storage, version):
f.write("\n")
f.write("# DEFAULTKERNEL specifies the default kernel package type\n")
f.write("DEFAULTKERNEL=%s\n" % kernel)
- if anaconda.id.bootloader.trusted_boot:
+ if storage.bootloader.trusted_boot:
f.write("# HYPERVISOR specifies the default multiboot kernel\n")
f.write("HYPERVISOR=/boot/tboot.gz\n")
f.write("HYPERVISOR_ARGS=logging=vga,serial,memory\n")
--
1.7.11.4
11 years, 7 months
[PATCH 1/3] Fix threading initialization
by Martin Sivak
Glib threads have to be initialized before we start using them. And we start with them in the setupDisplay method, hence the change..
---
anaconda | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/anaconda b/anaconda
index 39fa065..5a3611b 100755
--- a/anaconda
+++ b/anaconda
@@ -887,6 +887,10 @@ if __name__ == "__main__":
else:
log.error("Unknown method: %s", (anaconda.methodstr,))
+ # init threading before Gtk can do anything
+ from pyanaconda.threads import initThreading, threadMgr, AnacondaThread
+ initThreading()
+
# now start the interface
setupDisplay(anaconda, opts)
@@ -935,13 +939,11 @@ if __name__ == "__main__":
from pyanaconda.storage import storageInitialize
from pyanaconda.packaging import payloadInitialize
from pyanaconda.network import networkInitialize
- from pyanaconda.threads import initThreading, threadMgr, AnacondaThread
if anaconda.rescue:
from pyanaconda.rescue import doRescue
doRescue(anaconda.rescue_mount, ksdata, anaconda.platform)
- initThreading()
threadMgr.add(AnacondaThread(name="AnaStorageThread", target=storageInitialize, args=(anaconda.storage, ksdata, anaconda.protected)))
threadMgr.add(AnacondaThread(name="AnaPayloadThread", target=payloadInitialize, args=(anaconda.storage, ksdata, anaconda.payload)))
# TODO start dhcp in thread if we have no connection
--
1.7.11.4
11 years, 7 months
[master] [PATCH] Do not remove the layout if it was added back (#865830)
by Vratislav Podzimek
When replacing the last layout in the list, user may mark the same
layout (among the others) for adding. In such cases we shouldn't
remove the layout from the list and just leave it where it was.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/gui/spokes/keyboard.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/keyboard.py b/pyanaconda/ui/gui/spokes/keyboard.py
index 3dce1d7..fd9e6ab 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.py
+++ b/pyanaconda/ui/gui/spokes/keyboard.py
@@ -280,7 +280,8 @@ class KeyboardSpoke(NormalSpoke):
if self._remove_last_attempt:
itr = self._store.get_iter_first()
- self._removeLayout(self._store, itr)
+ if not self._store[itr][0] in dialog.chosen_layouts:
+ self._removeLayout(self._store, itr)
self._remove_last_attempt = False
def _run_add_from_removed(self, button):
--
1.7.11.4
11 years, 7 months
[PATCH] The Unknown page selectors/devices have no root.
by David Lehman
---
pyanaconda/ui/gui/spokes/custom.py | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 8b780a3..b390f9a 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -264,6 +264,7 @@ class ConfirmDeleteDialog(GUIObject):
self._removeAll = self.builder.get_object("removeAllCheckbox")
self._removeAll.set_label(self._removeAll.get_label() % rootName)
+ self._removeAll.set_sensitive(rootName is not None)
if mountpoint:
txt = "%s (%s)" % (mountpoint, device)
@@ -1690,13 +1691,18 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
if not self._current_selector:
return
+ page = self._accordion.currentPage()
selector = self._current_selector
- log.info("on_remove_clicked: %s" % selector._root.name)
-
device = self._current_selector._device
- log.debug("removing device '%s' from page %s" % (device, selector._root.name))
+ root_name = None
+ if selector._root:
+ root_name = selector._root.name
+ elif page:
+ root_name = page.pageTitle
+
+ log.debug("removing device '%s' from page %s" % (device, root_name))
- if selector._root.name == new_install_name:
+ if root_name == new_install_name:
if device.exists:
# This is an existing device that was added to the new page.
# All we want to do is revert any changes to the device and
@@ -1716,14 +1722,14 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
dialog = ConfirmDeleteDialog(self.data)
with enlightbox(self.window, dialog.window):
dialog.refresh(getattr(device.format, "mountpoint", ""),
- device.name, selector._root.name)
+ device.name, root_name)
rc = dialog.run()
if rc == 0:
return
if dialog.deleteAll:
- for dev in selector._root.swaps + selector._root.mounts.values():
+ for dev in [s._device for s in page._members]:
self._destroy_device(dev)
else:
self._destroy_device(device)
--
1.7.7.6
11 years, 7 months
[PATCH rhel6-branch] mpath: fix bug in parseMultipathOutput (#803883)
by Will Woods
parseMultipathOutput was assuming that each new mpath block would start
with 'create: ' or 'mpath'. But sometimes we can get input like this:
create: mpatha [...]
`- 2:3:0:0 sda 8:0 undef ready running
reject: mpathb [...]
`- 2:255:1:0 sdb 8:16 undef ready running
Since the regex only matched 'create: ', it missed the start of the new
block and incorrectly puts 'sdb' into 'mpatha' with 'sda'.
Instead, match any string of lowercase letters and save that as the
'action'. When we hit the end of the block, if the action is 'create' or
None (i.e. the plain 'mpath' case) it's saved, otherwise it's ignored.
(We should only ever see 'reject' and 'create' as far as I can tell, but
better safe than sorry.)
---
storage/devicelibs/mpath.py | 11 ++++++-----
tests/storage/devicelibs/mpath.py | 17 +++++++++++++++++
2 files changed, 23 insertions(+), 5 deletions(-)
diff --git a/storage/devicelibs/mpath.py b/storage/devicelibs/mpath.py
index 789add1..fc09f24 100644
--- a/storage/devicelibs/mpath.py
+++ b/storage/devicelibs/mpath.py
@@ -75,12 +75,13 @@ def parseMultipathOutput(output):
if output is None:
return mpaths
+ action = None
name = None
devices = []
policy = re.compile('^[|+` -]+policy')
device = re.compile('^[|+` -]+[0-9]+:[0-9]+:[0-9]+:[0-9]+ +([a-zA-Z0-9!/]+)')
- create = re.compile('^(create: )?(mpath\w+|[a-f0-9]+)')
+ create = re.compile('^(?:([a-z]+): )?(mpath\w+|[a-f0-9]+)')
lines = output.split('\n')
for line in lines:
@@ -91,11 +92,11 @@ def parseMultipathOutput(output):
if not lexemes:
break
if cmatch and cmatch.group(2):
- if name and devices:
+ if name and devices and action in (None, 'create'):
mpaths[name] = devices
- name = None
- devices = []
+ action = cmatch.group(1)
name = cmatch.group(2)
+ devices = []
elif lexemes[0].startswith('size='):
pass
elif pmatch:
@@ -103,7 +104,7 @@ def parseMultipathOutput(output):
elif dmatch:
devices.append(dmatch.groups()[0].replace('!','/'))
- if name and devices:
+ if name and devices and action in (None, 'create'):
mpaths[name] = devices
return mpaths
diff --git a/tests/storage/devicelibs/mpath.py b/tests/storage/devicelibs/mpath.py
index f83ae3e..c2ac1e2 100755
--- a/tests/storage/devicelibs/mpath.py
+++ b/tests/storage/devicelibs/mpath.py
@@ -58,6 +58,20 @@ size=100G features='0' hwhandler='1 rdac' wp=rw
`- 2:0:0:1 sdd 8:48 active undef running
"""
+ # bug #803883
+ output5 = """\
+Apr 10 11:38:10 | sdb: alua not supported
+create: mpatha (35000039328130360) undef IBM-ESXS,MBF2600RC
+size=559G features='0' hwhandler='0' wp=undef
+`-+- policy='round-robin 0' prio=1 status=undef
+ `- 2:3:0:0 sda 8:0 undef ready running
+Apr 10 11:38:10 | sdb: alua not supported
+reject: mpathb (1IBM IPR-0 62E954E914C7A220) undef IBM,IPR-0 62E954E9
+size=532G features='1 queue_if_no_path' hwhandler='1 alua' wp=undef
+`-+- policy='round-robin 0' prio=-1 status=undef
+ `- 2:255:1:0 sdb 8:16 undef ready running
+"""
+
def setUp(self):
self.setupModules(
['_isys', 'logging', 'anaconda_log', 'block'])
@@ -81,6 +95,9 @@ size=100G features='0' hwhandler='1 rdac' wp=rw
self.assertEqual(topology,
{'3600a0b800067fabc000067694d23fe6e' : ['sdb','sdd'],
'3600a0b800067fcc9000001f34d23ff88' : ['sda', 'sdc']})
+ topology = mpath.parseMultipathOutput(self.output5)
+ self.assertEqual(topology, {'mpatha':['sda']})
+
def suite():
return unittest.TestLoader().loadTestsFromTestCase(MPathTestCase)
--
1.7.11.4
11 years, 7 months
[PATCH] The Unknown page selectors/devices have no root.
by David Lehman
---
pyanaconda/ui/gui/spokes/custom.py | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 8b780a3..baa2e34 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -1690,13 +1690,13 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
if not self._current_selector:
return
+ page = self._accordion.currentPage()
+ root_name = page.pageTitle
selector = self._current_selector
- log.info("on_remove_clicked: %s" % selector._root.name)
-
device = self._current_selector._device
- log.debug("removing device '%s' from page %s" % (device, selector._root.name))
+ log.debug("removing device '%s' from page %s" % (device, root_name))
- if selector._root.name == new_install_name:
+ if root_name == new_install_name:
if device.exists:
# This is an existing device that was added to the new page.
# All we want to do is revert any changes to the device and
@@ -1716,14 +1716,14 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
dialog = ConfirmDeleteDialog(self.data)
with enlightbox(self.window, dialog.window):
dialog.refresh(getattr(device.format, "mountpoint", ""),
- device.name, selector._root.name)
+ device.name, root_name)
rc = dialog.run()
if rc == 0:
return
if dialog.deleteAll:
- for dev in selector._root.swaps + selector._root.mounts.values():
+ for dev in [s._device for s in page._members]:
self._destroy_device(dev)
else:
self._destroy_device(device)
--
1.7.7.6
11 years, 7 months
[rhel6-branch]
by David Lehman
Patch 1 goes with the pykickstart patch I just sent.
11 years, 7 months