mirror of
				https://git.launchpad.net/ubuntu-dev-tools
				synced 2025-10-31 22:14:03 +00:00 
			
		
		
		
	backportpackage: Check that dput is installed when uploading (LP: #1086342)
This commit is contained in:
		
							parent
							
								
									d9763747d3
								
							
						
					
					
						commit
						5f3e359ab6
					
				| @ -51,6 +51,17 @@ def check_call(cmd, *args, **kwargs): | ||||
|     if ret != 0: | ||||
|         error('%s returned %d.' % (cmd[0], ret)) | ||||
| 
 | ||||
| 
 | ||||
| def check_program_exists(name, package=None): | ||||
|     paths = set(os.environ['PATH'].split(':')) | ||||
|     paths |= set(('/sbin', '/usr/sbin', '/usr/local/sbin')) | ||||
|     if not any(os.path.exists(os.path.join(p, name)) for p in paths): | ||||
|         Logger.error('Could not find "%s". Please install the package "%s" ' | ||||
|                      'to use this functionality.', | ||||
|                      name, package or name) | ||||
|         sys.exit(1) | ||||
| 
 | ||||
| 
 | ||||
| def parse(args): | ||||
|     usage = 'Usage: %prog [options] <source package name or .dsc URL/file>' | ||||
|     parser = optparse.OptionParser(usage) | ||||
| @ -145,6 +156,8 @@ def parse(args): | ||||
|         parser.error('Please specify either a working dir or an upload target!') | ||||
|     if opts.upload and opts.upload.startswith('ppa:'): | ||||
|         opts.release_pocket = True | ||||
|     if opts.upload: | ||||
|         check_program_exists('dput') | ||||
| 
 | ||||
|     return opts, args, config | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										5
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								debian/changelog
									
									
									
									
										vendored
									
									
								
							| @ -15,7 +15,10 @@ ubuntu-dev-tools (0.146) UNRELEASED; urgency=low | ||||
|   [ Stefano Rivera ] | ||||
|   * pbuilder-dist: Build with -proposed enabled for Ubuntu dev releases. | ||||
|     Thanks Scott Kitterman (LP: #1082452) | ||||
|   * backportpackage: Don't ignore -k (LP: #1083688) | ||||
|   * backportpackage: | ||||
|     - Don't ignore -k (LP: #1083688) | ||||
|     - Check that dput is installed when uploading, thanks H.-Dirk Schmitt | ||||
|       (LP: #1086342) | ||||
| 
 | ||||
|  -- Julian Taylor <jtaylor@ubuntu.com>  Sat, 24 Nov 2012 21:07:01 +0100 | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user