[PATCH] Improve the workaround for Gtk's busted entry completion
by David Shea
We can make GtkEntryCompletion work right just by calling the function
that the property setter was supposed to call for itself instead of
trying to keep track of focus events and keypresses and other gross
things we shouldn't have to worry about. The issue is fixed in the devel
version of Gtk, so eventually we won't need this function call, either.
---
pyanaconda/ui/gui/spokes/datetime_spoke.glade | 4 ----
pyanaconda/ui/gui/spokes/datetime_spoke.py | 21 ++++++++++-----------
2 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.glade b/pyanaconda/ui/gui/spokes/datetime_spoke.glade
index 413f92c..a57cacf 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.glade
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.glade
@@ -153,8 +153,6 @@
<property name="width_chars">20</property>
<property name="completion">regionCompletion</property>
<signal name="activate" handler="on_city_region_text_entry_activated" swapped="no"/>
- <signal name="focus-out-event" handler="on_entry_left" swapped="no"/>
- <signal name="key-release-event" handler="on_city_region_key_released" swapped="no"/>
</object>
</child>
</object>
@@ -195,8 +193,6 @@
<property name="width_chars">20</property>
<property name="completion">cityCompletion</property>
<signal name="activate" handler="on_city_region_text_entry_activated" swapped="no"/>
- <signal name="focus-out-event" handler="on_entry_left" swapped="no"/>
- <signal name="key-release-event" handler="on_city_region_key_released" swapped="no"/>
</object>
</child>
</object>
diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index dde6615..4648d4f 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -22,7 +22,7 @@
import logging
log = logging.getLogger("anaconda")
-from gi.repository import GLib, Gdk, TimezoneMap
+from gi.repository import GLib, TimezoneMap
from pyanaconda.ui.communication import hubQ
from pyanaconda.ui.common import FirstbootSpokeMixIn
@@ -395,6 +395,15 @@ class DatetimeSpoke(FirstbootSpokeMixIn, NormalSpoke):
self._months_nums = dict()
+ # Workaround for EntryCompletion not really being attached to the text column
+ # See https://bugzilla.gnome.org/show_bug.cgi?id=712639,
+ # https://bugzilla.gnome.org/show_bug.cgi?id=710533,
+ # https://git.gnome.org/browse/gtk+/commit/?id=9761a966d8ffda724226a21022a4...
+ regionCompletion = self.builder.get_object("regionCompletion")
+ cityCompletion = self.builder.get_object("cityCompletion")
+ regionCompletion.set_text_column(regionCompletion.get_text_column())
+ cityCompletion.set_text_column(cityCompletion.get_text_column())
+
threadMgr.add(AnacondaThread(name=constants.THREAD_DATE_TIME,
target=self._initialize))
@@ -898,16 +907,6 @@ class DatetimeSpoke(FirstbootSpokeMixIn, NormalSpoke):
# update "old" values
self._old_city = city
- def on_entry_left(self, entry, *args):
- # user clicked somewhere else or hit TAB => finished editing
- entry.emit("activate")
-
- def on_city_region_key_released(self, entry, event, *args):
- if event.type == Gdk.EventType.KEY_RELEASE and \
- event.keyval == Gdk.KEY_Escape:
- # editing canceled
- self._restore_old_city_region()
-
def on_completion_match_selected(self, combo, model, itr):
item = None
if model and itr:
--
1.8.4.2
10 years, 6 months
[PATCH] Rename the network config spoke a little bit.
by Chris Lumens
We've gotten some feedback that it's hard to find the place to change the
hostname. I think we figured people would assume it's part of network
configuration, but I guess not. So let's just put it in the spoke title
and see if that works better.
---
pyanaconda/ui/gui/spokes/network.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index 2ecc774..777915a 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -1292,7 +1292,7 @@ class NetworkSpoke(FirstbootSpokeMixIn, NormalSpoke):
mainWidgetName = "networkWindow"
uiFile = "spokes/network.glade"
- title = CN_("GUI|Spoke", "_NETWORK CONFIGURATION")
+ title = CN_("GUI|Spoke", "_NETWORK & HOSTNAME")
icon = "network-transmit-receive-symbolic"
category = SystemCategory
--
1.8.3.1
10 years, 6 months
[f20-branch] fix 1039292
by David Lehman
Be a little more robust in identifying matches between devices. When
partitioning goes belly-up you end up with partitions that have names
like 'req1' and that was preventing us from replacing those devices in
the selectors with the ones from the backup tree which is put into
place as part of error recovery.
10 years, 6 months
[f20-branch] Two fixes for two F20 blockers
by Vratislav Podzimek
These two patches fix two F20 blockers (one already accepted as a blocker, the
second one will with high probability be accepted very soon as well). They may
be not as nice as I'd like to see them (especially the anaconda one), but I
think we could take them at least as temporary fixes.
Vratislav Podzimek (1):
Beware of weird partition sizes (#1040012)
pyanaconda/ui/gui/spokes/lib/resize.py | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
--
1.8.4.2
10 years, 6 months
[master][PATCH] Allow catching exceptions from threads
by Vratislav Podzimek
By running exception handler every time an exception appears in a thread we
block us from using our features provided by the wait method. Some exceptions
may be non-critical and the waiting thread may recover from the erroneous state.
However, we need to give it a chance to do so.
The wait_all method called before we start the actual installation should make
sure there are no abandoned problematic threads that raised exception nobody
cared about.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/threads.py | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/threads.py b/pyanaconda/threads.py
index 29290df..0e81ded 100644
--- a/pyanaconda/threads.py
+++ b/pyanaconda/threads.py
@@ -121,6 +121,11 @@ class ThreadManager(object):
log.debug("Waiting for thread %s to exit", name)
self.wait(name)
+ if self.any_errors:
+ msg = "Unhandled errors from the following threads detected: %s" %\
+ ", ".join(self._errors.iterkeys())
+ raise RuntimeError(msg)
+
def set_error(self, name, *exc_info):
"""Set the error data for a thread
@@ -199,6 +204,11 @@ class AnacondaThread(threading.Thread):
self._prefix_thread_counts[prefix] = thread_num
kwargs["name"] = prefix + str(thread_num)
+ if "fatal" in kwargs:
+ self._fatal = kwargs.pop("fatal")
+ else:
+ self._fatal = True
+
threading.Thread.__init__(self, *args, **kwargs)
self.daemon = True
@@ -212,7 +222,8 @@ class AnacondaThread(threading.Thread):
# pylint: disable-msg=W0702
except:
threadMgr.set_error(self.name, *sys.exc_info())
- sys.excepthook(*sys.exc_info())
+ if self._fatal:
+ sys.excepthook(*sys.exc_info())
finally:
threadMgr.remove(self.name)
log.info("Thread Done: %s (%s)", self.name, self.ident)
--
1.8.4.2
10 years, 6 months
[blivet-f20/master] Add a PE for LUKS metadata (#1038969)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
---
blivet/devicefactory.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py
index 090157a..b643736 100644
--- a/blivet/devicefactory.py
+++ b/blivet/devicefactory.py
@@ -24,6 +24,7 @@ from storage_log import log_method_call
from errors import *
from devices import LUKSDevice
from formats import getFormat
+from devicelibs import crypto
from devicelibs.mdraid import get_member_space
from devicelibs.mdraid import get_raid_min_members
from devicelibs.mdraid import raidLevelString
@@ -1170,6 +1171,10 @@ class LVMFactory(DeviceFactory):
# (it was originally one per disk but that wasn't enough for raid5)
size += LVM_PE_SIZE * len(self.disks) * 5
+ if self.container_encrypted:
+ # Add space for LUKS metadata, each parent will be encrypted
+ size += LVM_PE_SIZE * len(self.disks)
+
return size
#
--
1.8.3.1
10 years, 6 months
[PATCH] Remove enablement of whiteout/blackout plugins, and the requires on anaconda-yum-plugins.
by Bill Nottingham
1) blackout is for removing packages on upgrades. Upgrades no longer run
through anaconda.
2) The metadata introduced to service these plugins has
not undergone a single substantive, intentional update since Fedora 10.
Therefore, I am left to assume that their functionality is vestigial and
should be removed. They'd be obsolete in a DNF world anyway.
---
anaconda.spec.in | 1 -
pyanaconda/packaging/yumpayload.py | 2 +-
scripts/anaconda-yum | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index 6df5b75..6e31d58 100755
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -124,7 +124,6 @@ Requires: isomd5sum >= %{isomd5sum}
Requires: yum-utils >= %{yumutilsver}
Requires: NetworkManager >= %{nmver}
Requires: dhclient
-Requires: anaconda-yum-plugins
Requires: libselinux-python >= %{libselinuxver}
Requires: kbd
Requires: chrony
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index a758ce5..cbd9352 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -84,7 +84,7 @@ from pyanaconda.localization import langcode_matches_locale
from pykickstart.constants import GROUP_ALL, GROUP_DEFAULT, KS_MISSING_IGNORE
-YUM_PLUGINS = ["blacklist", "whiteout", "fastestmirror", "langpacks"]
+YUM_PLUGINS = ["fastestmirror", "langpacks"]
DEFAULT_REPOS = [productName.lower(), "rawhide"]
BASE_REPO_NAMES = [BASE_REPO_NAME] + DEFAULT_REPOS
diff --git a/scripts/anaconda-yum b/scripts/anaconda-yum
index cf98f70..95ae58d 100755
--- a/scripts/anaconda-yum
+++ b/scripts/anaconda-yum
@@ -27,7 +27,7 @@ import rpmUtils
import yum
from urlgrabber.grabber import URLGrabError
-YUM_PLUGINS = ["blacklist", "whiteout", "fastestmirror", "langpacks"]
+YUM_PLUGINS = ["fastestmirror", "langpacks"]
def setup_parser():
""" Setup argparse with supported arguments
--
1.8.4.2
10 years, 6 months
[f20-branch/master/rhel7-branch][PATCH] Disable tmpfs in the GUI (#1039511)
by Martin Kolman
Tmpfs handling in GUI is currently seriously broken,
so hide tmpfs until this is fixed.
Signed-off-by: Martin Kolman <mkolman(a)redhat.com>
---
pyanaconda/ui/gui/spokes/custom.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index ac6cab6..76405b1 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -786,6 +786,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# btrfs is always handled by on_device_type_changed
supported_fs = (obj.type != "btrfs" and
+ obj.type != "tmpfs" and
obj.supported and obj.formattable and
(isinstance(obj, FS) or
obj.type in ["biosboot", "prepboot", "swap"]))
--
1.8.4.2
10 years, 6 months
[master][PATCH] Fix checking if we are collecting our module
by Vratislav Podzimek
module_path may be not defined if an exception is raised early
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/common.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/common.py b/pyanaconda/ui/common.py
index 627ae75..f85a144 100644
--- a/pyanaconda/ui/common.py
+++ b/pyanaconda/ui/common.py
@@ -558,6 +558,7 @@ def collect(module_pattern, path, pred):
mod_info = None
module = None
+ module_path = None
try:
imp.acquire_lock()
@@ -627,7 +628,7 @@ def collect(module_pattern, path, pred):
continue
except ImportError as imperr:
- if "pyanaconda" in module_path:
+ if module_path and "pyanaconda" in module_path:
# failure when importing our own module:
raise
log.error("Failed to import module in collect: %s", imperr)
--
1.8.4.2
10 years, 6 months