@@ -425,6 +425,11 @@ def add(self, dependent, dependency):
425
425
if dependent != dependency :
426
426
self .graph [dependent ].add (dependency )
427
427
428
+ def conflicts (self , conflict ):
429
+ if conflict in self .graph :
430
+ return True
431
+ return False
432
+
428
433
def add_optional (self , dependent , dependency ):
429
434
"""Add an optional (ordering only) dependency relationship to the graph
430
435
@@ -1878,7 +1883,7 @@ def build_recipes(names, ctx):
1878
1883
recipes_to_load = set (names )
1879
1884
bs = ctx .bootstrap
1880
1885
if bs is not None and bs .recipe_depends :
1881
- info ('Bootstrap requires recipes {}' .format (bs .recipe_depends ))
1886
+ info_notify ('Bootstrap requires recipes {}' .format (bs .recipe_depends ))
1882
1887
recipes_to_load = recipes_to_load .union (set (bs .recipe_depends ))
1883
1888
recipes_to_load = list (recipes_to_load )
1884
1889
recipe_loaded = []
@@ -1894,22 +1899,25 @@ def build_recipes(names, ctx):
1894
1899
python_modules .append (name )
1895
1900
continue
1896
1901
graph .add (name , name )
1897
- info ('Loaded recipe {} (depends on {}, conflicts {})' .format (name , recipe .depends , recipe .conflicts ))
1902
+ info ('Loaded recipe {} (depends on {}{})' .format (
1903
+ name , recipe .depends ,
1904
+ ', conflicts {}' .format (recipe .conflicts ) if recipe .conflicts else '' ))
1898
1905
for depend in recipe .depends :
1899
1906
graph .add (name , depend )
1900
1907
recipes_to_load += recipe .depends
1901
1908
for conflict in recipe .conflicts :
1902
- if conflict in graph .graph :
1909
+ if graph .conflicts ( conflict ) :
1903
1910
warning (
1904
1911
('{} conflicts with {}, but both have been '
1905
1912
'included in the requirements.' .format (recipe .name , conflict )))
1906
1913
warning ('Due to this conflict the build cannot continue, exiting.' )
1907
1914
exit (1 )
1908
1915
recipe_loaded .append (name )
1909
1916
build_order = list (graph .find_order ())
1910
- info ("Recipe build order is {}" .format (build_order ))
1911
- info_notify (('The requirements ({}) were not found as recipes, they will be '
1912
- 'installed with pip.' ).format (', ' .join (python_modules )))
1917
+ info_notify ("Recipe build order is {}" .format (build_order ))
1918
+ if python_modules :
1919
+ info_notify (('The requirements ({}) were not found as recipes, they will be '
1920
+ 'installed with pip.' ).format (', ' .join (python_modules )))
1913
1921
ctx .recipe_build_order = build_order
1914
1922
1915
1923
recipes = [Recipe .get_recipe (name , ctx ) for name in build_order ]
0 commit comments