aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-02-07 23:21:14 +0100
committerGuido Günther <agx@sigxcpu.org>2012-02-07 23:24:10 +0100
commit1e5193607eafcd573802042bac37a52f6ea5b8fd (patch)
tree04f16f5fce745f7882513bbebb42a0368016edfb /gbp
parent5858ee8e8d8ae9bd30ddd590b06cd3c85ac811a1 (diff)
import_orig: Properly detect .tgz and other abbreviated file extensions
Closes: #658777
Diffstat (limited to 'gbp')
-rw-r--r--gbp/scripts/import_orig.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gbp/scripts/import_orig.py b/gbp/scripts/import_orig.py
index eb202e3e..0446fda1 100644
--- a/gbp/scripts/import_orig.py
+++ b/gbp/scripts/import_orig.py
@@ -97,6 +97,9 @@ def symlink_orig(archive, pkg, version):
if os.path.isdir(archive):
return None
ext = os.path.splitext(archive)[1]
+ if ext in ['.tgz', '.tbz2', '.tlz', '.txz' ]:
+ ext = ".%s" % ext[2:]
+
link = "../%s_%s.orig.tar%s" % (pkg, version, ext)
if os.path.basename(archive) != os.path.basename(link):
try: