From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4B44C139085 for ; Sat, 24 Dec 2016 09:13:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B536B2340E6; Sat, 24 Dec 2016 09:13:25 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7DF232340E6 for ; Sat, 24 Dec 2016 09:13:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 85A01341375 for ; Sat, 24 Dec 2016 09:13:20 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B8B9A24F5 for ; Sat, 24 Dec 2016 09:13:16 +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: <1482555255.05ec1dd9a237b624354bce496b93aa6b98f63ef2.dolsen@gentoo> Subject: [gentoo-commits] proj/gentoo-keys:gsoc-2016 commit in: gkeys/gkeys/ X-VCS-Repository: proj/gentoo-keys X-VCS-Files: gkeys/gkeys/action_map.py gkeys/gkeys/actions.py X-VCS-Directories: gkeys/gkeys/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 05ec1dd9a237b624354bce496b93aa6b98f63ef2 X-VCS-Branch: gsoc-2016 Date: Sat, 24 Dec 2016 09:13:16 +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: f7f20db5-b8e3-4d3f-8710-db9485937590 X-Archives-Hash: 68842146ab5cffe07a71c0f2dcbfc75c commit: 05ec1dd9a237b624354bce496b93aa6b98f63ef2 Author: aeroniero33 gmail com> AuthorDate: Thu Jun 9 22:44:16 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Sat Dec 24 04:54:15 2016 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-keys.git/commit/?id=05ec1dd9 Created the update-seed function gkeys/gkeys/action_map.py | 19 ++++++++++++++++++- gkeys/gkeys/actions.py | 14 +++++++++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/gkeys/gkeys/action_map.py b/gkeys/gkeys/action_map.py index f372a5c..1bd0625 100644 --- a/gkeys/gkeys/action_map.py +++ b/gkeys/gkeys/action_map.py @@ -15,7 +15,8 @@ from collections import OrderedDict Seed_Actions = ['----seeds----', 'add-seed', 'fetch-seed', - 'list-seed', 'list-seedfiles', 'move-seed', 'remove-seed'] + 'update-seed', 'list-seed', 'list-seedfiles', 'move-seed', + 'remove-seed'] Key_Actions = ['----keys-----', 'check-key', 'installed', 'install-key', 'list-key', 'send-key', 'refresh-key', 'remove-key', @@ -380,6 +381,22 @@ Found Failures: Fetch operation completed ''', }), + ('update-seed', { + 'func': 'updateseed', + 'options': ['category', 'nick', '1file', 'dest', 'signature', + 'timestamp'], + 'desc': '''Update the selected seed file(s)''', + 'long_desc': '''Update the selected seed file(s)''', + 'example': '''$ gkeys update-seed -C gentoo-devs + + Gkey task results: + Verification succeeded.: /home/brian/gpg-test/seeds/gentoo-devs.seeds + Key info...............: Gentoo-Linux Gentoo-keys Project Signing Key , 0xA41DBBD9151C3FC7 + category, nick.....: gentoo gkeys + + Update operation completed +''', + }), ('list-seed', { 'func': 'listseed', 'options': ['category', 'nick', 'name', 'fingerprint', 'keys', diff --git a/gkeys/gkeys/actions.py b/gkeys/gkeys/actions.py index 3070eb3..c218d8d 100644 --- a/gkeys/gkeys/actions.py +++ b/gkeys/gkeys/actions.py @@ -96,7 +96,19 @@ class Actions(ActionBase): messages.append("") messages.append("Fetch operation completed") return (False not in success, messages) - + + def updateseed(self, args): + '''Updates seeds of a selected file''' + self.logger.debug(_unicode("ACTIONS: updateseed; args: %s") + % _unicode(args)) + fetch_success, fetch_messages = self.fetchseed(args) + if fetch_success is not True: + return (False, fetch_messages) + install_success, install_messages = self.installkey(args) + if install_success is not True: + return (False, install_messages) + messages = fetch_messages + [install_messages] + return (True, messages) def addseed(self, args): '''Add or replace a key in the selected seed file'''