[master][PATCH] Use g_signal_handler_disconnect instead of g_object_disconnect (#1010486)
by Vratislav Podzimek
Usage of g_object_disconnect is more complicated and if not passed all arguments
it expects, it produces a warning.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
widgets/src/BaseWindow.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/widgets/src/BaseWindow.c b/widgets/src/BaseWindow.c
index 67aac36..e8f9df6 100644
--- a/widgets/src/BaseWindow.c
+++ b/widgets/src/BaseWindow.c
@@ -90,6 +90,7 @@ enum {
struct _AnacondaBaseWindowPrivate {
gboolean is_beta, info_shown;
+ gulong clicked_handler_id;
GtkWidget *main_box, *event_box, *info_bar;
GtkWidget *alignment;
GtkWidget *nav_box, *nav_area, *action_area;
@@ -482,8 +483,8 @@ static void anaconda_base_window_set_info_bar(AnacondaBaseWindow *win, GtkMessag
* bar is hidden.
*/
gtk_widget_add_events(GTK_WIDGET(win->priv->event_box), GDK_BUTTON_RELEASE_MASK);
- g_signal_connect(win->priv->event_box, "button-release-event",
- G_CALLBACK(anaconda_base_window_info_bar_clicked), win);
+ win->priv->clicked_handler_id = g_signal_connect(win->priv->event_box, "button-release-event",
+ G_CALLBACK(anaconda_base_window_info_bar_clicked), win);
content_area = gtk_info_bar_get_content_area(GTK_INFO_BAR(win->priv->info_bar));
@@ -562,7 +563,7 @@ void anaconda_base_window_clear_info(AnacondaBaseWindow *win) {
if (!win->priv->info_shown)
return;
- g_object_disconnect(win->priv->info_bar, "button-release-event", NULL);
+ g_signal_handler_disconnect(win->priv->info_bar, win->priv->clicked_handler_id);
gtk_widget_hide(win->priv->info_bar);
gtk_widget_destroy(win->priv->info_bar);
--
1.7.11.7
10 years, 8 months
[PATCH] support ppc64le architecture
by Mark Hamzy
Support PowerPC little endian architecture.
---
blivet/arch.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/blivet/arch.py b/blivet/arch.py
index dd2f630..cbbf5e6 100644
--- a/blivet/arch.py
+++ b/blivet/arch.py
@@ -268,13 +268,13 @@ def isPPC(bits=None):
arch = os.uname()[4]
if bits is None:
- if arch == 'ppc' or arch == 'ppc64':
+ if arch in ('ppc', 'ppc64', 'ppc64le'):
return True
elif bits == 32:
- if arch == 'ppc':
+ if arch in ('ppc'):
return True
elif bits == 64:
- if arch == 'ppc64':
+ if arch in ('ppc64', 'ppc64le'):
return True
return False
--
1.8.1.4
10 years, 8 months
[PATCH] Skip non-udev devices as optical media candidates (#1009809)
by David Shea
---
pyanaconda/image.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pyanaconda/image.py b/pyanaconda/image.py
index 5fe3833..a7422ec 100644
--- a/pyanaconda/image.py
+++ b/pyanaconda/image.py
@@ -193,6 +193,10 @@ def opticalInstallMedia(devicetree, mountpoint=INSTALL_TREE):
# created from ISO images.
for dev in set(devicetree.getDevicesByType("cdrom") + \
[d for d in devicetree.devices if d.format.type == "iso9660"]):
+ if not dev.sysfsPath:
+ # No udev information
+ continue
+
devicetree.updateDeviceFormat(dev)
if not hasattr(dev.format, "mount"):
# no mountable media
--
1.8.3.1
10 years, 8 months
[master][PATCH] Pass the actual format instead of Python built-in (#1009678)
by Vratislav Podzimek
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/kickstart.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 13160d9..603d957 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -625,9 +625,8 @@ class Lang(commands.lang.F19_Lang):
def execute(self, *args, **kwargs):
localization.write_language_configuration(self, ROOT_PATH)
-class Eula(commands.eula.F20_Eula):
- # no overrides needed here
- pass
+# no overrides needed here
+class Eula = commands.eula.F20_Eula
class LogVol(commands.logvol.F20_LogVol):
def execute(self, storage, ksdata, instClass):
@@ -755,7 +754,7 @@ class LogVolData(commands.logvol.F20_LogVolData):
raise KickstartValueError(formatErrorMsg(self.lineno,
msg="Invalid target size (%d) for device %s" % (self.size, device.name)))
- devicetree.registerAction(ActionCreateFormat(device, format))
+ devicetree.registerAction(ActionCreateFormat(device, fmt))
else:
# If a previous device has claimed this mount point, delete the
# old one.
--
1.7.11.7
10 years, 8 months
[PATCH] V2 network gui: do not crash on devices without settings (eg wireless) (#1010519)
by Radek Vykydal
Also do not read slaves from settings but use new 'Slaves' property to read
current slaves instead.
---
pyanaconda/network.py | 15 ++++++---------
pyanaconda/nm.py | 23 +++++++++++++++++++++++
2 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index dcb6ee0..03dbaec 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -34,6 +34,7 @@ import threading
import re
import dbus
import IPy
+import itertools
from simpleconfig import SimpleConfigFile
from blivet.devices import FcoeDiskDevice, iScsiDiskDevice
@@ -1046,22 +1047,18 @@ def status_message():
slaves = {}
ssids = {}
- nonslaves = []
# first find slaves and wireless aps
for devname in active_devs:
- master = nm.nm_device_setting_value(devname, "connection", "master")
- if master:
- if master in slaves:
- slaves[master].append(devname)
- else:
- slaves[master] = [devname]
- else:
- nonslaves.append(devname)
+ slaves[devname] = nm.nm_device_slaves(devname) or []
if nm.nm_device_type_is_wifi(devname):
ssids[devname] = nm.nm_device_active_ssid(devname) or ""
+ all_slaves = set(itertools.chain.from_iterable(slaves.values()))
+ nonslaves = [dev for dev in active_devs if dev not in all_slaves]
+
if len(nonslaves) == 1:
+ devname = nonslaves[0]
if nm.nm_device_type_is_ethernet(devname):
msg = _("Wired (%(interface_name)s) connected") \
% {"interface_name": devname}
diff --git a/pyanaconda/nm.py b/pyanaconda/nm.py
index 3c587dc..17b765d 100644
--- a/pyanaconda/nm.py
+++ b/pyanaconda/nm.py
@@ -440,6 +440,29 @@ def nm_device_ip_config(name, version=4):
return [addr_list, ns_list]
+def nm_device_slaves(name):
+ """Return slaves of device.
+
+ :param name: name of device
+ :type name: str
+ :return: names of slaves of device or None if device has no 'Slaves' property
+ :rtype: list of strings or None
+ :raise UnknownDeviceError if device is not found
+ """
+
+ try:
+ slaves = nm_device_property(name, "Slaves")
+ except PropertyNotFoundError:
+ return None
+
+ slave_ifaces = []
+ for slave in slaves:
+ iface = _get_property(slave, "Interface", ".Device")
+ slave_ifaces.append(iface)
+
+ return slave_ifaces
+
+
def nm_ntp_servers_from_dhcp():
"""Return NTP servers obtained by DHCP.
--
1.7.11.7
10 years, 8 months
[master][PATCH] Don't allow usaging updates with non-default network sources (#1008028)
by Vratislav Podzimek
Otherwise we don't know which repository if the one with updates.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/gui/spokes/source.py | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index bc72564..27ffd90 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -545,6 +545,9 @@ class SourceSpoke(NormalSpoke):
# updates option container
self._updatesBox = self.builder.get_object("updatesBox")
+ self._proxyButton = self.builder.get_object("proxyButton")
+ self._nfsOptsBox = self.builder.get_object("nfsOptsBox")
+
def initialize(self):
NormalSpoke.initialize(self)
@@ -753,6 +756,15 @@ class SourceSpoke(NormalSpoke):
enabled = button.get_active()
relatedBox.set_sensitive(enabled)
+ if button in (self._autodetectButton, self._isoButton):
+ # just make updates check box sensitive and unchecked by default
+ self._noUpdatesCheckbox.set_active(False)
+ self._updatesBox.set_sensitive(True)
+ else:
+ # network source selected, setup updates check box based on protocol
+ # chosen
+ self._protocolComboBox.emit("changed")
+
def on_chooser_clicked(self, button):
dialog = IsoChooser(self.data)
@@ -814,19 +826,21 @@ class SourceSpoke(NormalSpoke):
dialog.run("/dev/" + self._cdrom.name)
def on_protocol_changed(self, combo):
- proxyButton = self.builder.get_object("proxyButton")
- nfsOptsBox = self.builder.get_object("nfsOptsBox")
-
# Only allow the URL entry to be used if we're using an HTTP/FTP
# method that's not the mirror list, or an NFS method.
self._urlEntry.set_sensitive(self._http_active() or self._ftp_active() or self._nfs_active())
# Only allow thse widgets to be shown if it makes sense for the
# the currently selected protocol.
- proxyButton.set_sensitive(self._http_active() or self._mirror_active())
- nfsOptsBox.set_visible(self._nfs_active())
+ self._proxyButton.set_sensitive(self._http_active() or self._mirror_active())
+ self._nfsOptsBox.set_visible(self._nfs_active())
self._mirrorlistCheckbox.set_visible(self._http_active())
+ # We only know how to enable updates if the default mirror is used.
+ # don't disable updates by default
+ self._noUpdatesCheckbox.set_active(not self._mirror_active())
+ self._updatesBox.set_sensitive(self._mirror_active())
+
def _update_payload_repos(self):
""" Change the packaging repos to match the new edits
--
1.7.11.7
10 years, 8 months
[PATCH] Changed the keyboard accelerator for iscsi "Retry Log In"
by David Shea
check_accelerators was actually right about this one: retryLoginButton
can appear at the same time as the "_Reverse CHAP Username" input.
Changed the Log In button to use L instead of R and removed the
check_accelerators exception.
---
pyanaconda/ui/gui/spokes/advstorage/iscsi.glade | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade b/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade
index 208122a..d1597d3 100644
--- a/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade
+++ b/pyanaconda/ui/gui/spokes/advstorage/iscsi.glade
@@ -1161,8 +1161,7 @@
</child>
<child>
<object class="GtkButton" id="retryLoginButton">
- <!-- check_accelerators: not visible at same time as label19 -->
- <property name="label" translatable="yes">_Retry Log In</property>
+ <property name="label" translatable="yes">Retry _Log In</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
--
1.8.3.1
10 years, 8 months
[PATCH] Only fail on a missing firewalld command if the firewall is enabled (#1004976).
by Chris Lumens
If the user gives firewall --disabled and their package set does not include the
firewalld package, we should not raise an error. The firewall will be disabled
on the target system due to the lack of firewalld.
---
pyanaconda/kickstart.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 05e855d..3856814 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -525,8 +525,9 @@ class Firewall(commands.firewall.F14_Firewall):
cmd = "/usr/bin/firewall-offline-cmd"
if not os.path.exists(ROOT_PATH+cmd):
- msg = _("%s is missing. Cannot setup firewall.") % (cmd,)
- raise KickstartError(msg)
+ if self.enabled:
+ msg = _("%s is missing. Cannot setup firewall.") % (cmd,)
+ raise KickstartError(msg)
else:
iutil.execWithRedirect(cmd, args, root=ROOT_PATH)
--
1.8.1.2
10 years, 8 months
[PATCH] Make rescue mode work with encrypted installations
by Vratislav Podzimek
I don't like the idea of adding more code to the rescue mode we have now, but
rewriting it to our new Text UI is a harder and long-term task. Moreover, the
newly added function could survive the rewrite untouched.
Vratislav Podzimek (1):
Unlock encrypted partitions before finding installations (#901917)
pyanaconda/rescue.py | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
--
1.7.11.7
10 years, 8 months
[python-meh] Filter local variables in a nicer way and fix docstring
by Vratislav Podzimek
The localSkipList is used as a list of substrings that are searched in variable
names to determine if those should be skipped or not. Both the code and
docstring should reflect that in a readable way.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
meh/__init__.py | 2 +-
meh/dump.py | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/meh/__init__.py b/meh/__init__.py
index 6497bf4..75b6a21 100644
--- a/meh/__init__.py
+++ b/meh/__init__.py
@@ -65,7 +65,7 @@ class Config(object):
fileList -- A list of files to find on the system and add
to the traceback dump.
localSkipList -- A list of strings. When handling a traceback,
- any local variables found with the same name as
+ any local variables found with their name containing
an element of this list will not be written to
the dump. This is subtely different from
attrSkipList.
diff --git a/meh/dump.py b/meh/dump.py
index 0a769f2..9fe9003 100644
--- a/meh/dump.py
+++ b/meh/dump.py
@@ -420,9 +420,9 @@ class ExceptionDump(object):
ret += "\nLocal variables in innermost frame:\n"
try:
for (key, value) in frame.f_locals.items():
- loweredKey = key.lower()
- if len(filter(lambda s: loweredKey.find(s) != -1,
- self.conf.localSkipList)) > 0:
+ lowered_key = key.lower()
+ if any(item.lower() in lowered_key
+ for item in self.conf.localSkipList):
continue
ret += "%s: %s\n" % (key, value)
--
1.7.11.7
10 years, 8 months