mirror of
				https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
				synced 2025-11-04 10:34:05 +00:00 
			
		
		
		
	MigrationManager: Precompute a set of all architectures
Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
		
							parent
							
								
									89fcccba13
								
							
						
					
					
						commit
						d3b391aed1
					
				@ -43,6 +43,7 @@ class MigrationManager(object):
 | 
			
		||||
        self.pkg_universe = pkg_universe
 | 
			
		||||
        self.constraints = constraints
 | 
			
		||||
        self._transactions = []
 | 
			
		||||
        self._all_architectures = frozenset(self.options.architectures)
 | 
			
		||||
 | 
			
		||||
    @property
 | 
			
		||||
    def current_transaction(self):
 | 
			
		||||
@ -343,18 +344,18 @@ class MigrationManager(object):
 | 
			
		||||
        return (affected_direct, affected_all)
 | 
			
		||||
 | 
			
		||||
    def _apply_multiple_items_to_target_suite(self, items):
 | 
			
		||||
        affected_architectures = set()
 | 
			
		||||
        is_source_migration = False
 | 
			
		||||
        if len(items) == 1:
 | 
			
		||||
            item = items[0]
 | 
			
		||||
            # apply the changes
 | 
			
		||||
            affected_direct, affected_all = self._apply_item_to_target_suite(item)
 | 
			
		||||
            if item.architecture == 'source':
 | 
			
		||||
                affected_architectures = set(self.options.architectures)
 | 
			
		||||
                affected_architectures = self._all_architectures
 | 
			
		||||
                is_source_migration = True
 | 
			
		||||
            else:
 | 
			
		||||
                affected_architectures.add(item.architecture)
 | 
			
		||||
                affected_architectures = {item.architecture}
 | 
			
		||||
        else:
 | 
			
		||||
            affected_architectures = set()
 | 
			
		||||
            removals = set()
 | 
			
		||||
            affected_direct = set()
 | 
			
		||||
            affected_all = set()
 | 
			
		||||
@ -364,7 +365,7 @@ class MigrationManager(object):
 | 
			
		||||
                affected_architectures.add(item.architecture)
 | 
			
		||||
 | 
			
		||||
            if 'source' in affected_architectures:
 | 
			
		||||
                affected_architectures = set(self.options.architectures)
 | 
			
		||||
                affected_architectures = self._all_architectures
 | 
			
		||||
                is_source_migration = True
 | 
			
		||||
 | 
			
		||||
            for item in items:
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user