aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/deb.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2010-06-26 00:18:55 +0200
committerGuido Günther <agx@sigxcpu.org>2010-06-26 01:09:06 +0200
commit077bdb0107b1da8af5de89caf247fbaa2dcd18e1 (patch)
tree6f6fbc53de15e60821fccd7bd0ea251194b9f5b4 /gbp/deb.py
parentbd1ad0397771a88e076f524b42d332b7685d745c (diff)
Add compression=auto
to guess compression type of upstream tarball from pristine-tar branch. This is now the default. Closes: #566993
Diffstat (limited to 'gbp/deb.py')
-rw-r--r--gbp/deb.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/gbp/deb.py b/gbp/deb.py
index b50abbde..0663977e 100644
--- a/gbp/deb.py
+++ b/gbp/deb.py
@@ -166,6 +166,15 @@ def is_native(cp):
return [ True, False ]['-' in cp['Version']]
+def get_compression(orig_file):
+ "Given an orig file return the compression used"
+ ext = orig_file.rsplit('.',1)[1]
+ for (c, o) in compressor_opts.iteritems():
+ if o[1] == ext:
+ return c
+ return None
+
+
def has_epoch(cp):
"""does the topmost version number contain an epoch"""
try: