diff options
author | Guido Günther <agx@sigxcpu.org> | 2017-06-26 12:23:30 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2017-06-26 12:23:30 +0200 |
commit | 956982c52500ff52bdab6bb811b86ad6fedbaa19 (patch) | |
tree | c8ae7fcbf5f9e27559d1488408356f139e331379 /gbp/scripts/import_orig.py | |
parent | d022623e0783f26690abc65993e4152265de68e5 (diff) |
New command 'pristine-tar'
This allows one to run the pristine-tar import at a later point. This
is useful when using component tarballs and we need to reference the
right trees for the commits.
The command can later be extended to allow for "export" as well to
recreate the tarballs without having to invoke "gbp buildpackage".
Diffstat (limited to 'gbp/scripts/import_orig.py')
-rw-r--r-- | gbp/scripts/import_orig.py | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/gbp/scripts/import_orig.py b/gbp/scripts/import_orig.py index 3ff6c44d..016ebff9 100644 --- a/gbp/scripts/import_orig.py +++ b/gbp/scripts/import_orig.py @@ -31,11 +31,10 @@ from gbp.deb.changelog import ChangeLog, NoChangeLogError from gbp.deb.git import (GitRepositoryError, DebianGitRepository) from gbp.config import GbpOptionParserDebian, GbpOptionGroup, no_upstream_branch_msg from gbp.errors import GbpError -from gbp.pkg import parse_archive_filename from gbp.format import format_str from gbp.git.vfs import GitVfs import gbp.log -from gbp.scripts.common import ExitCodes, is_download +from gbp.scripts.common import ExitCodes, is_download, get_component_tarballs from gbp.scripts.common.import_orig import (orig_needs_repack, cleanup_tmp_tree, ask_package_name, ask_package_version, repack_source, is_link_target, download_orig) @@ -398,25 +397,6 @@ def debian_branch_merge_by_merge(repo, tag, version, options): repo.set_branch(branch) -def get_component_tarballs(name, version, tarball, components): - """ - Figure out the paths to the component tarballs based on the main - tarball. - """ - tarballs = [] - for component in components: - (_, _, comp_type) = parse_archive_filename(tarball) - cname = DebianPkgPolicy.build_tarball_name(name, - version, - comp_type, - os.path.dirname(tarball), - component) - tarballs.append((component, cname)) - if not os.path.exists(cname): - raise GbpError("Can not find component tarball %s" % cname) - return tarballs - - def unpack_tarballs(sourcepackage, source, version, component_tarballs, options): tmpdir = tempfile.mkdtemp(dir='../') if not source.is_dir(): # Unpack main tarball |