Merge lp:~jelmer/bzr-builddeb/uscan-print-error into lp:bzr-builddeb

Proposed by Jelmer Vernooij
Status: Merged
Approved by: James Westby
Approved revision: 608
Merged at revision: 612
Proposed branch: lp:~jelmer/bzr-builddeb/uscan-print-error
Merge into: lp:bzr-builddeb
Diff against target: 85 lines (+33/-1) (has conflicts)
4 files modified
debian/changelog (+9/-0)
repack_tarball.py (+1/-0)
tests/test_upstream.py (+17/-0)
upstream/__init__.py (+6/-1)
Text conflict in debian/changelog
To merge this branch: bzr merge lp:~jelmer/bzr-builddeb/uscan-print-error
Reviewer Review Type Date Requested Status
James Westby Approve
Review via email: mp+74511@code.launchpad.net

Description of the change

Print a proper error message when uscan doesn't create the expected orig tarball despite exiting with exit code 0.

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

The diff needs a cleanup (conflicts, pdb), but the change looks good.

Thanks,

James

review: Approve
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Argh, not sure how that got in there.

Thanks for the review.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2011-08-31 01:40:39 +0000
+++ debian/changelog 2011-09-07 20:13:24 +0000
@@ -2,10 +2,19 @@
22
3 * Improve error message when tag for upstream version can not be3 * Improve error message when tag for upstream version can not be
4 found. LP: #7838824 found. LP: #783882
5<<<<<<< TREE
5 * Cope with newer versions of bzr raising IOError rather than6 * Cope with newer versions of bzr raising IOError rather than
6 NoSuchFile error. LP: #831351, Closes: #6382197 NoSuchFile error. LP: #831351, Closes: #638219
8=======
9 * Print proper error if uscan doesn't create the expected orig
10 tarball. LP: #818093.
11>>>>>>> MERGE-SOURCE
712
13<<<<<<< TREE
8 -- Jelmer Vernooij <jelmer@debian.org> Wed, 31 Aug 2011 03:40:12 +020014 -- Jelmer Vernooij <jelmer@debian.org> Wed, 31 Aug 2011 03:40:12 +0200
15=======
16 -- Jelmer Vernooij <jelmer@debian.org> Wed, 07 Sep 2011 22:11:47 +0200
17>>>>>>> MERGE-SOURCE
918
10bzr-builddeb (2.7.7) unstable; urgency=low19bzr-builddeb (2.7.7) unstable; urgency=low
1120
1221
=== modified file 'repack_tarball.py'
--- repack_tarball.py 2011-07-16 21:52:11 +0000
+++ repack_tarball.py 2011-09-07 20:13:24 +0000
@@ -187,6 +187,7 @@
187187
188188
189def _repack_directory(target_transport, new_name, source_name):189def _repack_directory(target_transport, new_name, source_name):
190 import pdb; pdb.set_trace()
190 target_transport.ensure_base()191 target_transport.ensure_base()
191 target_f = target_transport.open_write_stream(new_name)192 target_f = target_transport.open_write_stream(new_name)
192 try:193 try:
193194
=== modified file 'tests/test_upstream.py'
--- tests/test_upstream.py 2011-07-25 13:11:01 +0000
+++ tests/test_upstream.py 2011-09-07 20:13:24 +0000
@@ -60,6 +60,7 @@
60 UpstreamSource,60 UpstreamSource,
61 UScanSource,61 UScanSource,
62 extract_tarball_version,62 extract_tarball_version,
63 gather_orig_files,
63 new_tarball_name,64 new_tarball_name,
64 )65 )
65from bzrlib.plugins.builddeb.util import (66from bzrlib.plugins.builddeb.util import (
@@ -921,3 +922,19 @@
921 def test_zip(self):922 def test_zip(self):
922 self.assertEquals("foo_1.0.orig.tar.gz",923 self.assertEquals("foo_1.0.orig.tar.gz",
923 new_tarball_name("foo", "1.0", "bla.zip"))924 new_tarball_name("foo", "1.0", "bla.zip"))
925
926
927class TestGatherOrigTarballs(TestCaseWithTransport):
928
929 def test_no_dir(self):
930 self.assertIs(None, gather_orig_files("mypkg", "1.0", "idontexist"))
931
932 def test_empty(self):
933 self.build_tree(["empty/"])
934 self.assertIs(None, gather_orig_files("mypkg", "1.0", "empty"))
935
936 def test_single(self):
937 self.build_tree(["mypkg_1.0.orig.tar.gz"])
938 self.assertEquals(
939 [os.path.join(self.test_dir, "mypkg_1.0.orig.tar.gz")],
940 gather_orig_files("mypkg", "1.0", "."))
924941
=== modified file 'upstream/__init__.py'
--- upstream/__init__.py 2011-07-16 22:07:04 +0000
+++ upstream/__init__.py 2011-09-07 20:13:24 +0000
@@ -298,7 +298,12 @@
298 if r != 0:298 if r != 0:
299 note("uscan could not find the needed tarball.")299 note("uscan could not find the needed tarball.")
300 raise PackageVersionNotPresent(package, version, self)300 raise PackageVersionNotPresent(package, version, self)
301 return gather_orig_files(package, version, target_dir)301 orig_files = gather_orig_files(package, version, target_dir)
302 if orig_files is None:
303 note("the expected files generated by uscan could not be found in"
304 "%s.", target_dir)
305 raise PackageVersionNotPresent(package, version, self)
306 return orig_files
302307
303308
304class SelfSplitSource(UpstreamSource):309class SelfSplitSource(UpstreamSource):

Subscribers

People subscribed via source and target branches