More robust tarball compression type detection in the linux installer

This commit is contained in:
Kovid Goyal 2014-08-08 18:08:52 +05:30
parent 8b8aaf0e45
commit 4e04a1a104
2 changed files with 3 additions and 1 deletions

View File

@ -593,7 +593,7 @@ def get_https_resource_securely(url, timeout=60, max_redirects=5, ssl_version=No
# }}}
def extract_tarball(raw, destdir):
c = 'j' if calibre_version.startswith('1.') else 'J'
c = 'j' if raw.startswith(b'BZh') else 'J'
prints('Extracting application files...')
with open('/dev/null', 'w') as null:
p = subprocess.Popen(['tar', 'x%sof' % c, '-', '-C', destdir], stdout=null, stdin=subprocess.PIPE, close_fds=True,

View File

@ -12,6 +12,8 @@ __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
# QT5XX: Modify notes about glibc 2.13, os x 10.7 and new Qt/PyQt linux dependencies on the server
# Get rid of tarball compression type detection in linux-installer.py
# QT5XX: Delete this file after migration is completed
import os, re