[master/f20-branch/rhel7-branch] Update bootDrive info when storage config updated in text-mode. (#861018)
by Samantha N. Bueno
bootDrive was never being updated in text mode, and so if a device was
ever de-selected [dasda, dasdb] -> [dasdb], global ks data still thought
dasda was the boot device and would throw an error when checking the
storage configuration.
Resolves: rhbz#861018
---
pyanaconda/ui/tui/spokes/storage.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pyanaconda/ui/tui/spokes/storage.py b/pyanaconda/ui/tui/spokes/storage.py
index 13d2c1f..0fab394 100644
--- a/pyanaconda/ui/tui/spokes/storage.py
+++ b/pyanaconda/ui/tui/spokes/storage.py
@@ -241,6 +241,11 @@ class StorageSpoke(NormalTUISpoke):
self.data.bootloader.location = "mbr"
+ if self.data.bootloader.bootDrive and \
+ self.data.bootloader.bootDrive not in self.selected_disks:
+ self.data.bootloader.bootDrive = ""
+ self.storage.bootloader.reset()
+
self.storage.config.update(self.data)
# If autopart is selected we want to remove whatever has been
--
1.8.3.1
10 years, 6 months
[PATCH] Remove the special handling for en@*.po and en@*.mo
by David Shea
We don't generate those files anymore so there's no need to deal with
them.
---
Makefile.am | 2 --
1 file changed, 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index fdecf27..f55c722 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -47,8 +47,6 @@ tag:
@echo "Tagged as $(ARCHIVE_TAG)"
po-pull:
- rm -f $(srcdir)/po/en(a)boldquot.gmo $(srcdir)/po/en(a)boldquot.po
- rm -f $(srcdir)/po/en(a)quot.gmo $(srcdir)/po/en(a)quot.po
rpm -q transifex-client &>/dev/null || ( echo "need to run: yum install transifex-client"; exit 1 )
tx pull $(TX_PULL_ARGS)
--
1.8.3.1
10 years, 6 months
[PATCH] Specify btrfs volumes by UUID in /etc/fstab.
by David Lehman
---
blivet/devices.py | 6 ++++++
blivet/devicetree.py | 2 ++
2 files changed, 8 insertions(+)
diff --git a/blivet/devices.py b/blivet/devices.py
index d620eaf..acde9e7 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -4314,6 +4314,12 @@ class BTRFSDevice(StorageDevice):
def path(self):
return self.parents[0].path
+ @property
+ def fstabSpec(self):
+ spec = self.format.volUUID
+ if not spec:
+ spec = super(BTRFSDevice, self).fstabSpec
+ return spec
class BTRFSVolumeDevice(BTRFSDevice):
_type = "btrfs volume"
diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 7286af5..253c65a 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -1594,6 +1594,8 @@ class DeviceTree(object):
if vol_path in [sv.name for sv in btrfs_dev.subvolumes]:
continue
fmt = getFormat("btrfs", device=btrfs_dev.path, exists=True,
+ uuid=btrfs_device.format.uuid,
+ volUUID=btrfs_device.format.volUUID,
mountopts="subvol=%s" % vol_path)
subvol = BTRFSSubVolumeDevice(vol_path,
vol_id=vol_id,
--
1.8.1.4
10 years, 6 months
[master/f20-branch/rhel7-branch] V02, Check that s390x LVM configuration is valid. (#873135, #885011)
by Samantha N. Bueno
On s390x, /boot (or / if /boot isn't a mountpoint) needs to exist on a
single PV if using LVM, so check for this.
Resolves: rhbz#873135
Resolves: rhbz#885011
---
pyanaconda/bootloader.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index cf769ed..d2704d0 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -40,6 +40,7 @@ import pyanaconda.network
from pyanaconda.nm import nm_device_hwaddress
from blivet import platform
from pyanaconda.i18n import _, N_
+from blivet.errors import SinglePhysicalVolumeError
import logging
log = logging.getLogger("anaconda")
@@ -2015,6 +2016,22 @@ class ZIPL(BootLoader):
# configuration
#
+ def is_valid_stage2_device(self, device, linux=True, non_linux=False):
+ valid = super(ZIPL, self).is_valid_stage2_device(self.stage2_device)
+
+ # s390x can only have /boot on a single PV; or if there is no /boot
+ # partition, / must be on a single PV, so check for that here
+ if self.stage2_device.type == "lvmlv":
+ try:
+ self.stage2_device._getSinglePV()
+ valid = True
+ except SinglePhysicalVolumeError as e:
+ msg = str(e)
+ self.errors.append(msg)
+ valid = False
+
+ return valid
+
@property
def boot_dir(self):
return "/boot"
--
1.8.3.1
10 years, 6 months
[PATCH] Fix Gtk errors about list store columns
by David Shea
The renderer for keyboard layouts was set to pull the foreground color
from column six of the store, but there's only one column, so Gtk was
spitting out "Gtk-CRITICAL: column < priv->n_columns" or something to
that effect.
The GtkCellRendererText editor in Glade is just a giant list of numbers,
so this was probably added by some misaimed scroll wheeling.
---
pyanaconda/ui/gui/spokes/keyboard.glade | 1 -
1 file changed, 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/keyboard.glade b/pyanaconda/ui/gui/spokes/keyboard.glade
index e279b66..1b63f5d 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.glade
+++ b/pyanaconda/ui/gui/spokes/keyboard.glade
@@ -348,7 +348,6 @@
<object class="GtkCellRendererText" id="layoutRenderer"/>
<attributes>
<attribute name="text">0</attribute>
- <attribute name="foreground-rgba">6</attribute>
</attributes>
</child>
</object>
--
1.8.3.1
10 years, 6 months
[PATCH] btrfs subvolume reclaim option for kickstart
by Gene Czarcinski
This involves a patch to pykickstart and a patch to anaconda.
The patch for anaconda was created on anaconda-20.25.4-1 and the patch
for pykickstart was created on r-1.99.44-1 and should easily apply or
rebase.
The patches implement a capability currently available if you perform a
non-kickstart custom-allocation install where you can reclaim the name
(and space) of an existing btrfs subvolume and then reuse (recreate) a
new btrfs subvolume of the smae name over it.
The are times in both virtual and real world when a reinstall is needed.
Currently, when this involves a btrfs subvolume as root, you have to manually
delete that subvolume. The capability implemented in these patches allows
a kickstart user to do that at install time.
Note: "--reclaim" was chosen for the option since it is both different and,
at the same time, the same as the term used in a non-kickstart install.
Gene Czarcinski (1):
add btrfs option reclaim
pykickstart/commands/btrfs.py | 4 ++++
1 file changed, 4 insertions(+)
Gene Czarcinski (1):
add reclaim capability for btrfs subvolumes
pyanaconda/kickstart.py | 8 ++++++++
1 file changed, 8 insertions(+)
--
1.8.3.1
10 years, 6 months
[PATCH] Fix the layout up and down button sensitivies.
by David Shea
Disable both the up and down buttons when there is only one item in the
list. Update the top/bottom/one based sensitivity test when the list
changes.
While I was at it, store the layout selection object in the keyboard
spoke object so that we don't have to call get_object() in every signal
handler.
---
pyanaconda/ui/gui/spokes/keyboard.py | 55 +++++++++++++++++++++---------------
1 file changed, 32 insertions(+), 23 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/keyboard.py b/pyanaconda/ui/gui/spokes/keyboard.py
index a30aac5..d1c30a5 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.py
+++ b/pyanaconda/ui/gui/spokes/keyboard.py
@@ -325,6 +325,8 @@ class KeyboardSpoke(NormalSpoke):
self._store = self.builder.get_object("addedLayoutStore")
self._add_data_layouts()
+ self._selection = self.builder.get_object("layoutSelection")
+
self._switching_dialog = ConfigureSwitchingDialog(self.data)
self._switching_dialog.initialize()
@@ -421,19 +423,24 @@ class KeyboardSpoke(NormalSpoke):
self._removeLayout(self._store, itr)
self._remove_last_attempt = False
+ # Update the selection information
+ self._selection.emit("changed")
+
def on_remove_clicked(self, button):
- selection = self.builder.get_object("layoutSelection")
- if not selection.count_selected_rows():
+ if not self._selection.count_selected_rows():
return
- (store, itr) = selection.get_selected()
+ (store, itr) = self._selection.get_selected()
itr2 = store.get_iter_first()
#if the first item is selected, try to select the next one
if store[itr][0] == store[itr2][0]:
itr2 = store.iter_next(itr2)
if itr2: #next one existing
- selection.select_iter(itr2)
+ self._selection.select_iter(itr2)
self._removeLayout(store, itr)
+ # Re-emit the selection changed signal now that the backing store is updated
+ # in order to update the first/last/only-based button sensitivities
+ self._selection.change("changed")
return
#nothing left, run AddLayout dialog to replace the current layout
@@ -452,14 +459,13 @@ class KeyboardSpoke(NormalSpoke):
itr3 = store.iter_next(itr3)
self._removeLayout(store, itr)
- selection.select_iter(itr2)
+ self._selection.select_iter(itr2)
def on_up_clicked(self, button):
- selection = self.builder.get_object("layoutSelection")
- if not selection.count_selected_rows():
+ if not self._selection.count_selected_rows():
return
- (store, cur) = selection.get_selected()
+ (store, cur) = self._selection.get_selected()
prev = store.iter_previous(cur)
if not prev:
return
@@ -472,14 +478,13 @@ class KeyboardSpoke(NormalSpoke):
#layout is first in the list (set as default), activate it
self._xkl_wrapper.activate_default_layout()
- selection.emit("changed")
+ self._selection.emit("changed")
def on_down_clicked(self, button):
- selection = self.builder.get_object("layoutSelection")
- if not selection.count_selected_rows():
+ if not self._selection.count_selected_rows():
return
- (store, cur) = selection.get_selected()
+ (store, cur) = self._selection.get_selected()
#if default layout (first in the list) changes we need to activate it
activate_default = not store.iter_previous(cur)
@@ -495,11 +500,10 @@ class KeyboardSpoke(NormalSpoke):
if activate_default:
self._xkl_wrapper.activate_default_layout()
- selection.emit("changed")
+ self._selection.emit("changed")
def on_preview_clicked(self, button):
- selection = self.builder.get_object("layoutSelection")
- (store, cur) = selection.get_selected()
+ (store, cur) = self._selection.get_selected()
layout_row = store[cur]
if not layout_row:
return
@@ -531,17 +535,22 @@ class KeyboardSpoke(NormalSpoke):
self._removeButton.set_sensitive(True)
self._previewButton.set_sensitive(True)
- # Disable the Up button if the top row's selected, and disable the
- # Down button if the bottom row's selected.
- if selected[0].get_indices() == [0]:
+ # If only one row is available, disable both the Up and Down button
+ if len(store) == 1:
self._upButton.set_sensitive(False)
- self._downButton.set_sensitive(True)
- elif selected[0].get_indices() == [len(store)-1]:
- self._upButton.set_sensitive(True)
self._downButton.set_sensitive(False)
else:
- self._upButton.set_sensitive(True)
- self._downButton.set_sensitive(True)
+ # Disable the Up button if the top row's selected, and disable the
+ # Down button if the bottom row's selected.
+ if selected[0].get_indices() == [0]:
+ self._upButton.set_sensitive(False)
+ self._downButton.set_sensitive(True)
+ elif selected[0].get_indices() == [len(store)-1]:
+ self._upButton.set_sensitive(True)
+ self._downButton.set_sensitive(False)
+ else:
+ self._upButton.set_sensitive(True)
+ self._downButton.set_sensitive(True)
def on_options_clicked(self, *args):
self._switching_dialog.refresh()
--
1.8.3.1
10 years, 6 months
[rhel7/f20/master] Fix the Gkbd spec string for layouts with no variant
by David Shea
Don't add the "\tvariant" if the variant is empty.
Resolves: rhbz#1011155
---
pyanaconda/ui/gui/spokes/keyboard.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/keyboard.py b/pyanaconda/ui/gui/spokes/keyboard.py
index 6a63f45..7ba4cdf 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.py
+++ b/pyanaconda/ui/gui/spokes/keyboard.py
@@ -491,7 +491,12 @@ class KeyboardSpoke(NormalSpoke):
return
layout, variant = keyboard.parse_layout_variant(layout_row[0])
- lay_var_spec = "%s\t%s" % (layout, variant)
+
+ if variant:
+ lay_var_spec = "%s\t%s" % (layout, variant)
+ else:
+ lay_var_spec = layout
+
dialog = Gkbd.KeyboardDrawing.dialog_new()
Gkbd.KeyboardDrawing.dialog_set_layout(dialog, self._xkl_wrapper.configreg,
lay_var_spec)
--
1.8.3.1
10 years, 6 months
[master/f20/rhel7] Ignore SIGINT (#971323)
by Anne Mulhern
Resolves: rhbz#971323
Ignore SIGINT instead of doing the default action. Also, remove the
KeyboardInterrupt handling in the pyanaconda thread manager since these
threads should never see a Keyboard Interrupt.
There is a justification for this:
1) There's some way of exiting all set up screens, and
2) Interrupting the actual install is a bad idea, and
3) If you know what you're doing you can send it a kill signal which it will
still obey.
Signed-off-by: mulhern <amulhern(a)redhat.com>
---
anaconda | 2 +-
pyanaconda/threads.py | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/anaconda b/anaconda
index b00c78c..ce37365 100755
--- a/anaconda
+++ b/anaconda
@@ -763,7 +763,7 @@ if __name__ == "__main__":
iutil.setup_translations(gettext)
# reset python's default SIGINT handler
- signal.signal(signal.SIGINT, signal.SIG_DFL)
+ signal.signal(signal.SIGINT, signal.SIG_IGN)
signal.signal(signal.SIGSEGV, isys.handleSegv)
signal.signal(signal.SIGTERM, lambda num, frame: sys.exit(1))
diff --git a/pyanaconda/threads.py b/pyanaconda/threads.py
index 1f1d9c6..b861cea 100644
--- a/pyanaconda/threads.py
+++ b/pyanaconda/threads.py
@@ -166,8 +166,6 @@ class AnacondaThread(threading.Thread):
log.info("Running Thread: %s (%s)" % (self.name, self.ident))
try:
threading.Thread.run(self, *args, **kwargs)
- except KeyboardInterrupt:
- raise
except:
threadMgr.set_error(self.name, *sys.exc_info())
sys.excepthook(*sys.exc_info())
--
1.8.3.1
10 years, 6 months