Merge lp:~jelmer/bzr-builddeb/import-dsc-tarball-imports into lp:bzr-builddeb

Proposed by Jelmer Vernooij
Status: Merged
Approved by: James Westby
Approved revision: 592
Merged at revision: 593
Proposed branch: lp:~jelmer/bzr-builddeb/import-dsc-tarball-imports
Merge into: lp:bzr-builddeb
Diff against target: 46 lines (+14/-3)
2 files modified
import_dsc.py (+6/-3)
tests/test_import_dsc.py (+8/-0)
To merge this branch: bzr merge lp:~jelmer/bzr-builddeb/import-dsc-tarball-imports
Reviewer Review Type Date Requested Status
James Westby Approve
Review via email: mp+68549@code.launchpad.net

Description of the change

Fix importing upstream tarballs from 3.0 (quilt) packages in "bzr import-dsc".

To post a comment you must log in.
Revision history for this message
James Westby (james-w) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'import_dsc.py'
2--- import_dsc.py 2011-07-17 13:32:31 +0000
3+++ import_dsc.py 2011-07-20 14:12:39 +0000
4@@ -1513,9 +1513,12 @@
5 "0000", "-exec", "chmod", "644", "{}", ";"])
6 for part in self.dsc['files']:
7 if part['name'].startswith("%s_%s.orig" % (name, str(version.upstream_version))):
8- self.upstream_tarballs.append((os.path.abspath(
9- os.path.join(osutils.dirname(self.dsc_path),
10- part['name'])), part['md5sum']))
11+ self.upstream_tarballs.append((
12+ os.path.abspath(os.path.join(osutils.dirname(self.dsc_path),
13+ part['name'])),
14+ component_from_orig_tarball(part['name'], name,
15+ str(version.upstream_version)),
16+ part['md5sum']))
17 elif (part['name'].endswith(".debian.tar.gz")
18 or part['name'].endswith(".debian.tar.bz2")
19 or part['name'].endswith(".debian.tar.lzma")):
20
21=== modified file 'tests/test_import_dsc.py'
22--- tests/test_import_dsc.py 2011-07-17 12:12:25 +0000
23+++ tests/test_import_dsc.py 2011-07-20 14:12:39 +0000
24@@ -1849,7 +1849,11 @@
25 "README")))
26 self.assertFalse(os.path.exists(os.path.join(orig_dir,
27 "debian", "control")))
28+ self.assertEquals(1, len(extractor.upstream_tarballs))
29+ self.assertEquals(3, len(extractor.upstream_tarballs[0]))
30 self.assertTrue(os.path.exists(extractor.upstream_tarballs[0][0]))
31+ self.assertIs(None, extractor.upstream_tarballs[0][1])
32+ self.assertIsInstance(extractor.upstream_tarballs[0][2], unicode) # md5sum
33 finally:
34 extractor.cleanup()
35
36@@ -1930,7 +1934,11 @@
37 "README")))
38 self.assertFalse(os.path.exists(os.path.join(orig_dir,
39 "debian", "control")))
40+ self.assertEquals(1, len(extractor.upstream_tarballs))
41+ self.assertEquals(3, len(extractor.upstream_tarballs[0]))
42 self.assertTrue(os.path.exists(extractor.upstream_tarballs[0][0]))
43+ self.assertIs(None, extractor.upstream_tarballs[0][1])
44+ self.assertIsInstance(extractor.upstream_tarballs[0][2], unicode) # md5sum
45 finally:
46 extractor.cleanup()
47

Subscribers

People subscribed via source and target branches