mirror of
				https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
				synced 2025-10-31 16:44:13 +00:00 
			
		
		
		
	Merge and re-factor some pu and tpu tests
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This commit is contained in:
		
							parent
							
								
									2e3dd20a36
								
							
						
					
					
						commit
						0187eaaee1
					
				
							
								
								
									
										33
									
								
								britney.py
									
									
									
									
									
								
							
							
						
						
									
										33
									
								
								britney.py
									
									
									
									
									
								
							| @ -2031,9 +2031,7 @@ class Britney: | ||||
|         # arch = "<source>/<arch>", | ||||
|         elif "/" in pkg: | ||||
|             pkg_name, arch = pkg.split("/") | ||||
|             if arch.endswith("_tpu"): | ||||
|                 arch, suite = arch.split("_") | ||||
|             elif arch.endswith("_pu"): | ||||
|             if arch.endswith("_tpu") or arch.endswith("_pu"): | ||||
|                 arch, suite = arch.split("_") | ||||
|             else: suite = "unstable" | ||||
|         # removal of source packages = "-<source>", | ||||
| @ -2041,13 +2039,9 @@ class Britney: | ||||
|             pkg_name = pkg[1:] | ||||
|             suite = "testing" | ||||
|         # testing-proposed-updates = "<source>_tpu" | ||||
|         # XXXX: why don't these just use split("_") ? | ||||
|         elif pkg.endswith("_tpu"): | ||||
|             pkg_name = pkg[:-4] | ||||
|             suite = "tpu" | ||||
|         elif pkg.endswith("_pu"): | ||||
|             pkg_name = pkg[:-3] | ||||
|             suite = "pu" | ||||
|         # proposed-updates = "<source>_pu" | ||||
|         elif pkg.endswith("_tpu") or pkg.endswith("_pu"): | ||||
|             pkg_name, suite = pkg.rsplit("_") | ||||
|         # normal update of source packages = "<source>" | ||||
|         else: | ||||
|             pkg_name = pkg | ||||
| @ -2741,19 +2735,12 @@ class Britney: | ||||
|             # skip removal requests | ||||
|             if pkg[0] == "-": | ||||
|                 continue | ||||
|             # handle testing-proposed-updates | ||||
|             elif pkg.endswith("_tpu"): | ||||
|                 pkg = pkg[:-4] | ||||
|                 if pkg not in self.sources['tpu']: continue | ||||
|                 if apt_pkg.VersionCompare(self.sources['tpu'][pkg][VERSION], v) != 0: | ||||
|                     self.output_write(" Version mismatch, %s %s != %s\n" % (pkg, v, self.sources['tpu'][pkg][VERSION])) | ||||
|                     ok = False | ||||
|             # handle proposed-updates | ||||
|             elif pkg.endswith("_pu"): | ||||
|                 pkg = pkg[:-3] | ||||
|                 if pkg not in self.sources['pu']: continue | ||||
|                 if apt_pkg.VersionCompare(self.sources['pu'][pkg][VERSION], v) != 0: | ||||
|                     self.output_write(" Version mismatch, %s %s != %s\n" % (pkg, v, self.sources['pu'][pkg][VERSION])) | ||||
|             # handle *-proposed-updates | ||||
|             elif pkg.endswith("_tpu") or pkg.endswith("_pu"): | ||||
|                 pkg, suite = pkg.rsplit("_") | ||||
|                 if pkg not in self.sources[suite]: continue | ||||
|                 if apt_pkg.VersionCompare(self.sources[suite][pkg][VERSION], v) != 0: | ||||
|                     self.output_write(" Version mismatch, %s %s != %s\n" % (pkg, v, self.sources[suite][pkg][VERSION])) | ||||
|                     ok = False | ||||
|             # does the package exist in unstable? | ||||
|             elif pkg not in self.sources['unstable']: | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user