From 86ba4c99ca0529d143d1bee0d40150227e172af2 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Tue, 6 Dec 2011 23:37:25 +0200 Subject: [PATCH] move --no-lp options into their own group --- syncpackage | 83 ++++++++++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 39 deletions(-) diff --git a/syncpackage b/syncpackage index 51d7b77..f4f4175 100755 --- a/syncpackage +++ b/syncpackage @@ -494,6 +494,10 @@ def parse(): parser.add_option("-c", "--component", dest="component", default=None, help="Specify the Debian component to sync from.") + parser.add_option("-b", "--bug", metavar="BUG", + dest="bugs", action="append", default=list(), + help="Mark Launchpad bug BUG as being fixed by this " + "upload.") parser.add_option("-v", "--verbose", dest="verbose", action="store_true", default=False, help="Display more progress information.") @@ -501,54 +505,55 @@ def parse(): dest="fakesync", action="store_true", default=False, help="Perform a fakesync (a sync where Debian and Ubuntu " "have a .orig.tar mismatch).") - parser.add_option("--no-lp", - dest="lp", action="store_false", default=True, - help="Construct sync locally rather than letting " - "Launchpad copy the package directly (not " - "recommended).") + parser.add_option("-f", "--force", + dest="force", action="store_true", default=False, + help="Force sync over the top of Ubuntu changes.") + parser.add_option('--no-conf', + dest='no_conf', default=False, action='store_true', + help="Don't read config files or environment variables.") parser.add_option('-l', '--lpinstance', metavar='INSTANCE', dest='lpinstance', default=None, help='Launchpad instance to connect to ' '(default: production).') - parser.add_option("-n", "--uploader-name", - dest="uploader_name", default=None, - help="Use UPLOADER_NAME as the name of the maintainer " - "for this upload.") - parser.add_option("-e", "--uploader-email", - dest="uploader_email", default=None, - help="Use UPLOADER_EMAIL as email address of the " - "maintainer for this upload.") - parser.add_option("-k", "--key", - dest="keyid", default=None, - help="Specify the key ID to be used for signing.") - parser.add_option('--dont-sign', - dest='keyid', action='store_false', - help='Do not sign the upload.') - parser.add_option("-b", "--bug", metavar="BUG", - dest="bugs", action="append", default=list(), - help="Mark Launchpad bug BUG as being fixed by this " - "upload.") - parser.add_option("-f", "--force", - dest="force", action="store_true", default=False, - help="Force sync over the top of Ubuntu changes.") - parser.add_option('-D', '--debian-mirror', metavar='DEBIAN_MIRROR', - dest='debian_mirror', - help='Preferred Debian mirror ' - '(default: %s)' - % UDTConfig.defaults['DEBIAN_MIRROR']) - parser.add_option('-U', '--ubuntu-mirror', metavar='UBUNTU_MIRROR', - dest='ubuntu_mirror', - help='Preferred Ubuntu mirror ' - '(default: %s)' - % UDTConfig.defaults['UBUNTU_MIRROR']) - parser.add_option('--no-conf', - dest='no_conf', default=False, action='store_true', - help="Don't read config files or environment variables.") parser.add_option('--simulate', dest='simulate', default=False, action='store_true', help="Show what would be done, but don't actually do " "it.") + no_lp = optparse.OptionGroup(parser, "Local sync preperation options", + "Options that only apply when using --no-lp. " + "WARNING: The use of --no-lp is not recommended for uploads " + "targetted at Ubuntu. The archive-admins discourage its use.") + no_lp.add_option("--no-lp", + dest="lp", action="store_false", default=True, + help="Construct sync locally rather than letting " + "Launchpad copy the package directly") + no_lp.add_option("-n", "--uploader-name", + dest="uploader_name", default=None, + help="Use UPLOADER_NAME as the name of the maintainer " + "for this upload.") + no_lp.add_option("-e", "--uploader-email", + dest="uploader_email", default=None, + help="Use UPLOADER_EMAIL as email address of the " + "maintainer for this upload.") + no_lp.add_option("-k", "--key", + dest="keyid", default=None, + help="Specify the key ID to be used for signing.") + no_lp.add_option('--dont-sign', + dest='keyid', action='store_false', + help='Do not sign the upload.') + no_lp.add_option('-D', '--debian-mirror', metavar='DEBIAN_MIRROR', + dest='debian_mirror', + help='Preferred Debian mirror ' + '(default: %s)' + % UDTConfig.defaults['DEBIAN_MIRROR']) + no_lp.add_option('-U', '--ubuntu-mirror', metavar='UBUNTU_MIRROR', + dest='ubuntu_mirror', + help='Preferred Ubuntu mirror ' + '(default: %s)' + % UDTConfig.defaults['UBUNTU_MIRROR']) + parser.add_option_group(no_lp) + (options, args) = parser.parse_args() if options.fakesync: