mirror of
				https://git.launchpad.net/ubuntu-dev-tools
				synced 2025-11-03 23:44:19 +00:00 
			
		
		
		
	Remove unecessary optparse clutter
This commit is contained in:
		
							parent
							
								
									86ba4c99ca
								
							
						
					
					
						commit
						857778b922
					
				
							
								
								
									
										26
									
								
								syncpackage
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								syncpackage
									
									
									
									
									
								
							@ -483,40 +483,35 @@ def parse():
 | 
				
			|||||||
    parser = optparse.OptionParser(usage=usage, epilog=epilog)
 | 
					    parser = optparse.OptionParser(usage=usage, epilog=epilog)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    parser.add_option("-d", "--distribution",
 | 
					    parser.add_option("-d", "--distribution",
 | 
				
			||||||
                      dest="dist", default=None,
 | 
					 | 
				
			||||||
                      help="Debian distribution to sync from.")
 | 
					                      help="Debian distribution to sync from.")
 | 
				
			||||||
    parser.add_option("-r", "--release",
 | 
					    parser.add_option("-r", "--release",
 | 
				
			||||||
                      dest="release", default=None,
 | 
					 | 
				
			||||||
                      help="Specify target Ubuntu release.")
 | 
					                      help="Specify target Ubuntu release.")
 | 
				
			||||||
    parser.add_option("-V", "--debian-version",
 | 
					    parser.add_option("-V", "--debian-version",
 | 
				
			||||||
                      dest="debversion", default=None,
 | 
					 | 
				
			||||||
                      help="Specify the version to sync from.")
 | 
					                      help="Specify the version to sync from.")
 | 
				
			||||||
    parser.add_option("-c", "--component",
 | 
					    parser.add_option("-c", "--component",
 | 
				
			||||||
                      dest="component", default=None,
 | 
					 | 
				
			||||||
                      help="Specify the Debian component to sync from.")
 | 
					                      help="Specify the Debian component to sync from.")
 | 
				
			||||||
    parser.add_option("-b", "--bug", metavar="BUG",
 | 
					    parser.add_option("-b", "--bug", metavar="BUG",
 | 
				
			||||||
                      dest="bugs", action="append", default=list(),
 | 
					                      dest="bugs", action="append", default=list(),
 | 
				
			||||||
                      help="Mark Launchpad bug BUG as being fixed by this "
 | 
					                      help="Mark Launchpad bug BUG as being fixed by this "
 | 
				
			||||||
                           "upload.")
 | 
					                           "upload.")
 | 
				
			||||||
    parser.add_option("-v", "--verbose",
 | 
					    parser.add_option("-v", "--verbose",
 | 
				
			||||||
                      dest="verbose", action="store_true", default=False,
 | 
					                      action="store_true", default=False,
 | 
				
			||||||
                      help="Display more progress information.")
 | 
					                      help="Display more progress information.")
 | 
				
			||||||
    parser.add_option("-F", "--fakesync",
 | 
					    parser.add_option("-F", "--fakesync",
 | 
				
			||||||
                      dest="fakesync", action="store_true", default=False,
 | 
					                      action="store_true", default=False,
 | 
				
			||||||
                      help="Perform a fakesync (a sync where Debian and Ubuntu "
 | 
					                      help="Perform a fakesync (a sync where Debian and Ubuntu "
 | 
				
			||||||
                           "have a .orig.tar mismatch).")
 | 
					                           "have a .orig.tar mismatch).")
 | 
				
			||||||
    parser.add_option("-f", "--force",
 | 
					    parser.add_option("-f", "--force",
 | 
				
			||||||
                      dest="force", action="store_true", default=False,
 | 
					                      action="store_true", default=False,
 | 
				
			||||||
                      help="Force sync over the top of Ubuntu changes.")
 | 
					                      help="Force sync over the top of Ubuntu changes.")
 | 
				
			||||||
    parser.add_option('--no-conf',
 | 
					    parser.add_option('--no-conf',
 | 
				
			||||||
                      dest='no_conf', default=False, action='store_true',
 | 
					                      default=False, action='store_true',
 | 
				
			||||||
                      help="Don't read config files or environment variables.")
 | 
					                      help="Don't read config files or environment variables.")
 | 
				
			||||||
    parser.add_option('-l', '--lpinstance', metavar='INSTANCE',
 | 
					    parser.add_option('-l', '--lpinstance', metavar='INSTANCE',
 | 
				
			||||||
                      dest='lpinstance', default=None,
 | 
					 | 
				
			||||||
                      help='Launchpad instance to connect to '
 | 
					                      help='Launchpad instance to connect to '
 | 
				
			||||||
                           '(default: production).')
 | 
					                           '(default: production).')
 | 
				
			||||||
    parser.add_option('--simulate',
 | 
					    parser.add_option('--simulate',
 | 
				
			||||||
                      dest='simulate', default=False, action='store_true',
 | 
					                      default=False, action='store_true',
 | 
				
			||||||
                      help="Show what would be done, but don't actually do "
 | 
					                      help="Show what would be done, but don't actually do "
 | 
				
			||||||
                           "it.")
 | 
					                           "it.")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -529,26 +524,22 @@ def parse():
 | 
				
			|||||||
                     help="Construct sync locally rather than letting "
 | 
					                     help="Construct sync locally rather than letting "
 | 
				
			||||||
                          "Launchpad copy the package directly")
 | 
					                          "Launchpad copy the package directly")
 | 
				
			||||||
    no_lp.add_option("-n", "--uploader-name",
 | 
					    no_lp.add_option("-n", "--uploader-name",
 | 
				
			||||||
                     dest="uploader_name", default=None,
 | 
					 | 
				
			||||||
                     help="Use UPLOADER_NAME as the name of the maintainer "
 | 
					                     help="Use UPLOADER_NAME as the name of the maintainer "
 | 
				
			||||||
                          "for this upload.")
 | 
					                          "for this upload.")
 | 
				
			||||||
    no_lp.add_option("-e", "--uploader-email",
 | 
					    no_lp.add_option("-e", "--uploader-email",
 | 
				
			||||||
                     dest="uploader_email", default=None,
 | 
					 | 
				
			||||||
                     help="Use UPLOADER_EMAIL as email address of the "
 | 
					                     help="Use UPLOADER_EMAIL as email address of the "
 | 
				
			||||||
                          "maintainer for this upload.")
 | 
					                          "maintainer for this upload.")
 | 
				
			||||||
    no_lp.add_option("-k", "--key",
 | 
					    no_lp.add_option("-k", "--key",
 | 
				
			||||||
                     dest="keyid", default=None,
 | 
					                     dest="keyid",
 | 
				
			||||||
                     help="Specify the key ID to be used for signing.")
 | 
					                     help="Specify the key ID to be used for signing.")
 | 
				
			||||||
    no_lp.add_option('--dont-sign',
 | 
					    no_lp.add_option('--dont-sign',
 | 
				
			||||||
                     dest='keyid', action='store_false',
 | 
					                     dest='keyid', action='store_false',
 | 
				
			||||||
                     help='Do not sign the upload.')
 | 
					                     help='Do not sign the upload.')
 | 
				
			||||||
    no_lp.add_option('-D', '--debian-mirror', metavar='DEBIAN_MIRROR',
 | 
					    no_lp.add_option('-D', '--debian-mirror', metavar='DEBIAN_MIRROR',
 | 
				
			||||||
                     dest='debian_mirror',
 | 
					 | 
				
			||||||
                     help='Preferred Debian mirror '
 | 
					                     help='Preferred Debian mirror '
 | 
				
			||||||
                          '(default: %s)'
 | 
					                          '(default: %s)'
 | 
				
			||||||
                          % UDTConfig.defaults['DEBIAN_MIRROR'])
 | 
					                          % UDTConfig.defaults['DEBIAN_MIRROR'])
 | 
				
			||||||
    no_lp.add_option('-U', '--ubuntu-mirror', metavar='UBUNTU_MIRROR',
 | 
					    no_lp.add_option('-U', '--ubuntu-mirror', metavar='UBUNTU_MIRROR',
 | 
				
			||||||
                     dest='ubuntu_mirror',
 | 
					 | 
				
			||||||
                     help='Preferred Ubuntu mirror '
 | 
					                     help='Preferred Ubuntu mirror '
 | 
				
			||||||
                          '(default: %s)'
 | 
					                          '(default: %s)'
 | 
				
			||||||
                          % UDTConfig.defaults['UBUNTU_MIRROR'])
 | 
					                          % UDTConfig.defaults['UBUNTU_MIRROR'])
 | 
				
			||||||
@ -616,7 +607,8 @@ def main():
 | 
				
			|||||||
        ubuntu = Launchpad.distributions["ubuntu"]
 | 
					        ubuntu = Launchpad.distributions["ubuntu"]
 | 
				
			||||||
        options.release = ubuntu.current_series.name
 | 
					        options.release = ubuntu.current_series.name
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    src_pkg = fetch_source_pkg(package, options.dist, options.debversion,
 | 
					    src_pkg = fetch_source_pkg(package, options.distribution,
 | 
				
			||||||
 | 
					                               options.debian_version,
 | 
				
			||||||
                               options.component, options.release.split("-")[0],
 | 
					                               options.component, options.release.split("-")[0],
 | 
				
			||||||
                               options.debian_mirror)
 | 
					                               options.debian_mirror)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -662,7 +654,7 @@ def main():
 | 
				
			|||||||
             options.force)
 | 
					             options.force)
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        os.environ['DEB_VENDOR'] = 'Ubuntu'
 | 
					        os.environ['DEB_VENDOR'] = 'Ubuntu'
 | 
				
			||||||
        sync_dsc(src_pkg, options.dist, options.release, options.uploader_name,
 | 
					        sync_dsc(src_pkg, options.distribution, options.release, options.uploader_name,
 | 
				
			||||||
                 options.uploader_email, options.bugs, options.ubuntu_mirror,
 | 
					                 options.uploader_email, options.bugs, options.ubuntu_mirror,
 | 
				
			||||||
                 options.keyid, options.simulate, options.force,
 | 
					                 options.keyid, options.simulate, options.force,
 | 
				
			||||||
                 options.fakesync)
 | 
					                 options.fakesync)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user