On Tue, Nov 06, 2012 at 02:04:11PM -0800, Jesse Keating wrote:
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 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py index 97f0c8e..0c53dde0 100644 --- a/pyanaconda/packaging/yumpayload.py +++ b/pyanaconda/packaging/yumpayload.py @@ -80,6 +80,9 @@ from pyanaconda.errors import * from pyanaconda.packaging import NoSuchGroup, NoSuchPackage import pyanaconda.progress as progress
+from pyanaconda.localization import expand_langs +import itertools
from pykickstart.constants import KS_MISSING_IGNORE
default_repos = [productName.lower(), "rawhide"] @@ -918,9 +921,15 @@ reposdir=%s
if yum_groups: with _yum_lock:
groups = [g.groupid for g in yum_groups.get_groups() if g.langonly == lang]
return groups
langs = expand_langs(lang)
groups = map(lambda x: [g.groupid for g in
yum_groups.get_groups() if g.langonly == x],
langs)
# the map gives us a list of results, this set call reduces
extra space between this and set :)
# it down to a unique set, then list() makes it back into a list.
# what the * does is a mystery!
could probably remove that (it passes the list as arguments)
Ack otherwise.