~ubuntu-branches/debian/sid/bzr-builddeb/sid

« back to all changes in this revision

Viewing changes to upstream/__init__.py

  • Committer: Package Import Robot
  • Author(s): Jelmer Vernooij, Jelmer Vernooij, Martin Packman
  • Date: 2011-10-01 21:27:05 UTC
  • Revision ID: package-import@ubuntu.com-20111001212705-29f1lpwpsdb2dork
Tags: 2.7.9
[ Jelmer Vernooij ]
* Support .tar.xz Debian files rather than .tar.lzma.

[ Martin Packman ]
* Support non-ascii characters in changelog entry when determining
  commit message. LP: #853664

[ Jelmer Vernooij ]
* Use more complete control file during examples. Closes: #642818

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
class GetOrigSourceSource(UpstreamSource):
172
172
    """Upstream source that uses the get-orig-source rule in debian/rules."""
173
173
 
174
 
    def __init__(self, tree, larstiq):
 
174
    def __init__(self, tree, top_level):
175
175
        self.tree = tree
176
 
        self.larstiq = larstiq
 
176
        self.top_level = top_level
177
177
 
178
178
    def _get_orig_source(self, source_dir, prefix, target_dir):
179
179
        note("Trying to use get-orig-source to retrieve needed tarball.")
198
198
        return None
199
199
 
200
200
    def fetch_tarballs(self, package, version, target_dir):
201
 
        if self.larstiq:
 
201
        if self.top_level:
202
202
            rules_name = 'rules'
203
203
        else:
204
204
            rules_name = 'debian/rules'
208
208
            try:
209
209
                base_export_dir = os.path.join(tmpdir, "export")
210
210
                export_dir = base_export_dir
211
 
                if self.larstiq:
 
211
                if self.top_level:
212
212
                    os.mkdir(export_dir)
213
213
                    export_dir = os.path.join(export_dir, "debian")
214
214
                export(self.tree, export_dir, format="dir")
226
226
class UScanSource(UpstreamSource):
227
227
    """Upstream source that uses uscan."""
228
228
 
229
 
    def __init__(self, tree, larstiq):
 
229
    def __init__(self, tree, top_level):
230
230
        self.tree = tree
231
 
        self.larstiq = larstiq
 
231
        self.top_level = top_level
232
232
 
233
233
    def _export_watchfile(self):
234
 
        if self.larstiq:
 
234
        if self.top_level:
235
235
            watchfile = 'watch'
236
236
        else:
237
237
            watchfile = 'debian/watch'
298
298
        if r != 0:
299
299
            note("uscan could not find the needed tarball.")
300
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
302
307
 
303
308
 
304
309
class SelfSplitSource(UpstreamSource):