@ -145,9 +145,8 @@ class Dependency(GClientKeywords, gclient_utils.WorkItem):
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    # self.dependencies and self.requirements are read and modified from 
 
					 
					 
					 
					    # self.dependencies and self.requirements are read and modified from 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    # multiple threads at the same time. Sad. 
 
					 
					 
					 
					    # multiple threads at the same time. Sad. 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    GClientKeywords . __init__ ( self ) 
 
					 
					 
					 
					    GClientKeywords . __init__ ( self ) 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    gclient_utils . WorkItem . __init__ ( self  )
 
					 
					 
					 
					    gclient_utils . WorkItem . __init__ ( self , name  )
 
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					    self . parent  =  parent 
 
					 
					 
					 
					    self . parent  =  parent 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    self . name  =  name 
 
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    self . url  =  url 
 
					 
					 
					 
					    self . url  =  url 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    self . parsed_url  =  None 
 
					 
					 
					 
					    self . parsed_url  =  None 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    # These 2 are only set in .gclient and not in DEPS files. 
 
					 
					 
					 
					    # These 2 are only set in .gclient and not in DEPS files. 
 
				
			 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
							 
						
					 
					 
					@ -169,8 +168,6 @@ class Dependency(GClientKeywords, gclient_utils.WorkItem):
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    self . processed  =  False 
 
					 
					 
					 
					    self . processed  =  False 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    # This dependency had its hook run 
 
					 
					 
					 
					    # This dependency had its hook run 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    self . hooks_ran  =  False 
 
					 
					 
					 
					    self . hooks_ran  =  False 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    # Required dependencies to run before running this one: 
 
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    self . requirements  =  set ( ) 
 
					 
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    # Post process the url to remove trailing slashes. 
 
					 
					 
					 
					    # Post process the url to remove trailing slashes. 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    if  isinstance ( self . url ,  basestring ) : 
 
					 
					 
					 
					    if  isinstance ( self . url ,  basestring ) : 
 
				
			 
			
		
	
	
		
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
					 
					@ -201,7 +198,7 @@ class Dependency(GClientKeywords, gclient_utils.WorkItem):
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    # self.parent is implicitly a requirement. This will be recursive by 
 
					 
					 
					 
					    # self.parent is implicitly a requirement. This will be recursive by 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    # definition. 
 
					 
					 
					 
					    # definition. 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    if  self . parent  and  self . parent . name : 
 
					 
					 
					 
					    if  self . parent  and  self . parent . name : 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					      self .  requirements. add ( self . parent . name ) 
 
					 
					 
					 
					      self . _ requirements. add ( self . parent . name ) 
 
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    # For a tree with at least 2 levels*, the leaf node needs to depend 
 
					 
					 
					 
					    # For a tree with at least 2 levels*, the leaf node needs to depend 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    # on the level higher up in an orderly way. 
 
					 
					 
					 
					    # on the level higher up in an orderly way. 
 
				
			 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
							 
						
					 
					 
					@ -219,10 +216,10 @@ class Dependency(GClientKeywords, gclient_utils.WorkItem):
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					      for  i  in  range ( 0 ,  root_deps . index ( self . parent ) ) : 
 
					 
					 
					 
					      for  i  in  range ( 0 ,  root_deps . index ( self . parent ) ) : 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        value  =  root_deps [ i ] 
 
					 
					 
					 
					        value  =  root_deps [ i ] 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        if  value . name : 
 
					 
					 
					 
					        if  value . name : 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					          self .  requirements. add ( value . name ) 
 
					 
					 
					 
					          self . _ requirements. add ( value . name ) 
 
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    if  isinstance ( self . url ,  self . FromImpl ) : 
 
					 
					 
					 
					    if  isinstance ( self . url ,  self . FromImpl ) : 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					      self .  requirements. add ( self . url . module_name ) 
 
					 
					 
					 
					      self . _ requirements. add ( self . url . module_name ) 
 
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    if  self . name  and  self . should_process : 
 
					 
					 
					 
					    if  self . name  and  self . should_process : 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					      def  yield_full_tree ( root ) : 
 
					 
					 
					 
					      def  yield_full_tree ( root ) : 
 
				
			 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
							 
						
					 
					 
					@ -238,10 +235,16 @@ class Dependency(GClientKeywords, gclient_utils.WorkItem):
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					          continue 
 
					 
					 
					 
					          continue 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        # Step 1: Find any requirements self may need. 
 
					 
					 
					 
					        # Step 1: Find any requirements self may need. 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        if  self . name . startswith ( posixpath . join ( obj . name ,  ' ' ) ) : 
 
					 
					 
					 
					        if  self . name . startswith ( posixpath . join ( obj . name ,  ' ' ) ) : 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					          self .  requirements. add ( obj . name ) 
 
					 
					 
					 
					          self . _ requirements. add ( obj . name ) 
 
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					        # Step 2: Find any requirements self may impose. 
 
					 
					 
					 
					        # Step 2: Find any requirements self may impose. 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					        if  obj . name . startswith ( posixpath . join ( self . name ,  ' ' ) ) : 
 
					 
					 
					 
					        if  obj . name . startswith ( posixpath . join ( self . name ,  ' ' ) ) : 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					          obj . requirements . add ( self . name ) 
 
					 
					 
					 
					          try : 
 
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					            # Access to a protected member _requirements of a client class 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					            # pylint: disable=W0212 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					            obj . lock . acquire ( ) 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					            obj . _requirements . add ( self . name ) 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					          finally : 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					 
					 
					 
					 
					            obj . lock . release ( ) 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					
 
					 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					  def  LateOverride ( self ,  url ) : 
 
					 
					 
					 
					  def  LateOverride ( self ,  url ) : 
 
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 
					    """ Resolves the parsed url from url. 
 
					 
					 
					 
					    """ Resolves the parsed url from url.