Merge lp:~al-maisan/bzr-builddeb/bd-merge-failure-no-source-uris into lp:~bzr-builddeb-hackers/bzr-builddeb/trunk-old

Proposed by Muharem Hrnjadovic
Status: Merged
Merged at revision: not available
Proposed branch: lp:~al-maisan/bzr-builddeb/bd-merge-failure-no-source-uris
Merge into: lp:~bzr-builddeb-hackers/bzr-builddeb/trunk-old
Diff against target: None lines
To merge this branch: bzr merge lp:~al-maisan/bzr-builddeb/bd-merge-failure-no-source-uris
Reviewer Review Type Date Requested Status
James Westby Approve
Review via email: mp+11622@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Muharem Hrnjadovic (al-maisan) wrote :

Hello,

this branch adds code that handles the case where the apt.sources file contains no source URIs (see bug #375897 for more detail). Please have a look and let me know what you think.

Thanks!

Revision history for this message
James Westby (james-w) wrote :

Looks good, thanks.

James

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'upstream.py'
2--- upstream.py 2009-08-24 17:33:44 +0000
3+++ upstream.py 2009-09-11 18:02:26 +0000
4@@ -96,7 +96,14 @@
5 else:
6 apt_pkg = _apt_pkg
7 apt_pkg.init()
8- sources = apt_pkg.GetPkgSrcRecords()
9+
10+ # Handle the case where the apt.sources file contains no source
11+ # URIs (LP:375897)
12+ try:
13+ sources = apt_pkg.GetPkgSrcRecords()
14+ except SystemError:
15+ raise PackageVersionNotPresent(package, upstream_version, self)
16+
17 sources.Restart()
18 info("Using apt to look for the upstream tarball.")
19 while sources.Lookup(package):

Subscribers

People subscribed via source and target branches