Update repo

This commit is contained in:
termux-pacman-bot
2023-11-17 14:01:31 +00:00
parent 45eccf6582
commit 898252fa6d

View File

@@ -45,7 +45,7 @@ def get_build_dependent_files(folders: list, DEP: str) -> list:
"""
Gets all the packages that depend on some package
"""
build_files = []
build_files = set()
for d in folders:
for folder in os.listdir(d):
if os.path.exists(os.path.join(d, folder, "build.sh")):
@@ -55,8 +55,14 @@ def get_build_dependent_files(folders: list, DEP: str) -> list:
"TERMUX_PKG_BUILD_DEPENDS"
):
if is_dep(DEP, line):
build_files.append(os.path.join(d, folder, "build.sh"))
file.close()
build_files.add(os.path.join(d, folder, "build.sh"))
for subfile_name in os.listdir(os.path.join(d, folder)):
if subfile_name.endswith(".subpackage.sh"):
with open(os.path.join(d, folder, subfile_name)) as file:
for line in file.read().split("\n"):
if line.startswith("TERMUX_SUBPKG_DEPENDS"):
if is_dep(DEP, line):
build_files.add(os.path.join(d, folder, "build.sh"))
return build_files