From: Ansgar Burchardt Date: Thu, 31 Jul 2014 22:51:57 +0000 (+0200) Subject: PackageList: use correct values for section and component X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=d92f3e09718a6712554d770ced860cd4712bb941;p=dak.git PackageList: use correct values for section and component --- diff --git a/daklib/packagelist.py b/daklib/packagelist.py index 1af05b76..04a0ef51 100644 --- a/daklib/packagelist.py +++ b/daklib/packagelist.py @@ -90,7 +90,7 @@ class PackageList(object): # [arch=[,]...] name = fields[0] package_type = fields[1] - component, section = extract_component_from_section(fields[2]) + section, component = extract_component_from_section(fields[2]) priority = fields[3] other = dict(kv.split('=', 1) for kv in fields[4:]) diff --git a/tests/test_packagelist.py b/tests/test_packagelist.py index 9259e739..fa5cc86a 100644 --- a/tests/test_packagelist.py +++ b/tests/test_packagelist.py @@ -81,6 +81,14 @@ class TestPackageList(DakTestCase): p_all_amd64 = pl.packages_for_suite(suite_all_amd64) self.assertEqual(len(p_all_amd64), 1) + p = p_all[0] + self.assertEqual(p.name, 'libdune-common-doc') + self.assertEqual(p.type, 'deb') + self.assertEqual(p.section, 'doc') + self.assertEqual(p.component, 'main') + self.assertEqual(p.priority, 'optional') + self.assertEqual(p.architectures, ['all']) + def testArchAny(self): pl = PackageList(source_any)