[master][PATCH] Check the password when Done is clicked (#948165)
by Vratislav Podzimek
This is just a copy-paste of the changes done in the commit
7a5f9ec5d122a42b2e55ff4d6587fdf821dbb264 for the user creation spoke.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/gui/spokes/password.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/password.py b/pyanaconda/ui/gui/spokes/password.py
index 2c877d2..1d882cf 100644
--- a/pyanaconda/ui/gui/spokes/password.py
+++ b/pyanaconda/ui/gui/spokes/password.py
@@ -158,6 +158,9 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke):
if self._error:
self.set_warning(self._error)
self.window.show_all()
+ return False
+
+ return True
def _validatePassword(self):
# Do various steps to validate the password
@@ -189,6 +192,14 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke):
if self._error:
return False
+ # the self._checkPassword function is used to indicate the password
+ # strength and need of hitting the Done button twice so use it here as
+ # well
+ if not self._checkPassword() and pw != self._oldweak:
+ # check failed and the Done button was clicked for the first time
+ self._oldweak = pw
+ return False
+
# if no errors, clear the info for next time we go into the spoke
self._password = pw
self.clear_info()
--
1.7.11.7
10 years, 10 months
[PATCH master] Don't traceback on ksdevice=bootif without BOOTIF supplied (#968270)
by Radek Vykydal
IMO the patch would be safe to go to F19 but otoh the use case is a
misconfiguration (using ksdevice=bootif without BOOTIF supplied).
---
pyanaconda/network.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index 2e93f1c..20cdb66 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -616,7 +616,7 @@ def get_ksdevice_name(ksspec=""):
ksspec = flags.cmdline.get('ksdevice', "")
ksdevice = ksspec
- bootif_mac = None
+ bootif_mac = ''
if ksdevice == 'bootif' and "BOOTIF" in flags.cmdline:
bootif_mac = flags.cmdline["BOOTIF"][3:].replace("-", ":").upper()
for dev in sorted(nm.nm_devices()):
--
1.7.11.7
10 years, 10 months
[f19-branch/master] Patch for a highly-probable final blocker
by Vratislav Podzimek
This makes changing environment work in the text mode. I believe using
payload.deselectEnvironment would be a better thing to do, but clearing a list
of packages is what the GUI spoke does and it provides deterministic results.
Using deselectEnvironment e.g. leads to a different number of packages installed
depending on which environment was deselected before the minimal environment is
selected.
Vratislav Podzimek (1):
Clear the list of packages on environment change (#977715)
pyanaconda/ui/tui/spokes/software.py | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
--
1.7.11.7
10 years, 10 months
[PATCH] Translate None for LVM RAID selection (#974801)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
---
pyanaconda/ui/gui/spokes/custom.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index da2808c..dfda5dc 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -541,7 +541,7 @@ class ContainerDialog(GUIObject):
selected_level_string = store[itr][0] # eg: "RAID1 (Redundancy)"
level = selected_level_string.split()[0].lower() # -> "raid1"
- if level == "none":
+ if level == "none" or level == _("None").lower():
level = None
return level
@@ -557,7 +557,7 @@ class ContainerDialog(GUIObject):
raid_level = self.raid_level
if not raid_level or raid_level == "single":
- raid_level = "None"
+ raid_level = _("None")
# Set a default RAID level in the combo.
for (i, row) in enumerate(raid_combo.get_model()):
--
1.8.1.4
10 years, 10 months
[blivet] Beware of parted possibly returning unicode objects (#973019)
by Vratislav Podzimek
We return plain strings everywhere so we should encode the unicode object with
utf-8 and store it as a plain string.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
blivet/devices.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/blivet/devices.py b/blivet/devices.py
index 4877a39..6aa6c26 100644
--- a/blivet/devices.py
+++ b/blivet/devices.py
@@ -1374,8 +1374,8 @@ class PartitionDevice(StorageDevice):
if self.partedPartition is None:
self._name = self.req_name
else:
- self._name = \
- devicePathToName(self.partedPartition.getDeviceNodeName())
+ dev_node_name = self.partedPartition.getDeviceNodeName()
+ self._name = devicePathToName(dev_node_name.encode("utf-8"))
def dependsOn(self, dep):
""" Return True if this device depends on dep. """
--
1.7.11.7
10 years, 10 months
[blivet] Used Python type instead of variable name (#968122)
by Mark Hamzy
It seems there are a number of issues with blivet/arch.py:
1) A variable is called type in some places and _type in others. This is inconsistent and also overrides a builtin Python keyword.
2) Some places call find to search for a substring and others call "in."
3) Some places use two spaces for indentation instead of the standard four.
However, since we are in shutdown mode for Fedora 19, I propose that arch.py be rewritten for Fedora 20, and we only fix the bug
(I am adding extra comments because it is not obvious that this is a substring search.
---
blivet/arch.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/blivet/arch.py b/blivet/arch.py
index d4ffc7b..12cb30d 100644
--- a/blivet/arch.py
+++ b/blivet/arch.py
@@ -63,6 +63,7 @@ def getPPCMachine():
platform = None
# ppc machine hash
+ # Note: This is a substring match!
ppcType = { 'Mac' : 'PMac',
'Book' : 'PMac',
'CHRP IBM' : 'pSeries',
@@ -133,6 +134,7 @@ def getPPCMacID():
# @return The powermac generation, or 0 if not powermac.
def getPPCMacGen():
# XXX: should NuBus be here?
+ # Note: This is a substring match!
pmacGen = ['OldWorld', 'NewWorld', 'NuBus']
if not isPPC():
@@ -154,7 +156,7 @@ def getPPCMacGen():
for _type in pmacGen:
if _type in gen:
- return type
+ return _type
log.warning("Unknown Power Mac generation: %s" %(gen,))
return 0
--
1.8.1.4
10 years, 10 months
[PATCH rhel6-branch] Use edd fcoe boot option instead of enumerating all ifaces (#909463)
by Radek Vykydal
This was kind of regression which slipped in 6.4 with patches for fcoe
kickstart support. For details please see the Doc Text of the BZ.
Resolves: rhbz#909463
---
storage/devices.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/storage/devices.py b/storage/devices.py
index 19e4f35..42e3b6f 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -3770,10 +3770,7 @@ class FcoeDiskDevice(DiskDevice, NetworkStorageDevice):
else:
dcbOpt = "nodcb"
- if nic in fcoe().ksnics:
- return set(["fcoe=%s:%s" % (nic, dcbOpt)])
- else:
- return set(["fcoe=edd:%s" % dcbOpt])
+ return set(["fcoe=edd:%s" % dcbOpt])
class OpticalDevice(StorageDevice):
--
1.7.11.7
10 years, 10 months
[PATCH rhel6-branch] Send host-name to dhcp server in installer for dhcp + hostname (#917815)
by Radek Vykydal
Resolves: rhbz#917815
---
loader/net.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/loader/net.c b/loader/net.c
index 93a9c6f..7c6bf01 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -1497,6 +1497,9 @@ int writeEnabledNetInfo(iface_t *iface) {
if (iface->hostname) {
fprintf(fp, "HOSTNAME=%s\n", iface->hostname);
+ if (iface->ipv4method == IPV4_DHCP_METHOD) {
+ fprintf(fp, "DHCP_HOSTNAME=%s\n", iface->hostname);
+ }
}
if (iface->domain) {
--
1.7.11.7
10 years, 10 months
[master][PATCH] Prevent pylint reporting false negatives in the Network spoke
by Vratislav Podzimek
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/gui/spokes/network.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index c8032fb..f30d314 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -29,6 +29,7 @@
# - NMClient.CLIENT_WIRELESS_ENABLED callback (hw switch?) - test
# - nm-c-e run: blocking? logging?
+# pylint: disable-msg=E0611
from gi.repository import Gtk, AnacondaWidgets
from pyanaconda import flags
@@ -45,6 +46,7 @@ from pyanaconda.ui.common import FirstbootSpokeMixIn
from pyanaconda import network
from pyanaconda.nm import nm_activated_devices, nm_device_setting_value
+# pylint: disable-msg=E0611
from gi.repository import GLib, GObject, Pango, Gio, NetworkManager, NMClient
import dbus
import dbus.service
--
1.7.11.7
10 years, 10 months
[f19-branch/master] Network spoke for the I-S
by Vratislav Podzimek
Trivial patch for the Anaconda and a related one for the Initial Setup that
together enable the Network spoke for the I-S. Something that is requested
mainly due to the pre-installed ARM images. Please note, that the spoke will
appear only if the 'firstboot --reconfig' is specified, so these patches
shouldn't harm 99 % of users even if they were wrong somehow.
Vratislav Podzimek (1):
Enable Network spoke for the Initial Setup (#972362)
pyanaconda/ui/gui/spokes/network.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
1.7.11.7
10 years, 10 months