@@ -91,7 +91,7 @@ def info_main(*args):
91
91
def info_notify (s ):
92
92
info ('{}{}{}{}' .format (Style .BRIGHT , Fore .LIGHTBLUE_EX , s , Style .RESET_ALL ))
93
93
94
- def pretty_log_dists (dists ):
94
+ def pretty_log_dists (dists , log_func = info ):
95
95
infos = []
96
96
for dist in dists :
97
97
infos .append ('{Fore.GREEN}{Style.BRIGHT}{name}{Style.RESET_ALL}: '
@@ -101,7 +101,7 @@ def pretty_log_dists(dists):
101
101
Fore = Fore , Style = Style ))
102
102
103
103
for line in infos :
104
- info ('\t ' + line )
104
+ log_func ('\t ' + line )
105
105
106
106
def shprint (command , * args , ** kwargs ):
107
107
'''Runs the command (which should be an sh.Command instance), while
@@ -2554,7 +2554,12 @@ def recipes(self, args):
2554
2554
2555
2555
def bootstraps (self , args ):
2556
2556
'''List all the bootstraps available to build with.'''
2557
- print (list (Bootstrap .list_bootstraps ()))
2557
+ for bs in Bootstrap .list_bootstraps ():
2558
+ bs = Bootstrap .get_bootstrap (bs , self .ctx )
2559
+ print ('{Fore.BLUE}{Style.BRIGHT}{bs.name}{Style.RESET_ALL}' .format (
2560
+ bs = bs , Fore = Fore , Style = Style ))
2561
+ print (' {Fore.GREEN}depends: {bs.recipe_depends}{Fore.RESET}' .format (
2562
+ bs = bs , Fore = Fore ))
2558
2563
2559
2564
def clean_all (self , args ):
2560
2565
'''Delete all build components; the package cache, package builds,
@@ -2778,12 +2783,12 @@ def distributions(self, args):
2778
2783
dists = Distribution .get_distributions (ctx )
2779
2784
2780
2785
if dists :
2781
- info ('{Style.BRIGHT}Distributions currently installed are:'
2782
- '{Style.RESET_ALL}' .format (Style = Style , Fore = Fore ))
2783
- pretty_log_dists (dists )
2786
+ print ('{Style.BRIGHT}Distributions currently installed are:'
2787
+ '{Style.RESET_ALL}' .format (Style = Style , Fore = Fore ))
2788
+ pretty_log_dists (dists , print )
2784
2789
else :
2785
- info ('{Style.BRIGHT}There are no dists currently built.'
2786
- '{Style.RESET_ALL}' .format (Style = Style ))
2790
+ print ('{Style.BRIGHT}There are no dists currently built.'
2791
+ '{Style.RESET_ALL}' .format (Style = Style ))
2787
2792
2788
2793
def delete_dist (self , args ):
2789
2794
dist = self ._dist
@@ -2839,6 +2844,10 @@ def logcat(self, args):
2839
2844
directory. All extra args are passed as arguments to logcat.'''
2840
2845
self .adb (['logcat' ] + args )
2841
2846
2847
+ def status (self , args ):
2848
+ self .recipes (args )
2849
+ self .bootstraps (args )
2850
+ self .dists (args )
2842
2851
2843
2852
def main ():
2844
2853
ToolchainCL ()
0 commit comments