mirror of
				https://git.launchpad.net/ubuntu-dev-tools
				synced 2025-10-30 21:44:14 +00:00 
			
		
		
		
	submittodebian: Revert Ubuntu Maintainer mangling, and re-build the source
package before diffing. (LP: #902233)
This commit is contained in:
		
							parent
							
								
									d692d7b79b
								
							
						
					
					
						commit
						055dce8f40
					
				
							
								
								
									
										2
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							| @ -20,6 +20,8 @@ ubuntu-dev-tools (0.142) UNRELEASED; urgency=low | |||||||
|     (LP: #888736) |     (LP: #888736) | ||||||
|   * backportpackage: Allow unsigned backports (LP: #992739) |   * backportpackage: Allow unsigned backports (LP: #992739) | ||||||
|   * update-maintainer: Add a function to restore the original maintainer. |   * update-maintainer: Add a function to restore the original maintainer. | ||||||
|  |   * submittodebian: Revert Ubuntu Maintainer mangling, and re-build the source | ||||||
|  |     package before diffing. (LP: #902233) | ||||||
| 
 | 
 | ||||||
|  -- Stefano Rivera <stefanor@debian.org>  Wed, 25 Apr 2012 17:38:58 +0200 |  -- Stefano Rivera <stefanor@debian.org>  Wed, 25 Apr 2012 17:38:58 +0200 | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -34,6 +34,7 @@ from distro_info import UbuntuDistroInfo, DistroDataOutdated | |||||||
| from ubuntutools.config import ubu_email | from ubuntutools.config import ubu_email | ||||||
| from ubuntutools.question import YesNoQuestion, EditFile | from ubuntutools.question import YesNoQuestion, EditFile | ||||||
| from ubuntutools.subprocess import call, check_call, Popen, PIPE | from ubuntutools.subprocess import call, check_call, Popen, PIPE | ||||||
|  | from ubuntutools.update_maintainer import update_maintainer, restore_maintainer | ||||||
| 
 | 
 | ||||||
| try: | try: | ||||||
|     from debian.changelog import Changelog |     from debian.changelog import Changelog | ||||||
| @ -70,6 +71,13 @@ Thanks for considering the patch. | |||||||
| """ % ("\n".join([a for a in entry.changes()])) | """ % ("\n".join([a for a in entry.changes()])) | ||||||
|     return msg |     return msg | ||||||
| 
 | 
 | ||||||
|  | def build_source_package(): | ||||||
|  |     if os.path.isdir('.bzr'): | ||||||
|  |         cmd = ['bzr', 'bd', '-S', '--', '-uc', '-us', '-nc'] | ||||||
|  |     else: | ||||||
|  |         cmd = ['debuild', '-S', '-uc', '-us', '-nc'] | ||||||
|  |     check_call(cmd) | ||||||
|  | 
 | ||||||
| def gen_debdiff(tmpdir, changelog): | def gen_debdiff(tmpdir, changelog): | ||||||
|     pkg = changelog.package |     pkg = changelog.package | ||||||
| 
 | 
 | ||||||
| @ -213,8 +221,16 @@ def main(): | |||||||
|     fp.write(bug_body) |     fp.write(bug_body) | ||||||
|     fp.close() |     fp.close() | ||||||
| 
 | 
 | ||||||
|  |     restore_maintainer('debian') | ||||||
|  |     build_source_package() | ||||||
|  |     update_maintainer('debian') | ||||||
|  | 
 | ||||||
|     debdiff = gen_debdiff(tmpdir, changelog) |     debdiff = gen_debdiff(tmpdir, changelog) | ||||||
| 
 | 
 | ||||||
|  |     # Build again as the user probably doesn't expect the Maintainer to be | ||||||
|  |     # reverted in the most recent build | ||||||
|  |     build_source_package() | ||||||
|  | 
 | ||||||
|     EditFile(debdiff, 'debdiff').edit(optional=True) |     EditFile(debdiff, 'debdiff').edit(optional=True) | ||||||
| 
 | 
 | ||||||
|     submit_bugreport(body, debdiff, deb_version, changelog) |     submit_bugreport(body, debdiff, deb_version, changelog) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user