From 4e04a1a10427f8527e9bee79a141e897c70db54c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 8 Aug 2014 18:08:52 +0530 Subject: [PATCH] More robust tarball compression type detection in the linux installer --- setup/linux-installer.py | 2 +- setup/qt5-migrate.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/setup/linux-installer.py b/setup/linux-installer.py index 776f90ebc7..4b31e65237 100644 --- a/setup/linux-installer.py +++ b/setup/linux-installer.py @@ -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, diff --git a/setup/qt5-migrate.py b/setup/qt5-migrate.py index 246ca9a1df..6c126e805e 100644 --- a/setup/qt5-migrate.py +++ b/setup/qt5-migrate.py @@ -12,6 +12,8 @@ __copyright__ = '2014, Kovid Goyal ' # 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