From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (unknown [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C379E1393E9 for ; Fri, 16 May 2014 00:58:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 39A85E0A0B; Fri, 16 May 2014 00:58:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6489FE0A10 for ; Fri, 16 May 2014 00:58:44 +0000 (UTC) Received: from spoonbill.gentoo.org (unknown [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 529F734005E for ; Fri, 16 May 2014 00:58:43 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id CC2311818D for ; Fri, 16 May 2014 00:58:41 +0000 (UTC) From: "Devan Franchini" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Devan Franchini" Message-ID: <1400201894.77d5a73e47657bc551fb98cf6332f7601439a47a.twitch153@gentoo> Subject: [gentoo-commits] proj/layman:gsoc2014 commit in: layman/ X-VCS-Repository: proj/layman X-VCS-Files: layman/argsparser.py X-VCS-Directories: layman/ X-VCS-Committer: twitch153 X-VCS-Committer-Name: Devan Franchini X-VCS-Revision: 77d5a73e47657bc551fb98cf6332f7601439a47a X-VCS-Branch: gsoc2014 Date: Fri, 16 May 2014 00:58:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 9c85844a-f3ff-45ec-bb29-bd6670389001 X-Archives-Hash: 76c595fbeb5ec83ddebe95db0f09fccf commit: 77d5a73e47657bc551fb98cf6332f7601439a47a Author: Devan Franchini gentoo org> AuthorDate: Thu May 15 19:58:36 2014 +0000 Commit: Devan Franchini gentoo org> CommitDate: Fri May 16 00:58:14 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=77d5a73e argsparser.py: Alphabetizes group arguments --- layman/argsparser.py | 114 +++++++++++++++++++++++++-------------------------- 1 file changed, 56 insertions(+), 58 deletions(-) diff --git a/layman/argsparser.py b/layman/argsparser.py index 6e5fee3..5b94530 100644 --- a/layman/argsparser.py +++ b/layman/argsparser.py @@ -79,16 +79,16 @@ class ArgsParser(BareConfig): self.parser = ArgumentParser( usage = _USAGE) - self.parser.add_argument('-V', - '--version', - action = 'version', - version = VERSION) - self.parser.add_argument('-H', '--setup_help', action = 'store_true', help = 'Print the NEW INSTALL help messages.') + self.parser.add_argument('-V', + '--version', + action = 'version', + version = VERSION) + #----------------------------------------------------------------- # Main Options @@ -107,11 +107,12 @@ class ArgsParser(BareConfig): help = 'Remove the given overlay from your locally inst' 'alled overlays. Specify "ALL" to remove all overlays.') - actions.add_argument('-s', - '--sync', - action = 'append', - help = 'Update the specified overlay. Use "ALL" as para' - 'meter to synchronize all overlays.') + actions.add_argument('-f', + '--fetch', + action = 'store_true', + help = 'Fetch a remote list of overlays. This option is' + ' deprecated. The fetch operation will be performed by ' + 'default when you run sync, sync-all, or list.') actions.add_argument('-i', '--info', @@ -119,11 +120,6 @@ class ArgsParser(BareConfig): help = 'Display information about the specified overlay' '.') - actions.add_argument('-S', - '--sync-all', - action = 'store_true', - help = 'Update all overlays.') - actions.add_argument('-L', '--list', action = 'store_true', @@ -134,13 +130,6 @@ class ArgsParser(BareConfig): action = 'store_true', help = 'List the locally installed overlays.') - actions.add_argument('-f', - '--fetch', - action = 'store_true', - help = 'Fetch a remote list of overlays. This option is' - ' deprecated. The fetch operation will be performed by ' - 'default when you run sync, sync-all, or list.') - actions.add_argument('-n', '--nofetch', action = 'store_true', @@ -154,18 +143,22 @@ class ArgsParser(BareConfig): 'ing order of the overlays in the PORTDIR_OVERLAY varia' 'ble.') + actions.add_argument('-s', + '--sync', + action = 'append', + help = 'Update the specified overlay. Use "ALL" as para' + 'meter to synchronize all overlays.') + + actions.add_argument('-S', + '--sync-all', + action = 'store_true', + help = 'Update all overlays.') + #----------------------------------------------------------------- # Additional Options path_opts = self.parser.add_argument_group('') - path_opts.add_argument('-C', - '--configdir', - action = 'store', - default = '/etc/layman', - help = 'Directory path to user for all layman configu' - 'ration information [default: /etc/layman].') - path_opts.add_argument('-c', '--config', action = 'store', @@ -174,7 +167,18 @@ class ArgsParser(BareConfig): help = 'Path to the config file [default: ' '%s].' % (self.defaults['config'] %self.defaults)) + path_opts.add_argument('-C', + '--configdir', + action = 'store', + default = '/etc/layman', + help = 'Directory path to user for all layman configu' + 'ration information [default: /etc/layman].') + path_opts.add_argument('-o', + '--overlays', + action = 'append', + help = 'The list of overlays [default: ' \ + + self.defaults['overlays'] + '].') path_opts.add_argument('-O', '--overlay_defs', @@ -184,22 +188,29 @@ class ArgsParser(BareConfig): help = 'Path to aditional overlay.xml files [default: ' '%s].' % (self.defaults['overlay_defs'] %self.defaults)) - path_opts.add_argument('-o', - '--overlays', - action = 'append', - help = 'The list of overlays [default: ' \ - + self.defaults['overlays'] + '].') - #----------------------------------------------------------------- # Output Options out_opts = self.parser.add_argument_group('') - out_opts.add_argument('-v', - '--verbose', + out_opts.add_argument('--debug-level', + action = 'store', + type = int, + help = 'A value between 0 and 10. 0 means no debugging ' + 'messages will be selected, 10 selects all debugging me' + 'ssages. Default is "4".') + + out_opts.add_argument('-k', + '--nocheck', action = 'store_true', - help = 'Increase the amount of output and describe the ' - 'overlays.') + help = 'Do not check overlay definitions and do not i' + 'ssue a warning if description or contact information' + ' are missing.') + + out_opts.add_argument('-N', + '--nocolor', + action = 'store_true', + help = 'Remove color codes from the layman output.') out_opts.add_argument('-q', '--quiet', @@ -211,11 +222,6 @@ class ArgsParser(BareConfig): 'xample if your overlay resides in subversion and the S' 'SL certificate of the server needs acceptance.') - out_opts.add_argument('-N', - '--nocolor', - action = 'store_true', - help = 'Remove color codes from the layman output.') - out_opts.add_argument('-Q', '--quietness', action = 'store', @@ -225,6 +231,12 @@ class ArgsParser(BareConfig): ' you set this below 2 the same warning as given for --' 'quiet applies!') + out_opts.add_argument('-v', + '--verbose', + action = 'store_true', + help = 'Increase the amount of output and describe the ' + 'overlays.') + out_opts.add_argument('-W', '--width', action = 'store', @@ -234,20 +246,6 @@ class ArgsParser(BareConfig): 'not required as layman is capable of detecting the ' 'available number of columns automatically.') - out_opts.add_argument('-k', - '--nocheck', - action = 'store_true', - help = 'Do not check overlay definitions and do not i' - 'ssue a warning if description or contact information' - ' are missing.') - - out_opts.add_argument('--debug-level', - action = 'store', - type = int, - help = 'A value between 0 and 10. 0 means no debugging ' - 'messages will be selected, 10 selects all debugging me' - 'ssages. Default is "4".') - #----------------------------------------------------------------- # Debug Options