diff --git a/pungi/wrappers/comps.py b/pungi/wrappers/comps.py
index 3160a509..2ace7b21 100644
--- a/pungi/wrappers/comps.py
+++ b/pungi/wrappers/comps.py
@@ -234,6 +234,12 @@ class CompsWrapper(object):
return [pkg.name for pkg in grp.packages]
raise KeyError('No such group %r' % group)
+ def get_langpacks(self):
+ langpacks = {}
+ for pack in self.comps.langpacks:
+ langpacks[pack] = self.comps.langpacks[pack]
+ return langpacks
+
def validate(self):
"""Check that no package name contains whitespace, and raise a
RuntimeError if there is a problem.
diff --git a/tests/fixtures/comps-env.xml b/tests/fixtures/comps-env.xml
index 169bd066..ec330df1 100644
--- a/tests/fixtures/comps-env.xml
+++ b/tests/fixtures/comps-env.xml
@@ -99,27 +99,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/fixtures/comps-formatted.xml b/tests/fixtures/comps-formatted.xml
index cbce574d..58c60483 100644
--- a/tests/fixtures/comps-formatted.xml
+++ b/tests/fixtures/comps-formatted.xml
@@ -113,27 +113,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/fixtures/comps-group.xml b/tests/fixtures/comps-group.xml
index 78b5be26..f2985afa 100644
--- a/tests/fixtures/comps-group.xml
+++ b/tests/fixtures/comps-group.xml
@@ -79,27 +79,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/fixtures/comps.xml b/tests/fixtures/comps.xml
index a303cf5c..ec135e97 100644
--- a/tests/fixtures/comps.xml
+++ b/tests/fixtures/comps.xml
@@ -126,28 +126,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/test_comps_wrapper.py b/tests/test_comps_wrapper.py
index 46cc3b9f..f984fcd5 100644
--- a/tests/test_comps_wrapper.py
+++ b/tests/test_comps_wrapper.py
@@ -48,6 +48,17 @@ class CompsWrapperTest(unittest.TestCase):
sorted(comps.get_packages('text-internet')),
sorted(['dummy-elinks', 'dummy-tftp']))
+ def test_get_langpacks(self):
+ comps = CompsWrapper(COMPS_FILE)
+ self.assertEqual(
+ comps.get_langpacks(),
+ {
+ "aspell": "aspell-%s",
+ "firefox": "firefox-langpack-%s",
+ "kdelibs": "kde-l10n-%s",
+ }
+ )
+
def test_get_packages_for_non_existing_group(self):
comps = CompsWrapper(COMPS_FILE)
with self.assertRaises(KeyError):