Skip to content

Commit 101c208

Browse files
authored
Remove redundant argument to fetch_project. NFC (#13703)
Given that we detect the type based on filename for other cases it seems like we don't need this extra arg.
1 parent e1e682f commit 101c208

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

tools/ports/harfbuzz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def get_lib_name(settings):
2424

2525
def get(ports, settings, shared):
2626
ports.fetch_project('harfbuzz', 'https://github.com/harfbuzz/harfbuzz/releases/download/' +
27-
TAG + '/harfbuzz-' + TAG + '.tar.bz2', 'harfbuzz-' + TAG, is_tarbz2=True, sha512hash=HASH)
27+
TAG + '/harfbuzz-' + TAG + '.tar.bz2', 'harfbuzz-' + TAG, sha512hash=HASH)
2828

2929
def create(final):
3030
logging.info('building port: harfbuzz')

tools/ports/mpg123.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def needed(settings):
1616

1717

1818
def get(ports, settings, shared):
19-
ports.fetch_project('mpg123', 'https://www.mpg123.de/download/mpg123-1.26.2.tar.bz2', 'mpg123-' + TAG, is_tarbz2=True, sha512hash=HASH)
19+
ports.fetch_project('mpg123', 'https://www.mpg123.de/download/mpg123-1.26.2.tar.bz2', 'mpg123-' + TAG, sha512hash=HASH)
2020

2121
def create(output_path):
2222
logging.info('building port: mpg123')

tools/system_libs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1664,7 +1664,7 @@ def get_build_dir():
16641664
name_cache = set()
16651665

16661666
@staticmethod
1667-
def fetch_project(name, url, subdir, is_tarbz2=False, sha512hash=None):
1667+
def fetch_project(name, url, subdir, sha512hash=None):
16681668
# To compute the sha512 hash, run `curl URL | sha512sum`.
16691669
fullname = os.path.join(Ports.get_dir(), name)
16701670

@@ -1706,7 +1706,7 @@ def fetch_project(name, url, subdir, is_tarbz2=False, sha512hash=None):
17061706
Ports.clear_project_build(name)
17071707
return
17081708

1709-
if is_tarbz2:
1709+
if url.endswith('.tar.bz2'):
17101710
fullpath = fullname + '.tar.bz2'
17111711
elif url.endswith('.tar.gz'):
17121712
fullpath = fullname + '.tar.gz'
@@ -1738,7 +1738,7 @@ def retrieve():
17381738
open(fullpath, 'wb').write(data)
17391739

17401740
def check_tag():
1741-
if is_tarbz2:
1741+
if url.endswith('.tar.bz2'):
17421742
names = tarfile.open(fullpath, 'r:bz2').getnames()
17431743
elif url.endswith('.tar.gz'):
17441744
names = tarfile.open(fullpath, 'r:gz').getnames()

0 commit comments

Comments
 (0)