aboutsummaryrefslogtreecommitdiffhomepage
path: root/git-import-orig
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2008-08-12 18:21:12 +0200
committerGuido Guenther <agx@sigxcpu.org>2008-08-12 18:21:12 +0200
commit32b2e89565f9c37bd3f3c40c77b5c19c5b1f0e2b (patch)
tree07d16c2bdfd35594adf35987bc4afc71b642a7c2 /git-import-orig
parent64808dffa98ca2e5910707d2a763606ec8a91cb0 (diff)
detect flat tar archives in git-import-dsc too
Diffstat (limited to 'git-import-orig')
-rwxr-xr-xgit-import-orig10
1 files changed, 2 insertions, 8 deletions
diff --git a/git-import-orig b/git-import-orig
index 383c5967..54c359e5 100755
--- a/git-import-orig
+++ b/git-import-orig
@@ -25,7 +25,7 @@ import re
import glob
import subprocess
import gbp.command_wrappers as gbpc
-from gbp.deb_utils import parse_changelog, unpack_orig, NoChangelogError, has_epoch
+from gbp.deb_utils import parse_changelog, unpack_orig, NoChangelogError, has_epoch, tar_toplevel
from gbp.git_utils import (GitRepositoryError, GitRepository, build_tag, replace_source_tree)
from gbp.config import GbpOptionParser
from gbp.errors import GbpError
@@ -177,13 +177,7 @@ on howto create it otherwise use --upstream-branch to specify it.
unpack_orig(archive, tmpdir, options.filters)
if options.verbose:
print "Unpacked %s to '%s'" % (archive , tmpdir)
- unpacked = glob.glob(tmpdir+'/*')
- # archive has everything packed up in one subdir:
- if len(unpacked) == 1:
- orig_dir = unpacked[0]
- # archive content not in a subdir
- else:
- orig_dir = tmpdir
+ orig_dir = tar_toplevel(tmpdir)
try:
cp = parse_changelog('debian/changelog')
pristine_orig = symlink_orig(archive, cp['Source'], version)