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

« back to all changes in this revision

Viewing changes to source_distiller.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij, Jelmer Vernooij, Jonathan Riddell, Scott Kitterman
  • Date: 2011-07-15 12:15:22 UTC
  • Revision ID: james.westby@ubuntu.com-20110715121522-avtc0uc3uuzcg7zn
Tags: 2.7.5
[ Jelmer Vernooij ]
* New 'bzr dep3-patch' subcommand that can generate DEP-3 compliant
  patches. LP: #460576

[ Jonathan Riddell ]
* Use new set_commit_message() hook in bzr to set the commit
  message from debian/changelog and set fixed bugs in tags. LP: #707274

[ Jelmer Vernooij ]
* Add dependency on devscripts >= 2.10.59, required now that 'dch --
  package' is used. LP: #783122
* Fix support for native packages with dashes in their version in
  sources.list. LP: #796853
* Fix deprecation warnings for TestCase.failUnlessExists and
  TestCase.failIfExists in bzr 2.4.

[ Scott Kitterman ]
* Delete debian/bzr-builddeb.dirs so the long obsolete and empty
  /usr/lib/python2.4/site-packages/bzrlib/plugins/bzr-builddeb/ is no
  longer created. Closes: #631564

[ Jelmer Vernooij ]
* Add support for xz and lzma tarballs. LP: #553668
* When importing upstream component tarballs, don't repack bz2/lzma
  tarballs to gz if the package is in v3 source format. LP: #810531

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import glob
21
21
import os
22
22
import shutil
23
 
import subprocess
24
23
import tempfile
25
24
 
26
25
from bzrlib import errors as bzr_errors
27
26
 
28
 
from bzrlib.plugins.builddeb.errors import (
29
 
        TarFailed,
30
 
        )
31
27
from bzrlib.plugins.builddeb.util import (
32
 
        export,
33
 
        get_parent_dir,
34
 
        recursive_copy,
35
 
        subprocess_setup,
36
 
        )
 
28
    export,
 
29
    extract_orig_tarballs,
 
30
    get_parent_dir,
 
31
    recursive_copy,
 
32
    )
37
33
 
38
34
 
39
35
class SourceDistiller(object):
121
117
        if parent_dir != '' and not os.path.exists(parent_dir):
122
118
            os.makedirs(parent_dir)
123
119
        if not self.use_existing:
124
 
            tarball = self.upstream_provider.provide(parent_dir)
 
120
            tarballs = self.upstream_provider.provide(parent_dir)
125
121
            # Extract it to the right place
126
122
            tempdir = tempfile.mkdtemp(prefix='builddeb-merge-')
127
123
            try:
128
 
                ret = subprocess.call(['tar','-C',tempdir,'-xf',tarball],
129
 
                        preexec_fn=subprocess_setup)
130
 
                if ret != 0:
131
 
                    raise TarFailed("uncompress", tarball)
 
124
                extract_orig_tarballs(tarballs, tempdir)
132
125
                files = glob.glob(tempdir+'/*')
133
126
                # If everything is in a single dir then move everything up one
134
127
                # level.
147
140
            tempdir = os.path.join(basetempdir,"export")
148
141
            if self.larstiq:
149
142
                os.makedirs(tempdir)
150
 
                export_dir = os.path.join(tempdir,'debian')
 
143
                export_dir = os.path.join(tempdir, 'debian')
151
144
            else:
152
145
                export_dir = tempdir
153
146
            if self.is_working_tree: