buildorder.py: add targeted build order
Now you can run the following: `buildorder.py <package> [<package> ...]` and get the buildorder just for building those packages
This commit is contained in:
parent
da6299f059
commit
a8d10018d4
@ -9,10 +9,6 @@ def die(msg):
|
|||||||
sys.exit('ERROR: ' + msg)
|
sys.exit('ERROR: ' + msg)
|
||||||
|
|
||||||
|
|
||||||
if len(sys.argv) != 1:
|
|
||||||
die('buildorder.py takes no arguments')
|
|
||||||
|
|
||||||
|
|
||||||
class TermuxBuildFile(object):
|
class TermuxBuildFile(object):
|
||||||
def __init__(self, path):
|
def __init__(self, path):
|
||||||
self.path = path
|
self.path = path
|
||||||
@ -192,6 +188,17 @@ def generate_and_print_buildorder():
|
|||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
||||||
|
def print_after_deps_recursive(pkg):
|
||||||
|
for dep in sorted(pkg.deps):
|
||||||
|
print_after_deps_recursive(pkgs_map[dep])
|
||||||
|
print(pkg.name)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
populate()
|
populate()
|
||||||
generate_and_print_buildorder()
|
|
||||||
|
if len(sys.argv) == 1:
|
||||||
|
generate_and_print_buildorder()
|
||||||
|
|
||||||
|
for target in sys.argv[1:]:
|
||||||
|
print_after_deps_recursive(pkgs_map[target])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user