From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id BF38313877A for ; Mon, 16 Jun 2014 03:37:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DF80CE0B70; Mon, 16 Jun 2014 03:37:30 +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 E8574E0B63 for ; Mon, 16 Jun 2014 03:37:29 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [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 C38FD33FDD1 for ; Mon, 16 Jun 2014 03:37:28 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 8B503187DE for ; Mon, 16 Jun 2014 03:37:27 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1402607509.e66be21d91f4f5264e1933a03271c4eca5f14d31.dol-sen@gentoo> Subject: [gentoo-commits] proj/layman:gsoc2014 commit in: layman/ X-VCS-Repository: proj/layman X-VCS-Files: layman/argsparser.py layman/cli.py X-VCS-Directories: layman/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: e66be21d91f4f5264e1933a03271c4eca5f14d31 X-VCS-Branch: gsoc2014 Date: Mon, 16 Jun 2014 03:37:27 +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: 14b357bd-59a1-41c8-ae7b-df0c1f7c98bc X-Archives-Hash: 309dbab01148488426799893090c96be commit: e66be21d91f4f5264e1933a03271c4eca5f14d31 Author: Devan Franchini gentoo org> AuthorDate: Thu May 29 07:32:48 2014 +0000 Commit: Brian Dolbec gmail com> CommitDate: Thu Jun 12 21:11:49 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=e66be21d {argsparser, cli}.py: adds --readd cli option --- layman/argsparser.py | 11 +++++++++-- layman/cli.py | 18 +++++++++++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/layman/argsparser.py b/layman/argsparser.py index aa1cde3..f868cca 100644 --- a/layman/argsparser.py +++ b/layman/argsparser.py @@ -40,9 +40,9 @@ from layman.version import VERSION _USAGE = """ - layman (-a|-d|-s|-i) (OVERLAY|ALL) + layman (-a|-d|-r|-s|-i) (OVERLAY|ALL) # it also supports multiple actions - layman (-a|-d|-s|-i) (OVERLAY|ALL) [ [(-a|-d|-s|-i) (OVERLAY)] ...] + layman (-a|-d|-r|-s|-i) (OVERLAY|ALL) [ [(-a|-d|-r|-s|-i) (OVERLAY)] ...] layman -f [-o URL] layman (-l|-L|-S)""" @@ -144,6 +144,13 @@ class ArgsParser(BareConfig): 'ing order of the overlays in the PORTDIR_OVERLAY varia' 'ble.') + actions.add_argument('-r', + '--readd', + action = 'append', + help = 'Remove and re-add the given overlay from the cached' + ' remote list to your locally installed overlays... Specify' + ' "ALL" to re-add all local overlays.') + actions.add_argument('-s', '--sync', action = 'append', diff --git a/layman/cli.py b/layman/cli.py index 159b413..f0dc181 100644 --- a/layman/cli.py +++ b/layman/cli.py @@ -134,7 +134,6 @@ class Main(object): def __init__(self, config): self.config = config - #print "config.keys()", config.keys() self.output = config['output'] self.api = LaymanAPI(config, report_errors=False, @@ -145,6 +144,7 @@ class Main(object): ('sync', 'Sync'), ('info', 'Info'), ('sync_all', 'Sync'), + ('readd', 'Readd'), ('delete', 'Delete'), ('list', 'ListRemote'), ('list_local', 'ListLocal'),] @@ -251,6 +251,22 @@ class Main(object): return result + def Readd(self): + '''Readds the selected overlay(s). + ''' + self.output.info('Reinstalling overlay(s),...', 2) + selection = decode_selection(self.config['readd']) + if ALL_KEYWORD in selection: + selection = self.api.get_installed() + self.output.debug('Reinstalling selected overlay(s)', 6) + result = self.api.readd_repos(selection, update_news=True) + if result: + self.output.info('Successfully reinstalled overlay(s) ' + + ', '.join((x.decode('UTF-8') if isinstance(x, bytes) else x) for x in selection) + + '.', 2) + self.output.notice('') + return result + def Sync(self): ''' Syncs the selected overlays. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id EBD9E1391DB for ; Mon, 16 Jun 2014 03:40:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 701BDE0B20; Mon, 16 Jun 2014 03:40:20 +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 8D728E0B1D for ; Mon, 16 Jun 2014 03:40:19 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [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 928A733F7D6 for ; Mon, 16 Jun 2014 03:40:18 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 46AA5187DE for ; Mon, 16 Jun 2014 03:40:17 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1402607509.e66be21d91f4f5264e1933a03271c4eca5f14d31.dol-sen@gentoo> Subject: [gentoo-commits] proj/layman:master commit in: layman/ X-VCS-Repository: proj/layman X-VCS-Files: layman/argsparser.py layman/cli.py X-VCS-Directories: layman/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: e66be21d91f4f5264e1933a03271c4eca5f14d31 X-VCS-Branch: master Date: Mon, 16 Jun 2014 03:40:17 +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: 5e5f2062-bb72-4b48-8c9a-299d036e1ecd X-Archives-Hash: 1f7c246a02b8930b132df094d9c1ebee Message-ID: <20140616034017.Qc3-TrrIr0Rbtn-mI1AH9GkAI141jVQIT7YyO6PMQak@z> commit: e66be21d91f4f5264e1933a03271c4eca5f14d31 Author: Devan Franchini gentoo org> AuthorDate: Thu May 29 07:32:48 2014 +0000 Commit: Brian Dolbec gmail com> CommitDate: Thu Jun 12 21:11:49 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=e66be21d {argsparser, cli}.py: adds --readd cli option --- layman/argsparser.py | 11 +++++++++-- layman/cli.py | 18 +++++++++++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/layman/argsparser.py b/layman/argsparser.py index aa1cde3..f868cca 100644 --- a/layman/argsparser.py +++ b/layman/argsparser.py @@ -40,9 +40,9 @@ from layman.version import VERSION _USAGE = """ - layman (-a|-d|-s|-i) (OVERLAY|ALL) + layman (-a|-d|-r|-s|-i) (OVERLAY|ALL) # it also supports multiple actions - layman (-a|-d|-s|-i) (OVERLAY|ALL) [ [(-a|-d|-s|-i) (OVERLAY)] ...] + layman (-a|-d|-r|-s|-i) (OVERLAY|ALL) [ [(-a|-d|-r|-s|-i) (OVERLAY)] ...] layman -f [-o URL] layman (-l|-L|-S)""" @@ -144,6 +144,13 @@ class ArgsParser(BareConfig): 'ing order of the overlays in the PORTDIR_OVERLAY varia' 'ble.') + actions.add_argument('-r', + '--readd', + action = 'append', + help = 'Remove and re-add the given overlay from the cached' + ' remote list to your locally installed overlays... Specify' + ' "ALL" to re-add all local overlays.') + actions.add_argument('-s', '--sync', action = 'append', diff --git a/layman/cli.py b/layman/cli.py index 159b413..f0dc181 100644 --- a/layman/cli.py +++ b/layman/cli.py @@ -134,7 +134,6 @@ class Main(object): def __init__(self, config): self.config = config - #print "config.keys()", config.keys() self.output = config['output'] self.api = LaymanAPI(config, report_errors=False, @@ -145,6 +144,7 @@ class Main(object): ('sync', 'Sync'), ('info', 'Info'), ('sync_all', 'Sync'), + ('readd', 'Readd'), ('delete', 'Delete'), ('list', 'ListRemote'), ('list_local', 'ListLocal'),] @@ -251,6 +251,22 @@ class Main(object): return result + def Readd(self): + '''Readds the selected overlay(s). + ''' + self.output.info('Reinstalling overlay(s),...', 2) + selection = decode_selection(self.config['readd']) + if ALL_KEYWORD in selection: + selection = self.api.get_installed() + self.output.debug('Reinstalling selected overlay(s)', 6) + result = self.api.readd_repos(selection, update_news=True) + if result: + self.output.info('Successfully reinstalled overlay(s) ' + + ', '.join((x.decode('UTF-8') if isinstance(x, bytes) else x) for x in selection) + + '.', 2) + self.output.notice('') + return result + def Sync(self): ''' Syncs the selected overlays.