mirror of
				https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
				synced 2025-10-31 16:44:13 +00:00 
			
		
		
		
	Don't calculate smoothbins for items from *pu
When building the excuses, don't calculate smoothbins for items not from unstable. This improves the change from commit db584d9fdc Also try to make the code more readable. Signed-off-by: Ivo De Decker <ivodd@debian.org>
This commit is contained in:
		
							parent
							
								
									b41a1a4123
								
							
						
					
					
						commit
						a3b194c13e
					
				
							
								
								
									
										19
									
								
								britney.py
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								britney.py
									
									
									
									
									
								
							| @ -1290,13 +1290,20 @@ class Britney(object): | |||||||
|         # package is not fake, then check what packages should be removed |         # package is not fake, then check what packages should be removed | ||||||
|         if not anywrongver and (anyworthdoing or not source_u.is_fakesrc): |         if not anywrongver and (anyworthdoing or not source_u.is_fakesrc): | ||||||
|             srcv = source_u.version |             srcv = source_u.version | ||||||
|             ssrc = source_t.version == srcv |             same_source = source_t.version == srcv | ||||||
|             # if this is a binary-only migration via *pu, we never want to try |  | ||||||
|             # removing binary packages |  | ||||||
|             primary_source_suite = self.suite_info.primary_source_suite |             primary_source_suite = self.suite_info.primary_source_suite | ||||||
|             if not (ssrc and source_suite is not primary_source_suite): |             is_primary_source = source_suite == primary_source_suite | ||||||
|  |             # we want to remove binaries that are no longer produced by the | ||||||
|  |             # new source, but there are some special cases: | ||||||
|  |             # - if this is binary-only (same_source) and not from the primary | ||||||
|  |             #   source, we don't do any removals: | ||||||
|  |             #   binNMUs in *pu on some architectures would otherwise result in | ||||||
|  |             #   the removal of binaries on other architectures | ||||||
|  |             # - for the primary source, smooth binaries in the target suite | ||||||
|  |             #   are not considered for removal | ||||||
|  |             if not same_source or is_primary_source: | ||||||
|                 smoothbins = set() |                 smoothbins = set() | ||||||
|                 if src in primary_source_suite.sources: |                 if is_primary_source: | ||||||
|                     _, _, smoothbins, _ = self._compute_groups(src, |                     _, _, smoothbins, _ = self._compute_groups(src, | ||||||
|                                                             primary_source_suite, |                                                             primary_source_suite, | ||||||
|                                                             arch, |                                                             arch, | ||||||
| @ -1318,7 +1325,7 @@ class Britney(object): | |||||||
|                         # the removed binary is only interesting if this is a binary-only migration, |                         # the removed binary is only interesting if this is a binary-only migration, | ||||||
|                         # as otherwise the updated source will already cause the binary packages |                         # as otherwise the updated source will already cause the binary packages | ||||||
|                         # to be updated |                         # to be updated | ||||||
|                         if ssrc and pkg_id not in smoothbins: |                         if same_source and pkg_id not in smoothbins: | ||||||
|                             # Special-case, if the binary is a candidate for a smooth update, we do not consider |                             # Special-case, if the binary is a candidate for a smooth update, we do not consider | ||||||
|                             # it "interesting" on its own.  This case happens quite often with smooth updatable |                             # it "interesting" on its own.  This case happens quite often with smooth updatable | ||||||
|                             # packages, where the old binary "survives" a full run because it still has |                             # packages, where the old binary "survives" a full run because it still has | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user