diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-01-10 19:24:58 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-01-11 10:53:43 +0100 |
commit | 5fb074984bad0500245bd491e0a1eea9c69b0f8f (patch) | |
tree | 5c41b2698ba2882aba7155359349ca44477d2d38 /gbp/scripts/import_orig.py | |
parent | 629e79eb3800da1f9301e5d11a378e6ae7abcffa (diff) |
import_orig: Delay unpack of component tarballs
Instead of unpacking them right away first repack the filtered tarball
so the component tarballs don't end up in the main tarball when using
filters.
Closes: #840602
Diffstat (limited to 'gbp/scripts/import_orig.py')
-rw-r--r-- | gbp/scripts/import_orig.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gbp/scripts/import_orig.py b/gbp/scripts/import_orig.py index 2e139ab6..5c948276 100644 --- a/gbp/scripts/import_orig.py +++ b/gbp/scripts/import_orig.py @@ -537,17 +537,19 @@ def main(argv): if repo.bare: set_bare_repo_options(options) - if not source.is_dir(): + if not source.is_dir(): # Unpack main tarball tmpdir = tempfile.mkdtemp(dir='../') source.unpack(tmpdir, options.filters) gbp.log.debug("Unpacked '%s' to '%s'" % (source.path, source.unpacked)) - for (component, tarball) in component_tarballs: - unpack_component_tarball(source.unpacked, component, tarball, options.filters) if orig_needs_repack(source, options): gbp.log.debug("Filter pristine-tar: repacking '%s' from '%s'" % (source.path, source.unpacked)) (source, tmpdir) = repack_source(source, sourcepackage, version, tmpdir, options.filters) + if not source.is_dir(): # Unpack component tarballs + for (component, tarball) in component_tarballs: + unpack_component_tarball(source.unpacked, component, tarball, options.filters) + (pristine_orig, linked) = prepare_pristine_tar(source.path, sourcepackage, version) |