diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-07-25 17:40:11 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-07-25 21:22:30 +0200 |
commit | f0ba62c753ff08fe6ad1e30108e9668d984adfd0 (patch) | |
tree | cdba968b06664c3ccaabfd3b9c50652db77742fe /git-import-dsc | |
parent | 33d5156335a6a602102d7387624e05729d46d5ff (diff) |
Drop unpack_orig and tar_toplevel
Diffstat (limited to 'git-import-dsc')
-rwxr-xr-x | git-import-dsc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/git-import-dsc b/git-import-dsc index 0cf4223e..16a9771f 100755 --- a/git-import-dsc +++ b/git-import-dsc @@ -27,8 +27,8 @@ import pipes import time from email.Utils import parseaddr import gbp.command_wrappers as gbpc -from gbp.deb import (debian_version_chars, parse_changelog, unpack_orig, - parse_dsc, DscFile, tar_toplevel) +from gbp.deb import (debian_version_chars, parse_changelog, + parse_dsc, DscFile, UpstreamSource) from gbp.git import (build_tag, create_repo, GitRepository, GitRepositoryError, rfc822_date_to_git) from gbp.config import GbpOptionParser, GbpOptionGroup, no_upstream_branch_msg @@ -250,8 +250,8 @@ def main(argv): os.chdir(repo.path) dirs['tmp'] = os.path.abspath(tempfile.mkdtemp(dir='..')) - unpack_dir = unpack_orig(src.tgz, dirs['tmp'], options.filters) - unpack_dir = tar_toplevel(unpack_dir) + upstream = UpstreamSource(src.tgz) + upstream.unpack(dirs['tmp'], options.filters) format = [(options.upstream_tag, "Upstream"), (options.debian_tag, "Debian")][src.native] tag = build_tag(format[0], src.upstream_version) @@ -281,7 +281,7 @@ def main(argv): "\nAlso check the --create-missing-branches option.") raise GbpError - commit = repo.commit_dir(unpack_dir, + commit = repo.commit_dir(upstream.unpacked, "Imported %s" % msg, branch) gitTag(version=tag, msg=msg, commit=commit) @@ -296,7 +296,7 @@ def main(argv): if is_empty and not repo.has_branch(options.debian_branch): gbpc.GitBranch()(options.debian_branch, commit) if src.diff or src.deb_tgz: - apply_debian_patch(repo, unpack_dir, src, options, parents) + apply_debian_patch(repo, upstream.unpacked, src, options, parents) else: gbp.log.warn("Didn't find a diff to apply.") if repo.get_branch() == options.debian_branch or is_empty: |