@@ -413,7 +413,7 @@ class ArchAndroid(Arch):
413
413
414
414
415
415
class Graph (object ):
416
- # Taken from python-for-android/depsort
416
+ # Taken from the old python-for-android/depsort
417
417
def __init__ (self ):
418
418
# `graph`: dict that maps each package to a set of its dependencies.
419
419
self .graph = {}
@@ -1875,16 +1875,16 @@ def get_recipe_env(self, arch):
1875
1875
def build_recipes (names , ctx ):
1876
1876
# Put recipes in correct build order
1877
1877
graph = Graph ()
1878
- recipe_to_load = set (names )
1878
+ recipes_to_load = set (names )
1879
1879
bs = ctx .bootstrap
1880
- if bs .recipe_depends :
1880
+ if bs is not None and bs .recipe_depends :
1881
1881
info ('Bootstrap requires recipes {}' .format (bs .recipe_depends ))
1882
- recipe_to_load = recipe_to_load .union (set (bs .recipe_depends ))
1883
- recipe_to_load = list (recipe_to_load )
1882
+ recipes_to_load = recipes_to_load .union (set (bs .recipe_depends ))
1883
+ recipes_to_load = list (recipes_to_load )
1884
1884
recipe_loaded = []
1885
1885
python_modules = []
1886
- while recipe_to_load :
1887
- name = recipe_to_load .pop (0 )
1886
+ while recipes_to_load :
1887
+ name = recipes_to_load .pop (0 )
1888
1888
if name in recipe_loaded :
1889
1889
continue
1890
1890
try :
@@ -1894,10 +1894,17 @@ def build_recipes(names, ctx):
1894
1894
python_modules .append (name )
1895
1895
continue
1896
1896
graph .add (name , name )
1897
- info ('Loaded recipe {} (depends on {})' .format (name , recipe .depends ))
1897
+ info ('Loaded recipe {} (depends on {}, conflicts {} )' .format (name , recipe .depends , recipe . conflicts ))
1898
1898
for depend in recipe .depends :
1899
1899
graph .add (name , depend )
1900
- recipe_to_load += recipe .depends
1900
+ recipes_to_load += recipe .depends
1901
+ for conflict in recipe .conflicts :
1902
+ if conflict in graph .graph :
1903
+ warning (
1904
+ ('{} conflicts with {}, but both have been '
1905
+ 'included in the requirements.' .format (recipe .name , conflict )))
1906
+ warning ('Due to this conflict the build cannot continue, exiting.' )
1907
+ exit (1 )
1901
1908
recipe_loaded .append (name )
1902
1909
build_order = list (graph .find_order ())
1903
1910
info ("Recipe build order is {}" .format (build_order ))
@@ -2102,6 +2109,7 @@ def build_dist_from_args(ctx, dist, args_list):
2102
2109
args , unknown = parser .parse_known_args (args_list )
2103
2110
2104
2111
bs = Bootstrap .get_bootstrap (args .bootstrap , ctx )
2112
+ info ('The selected bootstrap is {}' .format (bs .name ))
2105
2113
info_main ('# Creating dist with {} bootstrap' .format (bs .name ))
2106
2114
bs .distribution = dist
2107
2115
info_notify ('Dist will have name {} and recipes ({})' .format (
@@ -2522,7 +2530,9 @@ def delete_dist(self, args):
2522
2530
2523
2531
def adb (self , args ):
2524
2532
'''Runs the adb binary from the detected SDK directory, passing all
2525
- arguments straight to it.'''
2533
+ arguments straight to it. This is intended as a convenience
2534
+ function if adb is not in your $PATH.
2535
+ '''
2526
2536
ctx = self .ctx
2527
2537
ctx .prepare_build_environment (user_sdk_dir = self .sdk_dir ,
2528
2538
user_ndk_dir = self .ndk_dir ,
@@ -2535,7 +2545,8 @@ def adb(self, args):
2535
2545
info_notify ('Starting adb...' )
2536
2546
output = adb (args , _iter = True , _out_bufsize = 1 , _err_to_out = True )
2537
2547
for line in output :
2538
- print (line )
2548
+ sys .stdout .write (line )
2549
+ sys .stdout .flush ()
2539
2550
2540
2551
def logcat (self , args ):
2541
2552
'''Runs ``adb logcat`` using the adb binary from the detected SDK
0 commit comments