diff --git a/setup/linux-installer.py b/setup/linux-installer.py index 46c16678dd..59086b5f1a 100644 --- a/setup/linux-installer.py +++ b/setup/linux-installer.py @@ -290,8 +290,7 @@ def do_download(dest): prints('Downloaded %s bytes'%os.path.getsize(dest)) def download_tarball(): - ext = 'tar.bz2' if calibre_version.startswith('1.') else 'txz' - fname = 'calibre-%s-i686.%s'%(calibre_version, ext) + fname = 'calibre-%s-i686.%s'%(calibre_version, 'txz') if is64bit: fname = fname.replace('i686', 'x86_64') tdir = tempfile.gettempdir() @@ -593,10 +592,9 @@ def get_https_resource_securely(url, timeout=60, max_redirects=5, ssl_version=No # }}} def extract_tarball(raw, destdir): - 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, + p = subprocess.Popen(['tar', 'xJof', '-', '-C', destdir], stdout=null, stdin=subprocess.PIPE, close_fds=True, preexec_fn=lambda: signal.signal(signal.SIGPIPE, signal.SIG_DFL)) p.stdin.write(raw) diff --git a/setup/qt5-migrate.py b/setup/qt5-migrate.py index aed37d939c..38e3023bed 100644 --- a/setup/qt5-migrate.py +++ b/setup/qt5-migrate.py @@ -8,8 +8,6 @@ __copyright__ = '2014, Kovid Goyal ' # QT5XX: Get rid of the plugin porting stat collection in plugins_mirror.py -# QT5XX: Get rid of tarball compression type detection in linux-installer.py - # QT5XX: Delete this file after migration is completed import os, re