diff options
| -rw-r--r-- | apt/debfile.py | 2 | ||||
| -rw-r--r-- | tests/data/test_debs/hello_2.5-1.dsc | 3 | ||||
| -rw-r--r-- | tests/test_debfile.py | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/apt/debfile.py b/apt/debfile.py index 20cf563c..440f9532 100644 --- a/apt/debfile.py +++ b/apt/debfile.py @@ -735,7 +735,7 @@ class DscSrcPackage(DebPackage): if 'Source' in sec: self.pkgname = sec['Source'] if 'Binary' in sec: - self.binaries = sec['Binary'].split(', ') + self.binaries = [b.strip() for b in sec['Binary'].split(',')] for tag in sec.keys(): if tag in sec: self._sections[tag] = sec[tag] diff --git a/tests/data/test_debs/hello_2.5-1.dsc b/tests/data/test_debs/hello_2.5-1.dsc index c079f2d3..d00db522 100644 --- a/tests/data/test_debs/hello_2.5-1.dsc +++ b/tests/data/test_debs/hello_2.5-1.dsc @@ -3,7 +3,8 @@ Hash: SHA256 Format: 1.0 Source: hello -Binary: hello +Binary: hello, bello, + cello Architecture: any Version: 2.5-1 Maintainer: Santiago Vila <sanvila@debian.org> diff --git a/tests/test_debfile.py b/tests/test_debfile.py index b8418e78..eae8038f 100644 --- a/tests/test_debfile.py +++ b/tests/test_debfile.py @@ -71,14 +71,14 @@ class TestDebfile(unittest.TestCase): self.assertEqual(set(deb.missing_deps), missing) # specialized properties self.assertEqual(deb.pkgname, "hello") - self.assertEqual(deb.binaries, ["hello"]) + self.assertEqual(deb.binaries, ["hello", "bello", "cello"]) self.assertEqual(deb.filelist, ["hello_2.5.orig.tar.gz", "hello_2.5-1.diff.gz"]) self.assertEqual(deb.depends, [[("autotools-dev", "", "")]]) # tag fields are available as a dict self.assertEqual(deb["Format"], "1.0") self.assertEqual(deb["Source"], "hello") - self.assertEqual(deb["Binary"], "hello") + self.assertEqual(deb["Binary"], "hello, bello,\n cello") self.assertEqual(deb["Architecture"], "any") self.assertEqual(deb["Version"], "2.5-1") self.assertEqual( |
