mirror of
				https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
				synced 2025-10-31 16:44:13 +00:00 
			
		
		
		
	MigrationItem: canonicalise item names on output
Although multiple formats of item name are accepted (e.g. $pkg_$suite/$arch and $pkg/$arch_$suite), for compatibility and ease of parsing by clients the output format is standardised. Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
This commit is contained in:
		
							parent
							
								
									e44b038ed7
								
							
						
					
					
						commit
						debd6a7229
					
				| @ -78,14 +78,17 @@ class MigrationItem: | |||||||
|         if self.is_removal: |         if self.is_removal: | ||||||
|             self._suite = 'testing' |             self._suite = 'testing' | ||||||
| 	     | 	     | ||||||
|         if self._versionned: |         parts = self._name.split('/', 3) | ||||||
|             parts = self._name.split('/', 3) |         if len(parts) == 1 or self._architecture == 'source': | ||||||
|             if len(parts) == 1 or self._architecture == 'source': |             self._uvname = self._package | ||||||
|                 self._uvname = parts[0] |  | ||||||
|             else: |  | ||||||
|                 self._uvname = "%s/%s" % (parts[0], parts[1]) |  | ||||||
|         else: |         else: | ||||||
|             self._uvname = self._name |             self._uvname = "%s/%s" % (self._package, self._architecture) | ||||||
|  |         if self._suite not in ('testing', 'unstable'): | ||||||
|  |             self._uvname = '%s_%s' % (self._uvname, self._suite) | ||||||
|  |         if self._versionned: | ||||||
|  |             self._name = '%s/%s' % (self._uvname, self._version) | ||||||
|  |         else: | ||||||
|  |             self._name = self._uvname | ||||||
| 
 | 
 | ||||||
|     name = property(_get_name, _set_name) |     name = property(_get_name, _set_name) | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user