Skip to content

Commit c431eb4

Browse files
authored
Revert "Support tar.gz file (emscripten-core#8355)"
This reverts commit e6b1f3e.
1 parent 527b6f4 commit c431eb4

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

tools/system_libs.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -872,12 +872,7 @@ def fetch_project(name, url, subdir, is_tarbz2=False):
872872
Ports.clear_project_build(name)
873873
return
874874

875-
if is_tarbz2:
876-
fullpath = fullname + '.tar.bz2'
877-
elif url.endswith('.tar.gz'):
878-
fullpath = fullname + '.tar.gz'
879-
else:
880-
fullpath = fullname + '.zip'
875+
fullpath = fullname + ('.tar.bz2' if is_tarbz2 else '.zip')
881876

882877
if name not in Ports.name_cache: # only mention each port once in log
883878
logger.debug('including port: ' + name)
@@ -904,8 +899,6 @@ def retrieve():
904899
def check_tag():
905900
if is_tarbz2:
906901
names = tarfile.open(fullpath, 'r:bz2').getnames()
907-
elif url.endswith('.tar.gz'):
908-
names = tarfile.open(fullpath, 'r:gz').getnames()
909902
else:
910903
names = zipfile.ZipFile(fullpath, 'r').namelist()
911904

@@ -918,8 +911,6 @@ def unpack():
918911
shared.safe_ensure_dirs(fullname)
919912
if is_tarbz2:
920913
z = tarfile.open(fullpath, 'r:bz2')
921-
elif url.endswith('.tar.gz'):
922-
z = tarfile.open(fullpath, 'r:gz')
923914
else:
924915
z = zipfile.ZipFile(fullpath, 'r')
925916
try:

0 commit comments

Comments
 (0)