We have to potentially unmangle a lang value from say es_ES.UTF-8 down to just "es" in order to find the group within comps. --- pyanaconda/packaging/yumpayload.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py index 97f0c8e..831ce28 100644 --- a/pyanaconda/packaging/yumpayload.py +++ b/pyanaconda/packaging/yumpayload.py @@ -918,7 +918,13 @@ reposdir=%s
if yum_groups: with _yum_lock: - groups = [g.groupid for g in yum_groups.get_groups() if g.langonly == lang] + groups = [g.groupid for g in yum_groups.get_groups() if + g.langonly == lang] + # Try to use an unmangled lang value + if not groups: + shortlang = lang.split('_')[0] + groups = [g.groupid for g in yum_groups.get_groups() if + g.langonly == shortlang]
return groups
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py index 97f0c8e..831ce28 100644 --- a/pyanaconda/packaging/yumpayload.py +++ b/pyanaconda/packaging/yumpayload.py @@ -918,7 +918,13 @@ reposdir=%s
if yum_groups: with _yum_lock:
groups = [g.groupid for g in yum_groups.get_groups() if g.langonly == lang]
groups = [g.groupid for g in yum_groups.get_groups() if
g.langonly == lang]
# Try to use an unmangled lang value
if not groups:
shortlang = lang.split('_')[0]
groups = [g.groupid for g in yum_groups.get_groups() if
g.langonly == shortlang] return groups
Using expand_langs from localization.py might be a better (though slower) way to do this.
- Chris
Jesse Keating (jkeating@redhat.com) said:
We have to potentially unmangle a lang value from say es_ES.UTF-8 down to just "es" in order to find the group within comps.
Note that most of the groups have disappeared, and more will in the future. (That doesn't mean the patch is *incorrect*.)
Bill
pyanaconda/packaging/yumpayload.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py index 97f0c8e..831ce28 100644 --- a/pyanaconda/packaging/yumpayload.py +++ b/pyanaconda/packaging/yumpayload.py @@ -918,7 +918,13 @@ reposdir=%s
if yum_groups: with _yum_lock:
groups = [g.groupid for g in yum_groups.get_groups() if g.langonly == lang]
groups = [g.groupid for g in yum_groups.get_groups() if
g.langonly == lang]
# Try to use an unmangled lang value
if not groups:
shortlang = lang.split('_')[0]
groups = [g.groupid for g in yum_groups.get_groups() if
g.langonly == shortlang] return groups
-- 1.7.11.4
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
anaconda-patches@lists.fedorahosted.org