scripts(bin/revbump): also search subpackages
This commit is contained in:
parent
7e69c756d2
commit
03a66e4cde
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue