[PATCH] raise error on rsync failure (#868755)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
---
pyanaconda/packaging/livepayload.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/packaging/livepayload.py b/pyanaconda/packaging/livepayload.py
index ca02c85..0ef1265 100644
--- a/pyanaconda/packaging/livepayload.py
+++ b/pyanaconda/packaging/livepayload.py
@@ -110,9 +110,11 @@ class LiveImagePayload(ImagePayload):
except (OSError, RuntimeError) as e:
err = str(e)
else:
- err = None
if rc != 0:
- log.info("%s exited with code %d" % (cmd, rc))
+ err = "%s exited with code %d" % (cmd, rc)
+ log.error(err)
+ else:
+ err = None
if err:
exn = PayloadInstallError(err)
--
1.7.11.7
11 years, 7 months
[PATCH] fixes for master
by Chris Lumens
And then these two fixes are just to make the UI a little nicer, and can
just go on master.
- Chris
11 years, 7 months
[PATCH] exclude bind mounts from rsync (#871637)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
rsync tries to remove xattrs even though -x has been specified. They
don't need to be copied anyway so exclude /dev/ /proc/ and /sys/
---
pyanaconda/packaging/livepayload.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/packaging/livepayload.py b/pyanaconda/packaging/livepayload.py
index 8de3258..ca02c85 100644
--- a/pyanaconda/packaging/livepayload.py
+++ b/pyanaconda/packaging/livepayload.py
@@ -102,7 +102,8 @@ class LiveImagePayload(ImagePayload):
# symlinks, hardlinks
# go recursively, include devices and special files, don't cross
# file system boundaries
- args = ["-pogAXtlHrDx", INSTALL_TREE+"/", ROOT_PATH]
+ args = ["-pogAXtlHrDx", "--exclude", "/dev/", "--exclude", "/proc/",
+ "--exclude", "/sys/", INSTALL_TREE+"/", ROOT_PATH]
try:
rc = iutil.execWithRedirect(cmd, args,
stderr="/dev/tty5", stdout="/dev/tty5")
--
1.7.11.7
11 years, 7 months
[PATCH] Base whether an add-on is selected on the selectedGroups, not ksdata (#873092).
by Chris Lumens
ksdata only gets set at the beginning and ending of a spoke, not when things are
changed on the spoke without leaving. Thus, ksdata is invalid.
---
pyanaconda/ui/gui/spokes/software.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index 34dd6b3..f861ec2 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -253,7 +253,7 @@ class SoftwareSelectionSpoke(NormalSpoke):
for grp in self.payload.groups:
if self.payload.environmentHasOption(self.environment, grp) or (self.payload._isGroupVisible(grp) and self.payload._groupHasInstallableMembers(grp)):
(name, desc) = self.payload.groupDescription(grp)
- selected = self.payload.groupSelected(grp)
+ selected = grp in self.selectedGroups
self._addonStore.append([selected, "<b>%s</b>\n%s" % (name, desc), grp])
--
1.7.11.2
11 years, 7 months
[PATCH] fixes for f18-beta
by Chris Lumens
#2 could just be a master fix, but it doesn't hurt anything to put it on
f18-beta-branch as well. The other three fix bugs which perhaps do not
block beta yet, but should.
- Chris
11 years, 7 months
[master] [PATCH] Use both language and country to guess layout (#861061)
by Vratislav Podzimek
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/keyboard.py | 31 +++++++++++++++++++++++++++++--
pyanaconda/ui/gui/spokes/welcome.py | 8 +++++---
2 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/keyboard.py b/pyanaconda/keyboard.py
index 5aa9c5d..c8024af 100755
--- a/pyanaconda/keyboard.py
+++ b/pyanaconda/keyboard.py
@@ -290,6 +290,10 @@ class _Layout(object):
def __str__(self):
return '%s (%s)' % (self.name, self.desc)
+ def __eq__(self, obj):
+ return isinstance(obj, self.__class__) and \
+ self.name == obj.name
+
@property
def description(self):
return self.desc
@@ -357,6 +361,7 @@ class XklWrapper(object):
#this might take quite a long time
self.configreg.foreach_language(self._get_language_variants, None)
+ self.configreg.foreach_country(self._get_country_variants, None)
#'grp' means that we want layout (group) switching options
self.configreg.foreach_option('grp', self._get_switch_option, None)
@@ -369,7 +374,9 @@ class XklWrapper(object):
name = item_str(item.name)
description = item_str(item.description)
- self.name_to_show_str[name] = "%s (%s)" % (dest.encode("utf-8"), description.encode("utf-8"))
+ if dest:
+ self.name_to_show_str[name] = "%s (%s)" % (dest.encode("utf-8"),
+ description.encode("utf-8"))
self._variants_list.append(_Layout(name, description))
def _get_language_variants(self, c_reg, item, user_data=None):
@@ -388,7 +395,7 @@ class XklWrapper(object):
c_reg.foreach_country_variant(country_name, self._get_variant, None)
- self._country_keyboard_variants[(country_name, country_desc)] = self._variants_list
+ self._country_keyboard_variants[country_name] = self._variants_list
def _get_switch_option(self, c_reg, item, user_data=None):
"""Helper function storing layout switching options in foreach cycle"""
@@ -421,6 +428,26 @@ class XklWrapper(object):
#first layout (should exist for every language)
return language_layouts[0].name
+ def get_default_lang_country_layout(self, language, country):
+ """
+ Get default layout matching both language and country. If none such
+ layout is found, get default layout for language.
+
+ """
+
+ language_layouts = self._language_keyboard_variants.get(language, None)
+ country_layouts = self._country_keyboard_variants.get(country, None)
+ if not language_layouts:
+ return None
+
+ matches_both = (layout for layout in language_layouts
+ if layout in country_layouts)
+
+ try:
+ return matches_both.next().name
+ except StopIteration:
+ return language_layouts[0].name
+
def get_current_layout_name(self):
"""
Get current activated X layout's name
diff --git a/pyanaconda/ui/gui/spokes/welcome.py b/pyanaconda/ui/gui/spokes/welcome.py
index e9119dc..d99cd84 100644
--- a/pyanaconda/ui/gui/spokes/welcome.py
+++ b/pyanaconda/ui/gui/spokes/welcome.py
@@ -26,6 +26,7 @@ import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)
N_ = lambda x: x
+# pylint: disable-msg=E0611
from gi.repository import AnacondaWidgets, Gtk
from pyanaconda.ui.gui.hubs.summary import SummaryHub
from pyanaconda.ui.gui.spokes import StandaloneSpoke, NormalSpoke
@@ -81,12 +82,13 @@ class LanguageMixIn(object):
#e.g. 'English (United States)' -> 'English'
lang_name = store[itr][1]
lang_name = lang_name.split()[0]
+ country = self.language.preferred_locale.territory
#add one language-related and 'English (US)' layouts by default
new_layouts = ['us']
- language_layout = self._xklwrapper.get_default_language_layout(lang_name)
- if language_layout and language_layout not in new_layouts:
- new_layouts.append(language_layout)
+ default_layout = self._xklwrapper.get_default_lang_country_layout(lang_name, country)
+ if default_layout and default_layout not in new_layouts:
+ new_layouts.append(default_layout)
for layout in new_layouts:
self.data.keyboard.x_layouts.append(layout)
--
1.7.11.7
11 years, 7 months
[f18-branch] v2 patches
by Vratislav Podzimek
These two patches do almost the same as the two patches proposed
in the bugreport. While they are more general (PATCH 1/2) they
doesn't fix the problem with sr_RS@latin displayed as Serbian (Serbia)
instead of Serbian (Latin). I'm not sure this is a big deal and I
believe user should be able to see which one is the @latin one by
switching between them. However these translations both appear to use
cyrilic variant (Another bug? Where? $lang is set correctly.).
Vratislav Podzimek (2):
Handle locale's encoding and script in a better way
Some more stuff for the mangleMap (#866730)
pyanaconda/localization.py | 102 +++++++++++++++++++++++++++++++++------------
1 file changed, 75 insertions(+), 27 deletions(-)
--
1.7.11.7
11 years, 7 months
[PATCH] Fix remaining issues with md fwraid. (#872739)
by David Lehman
---
pyanaconda/storage/devices.py | 4 ++++
pyanaconda/storage/devicetree.py | 6 ++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/pyanaconda/storage/devices.py b/pyanaconda/storage/devices.py
index 16ea5f0..f0ebc64 100644
--- a/pyanaconda/storage/devices.py
+++ b/pyanaconda/storage/devices.py
@@ -1347,6 +1347,10 @@ class PartitionDevice(StorageDevice):
dm_node = dm.dm_node_from_name(self.name)
path = os.path.join("/sys", self.sysfsBlockDir, dm_node)
self.sysfsPath = os.path.realpath(path)[4:]
+ elif isinstance(self.parents[0], MDRaidArrayDevice):
+ md_node = mdraid.md_node_from_name(self.name)
+ path = os.path.join("/sys", self.sysfsBlockDir, md_node)
+ self.sysfsPath = os.path.realpath(path)[4:]
else:
StorageDevice.updateSysfsPath(self)
diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index d30b8f0..be14ba2 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -788,6 +788,12 @@ class DeviceTree(object):
sysfs_path = udev_device_get_sysfs_path(info)
device = None
+ if name.startswith("md"):
+ name = devicelibs.mdraid.name_from_md_node(name)
+ device = self.getDeviceByName(name)
+ if device:
+ return device
+
if disk is None:
disk_name = os.path.basename(os.path.dirname(sysfs_path))
disk_name = disk_name.replace('!','/')
--
1.7.6.5
11 years, 7 months
[f18-branch] Proposed patches for some language issues
by Vratislav Podzimek
These are two patches proposed in the bugreport. Applying them fixes
the issues with some languages, namely Serbian in variant sr@latin.
Please see the last few comments in the bugreport for more information.
I'm not sure we really want something like that, but it fixes the
reported issues. For F19 we will use a different solution without
the mangle maps.
Vratislav Podzimek (2):
Some more stuff for the mangleMap (#866730)
Use sr_Latn or sr@latin as needed (#866730)
pyanaconda/localization.py | 42 +++++++++++++++++++++++++-----------------
1 file changed, 25 insertions(+), 17 deletions(-)
--
1.7.11.7
11 years, 7 months