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 9CFFA1387B1 for ; Mon, 21 Sep 2015 23:51:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CE4DB21C04A; Mon, 21 Sep 2015 23:51:27 +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 EBAB021C04B for ; Mon, 21 Sep 2015 23:51:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4AFBE34099A for ; Mon, 21 Sep 2015 23:51:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E120D251 for ; Mon, 21 Sep 2015 23:51:19 +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: <1442878967.3769fd0b8cfa080197cf154b2742bc2d7895ae15.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/repoman/ X-VCS-Repository: proj/portage X-VCS-Files: pym/repoman/actions.py X-VCS-Directories: pym/repoman/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 3769fd0b8cfa080197cf154b2742bc2d7895ae15 X-VCS-Branch: master Date: Mon, 21 Sep 2015 23:51:19 +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: e86e5802-5baf-4338-8c1a-3d7cde0724e2 X-Archives-Hash: 569b02974f597ca962f95ff19394fca1 Message-ID: <20150921235119.Iwg3ouCIVgX1puvqVqikqzRNL42s48nOXRKWSpIuw-A@z> commit: 3769fd0b8cfa080197cf154b2742bc2d7895ae15 Author: Brian Dolbec gentoo org> AuthorDate: Sat Sep 19 04:27:19 2015 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Mon Sep 21 23:42:47 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=3769fd0b repoamn/actions.py: Split out sign_manifest() pym/repoman/actions.py | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/pym/repoman/actions.py b/pym/repoman/actions.py index 5b55ff8..4f516da 100644 --- a/pym/repoman/actions.py +++ b/pym/repoman/actions.py @@ -186,19 +186,7 @@ class Actions(object): digestgen(mysettings=self.repoman_settings, myportdb=self.repo_settings.portdb) if self.repo_settings.sign_manifests: - try: - for x in sorted(vcs_files_to_cps( - chain(myupdates, myremoved, mymanifests), - self.scanner.repolevel, self.scanner.reposplit, self.scanner.categories)): - self.repoman_settings["O"] = os.path.join(self.repo_settings.repodir, x) - manifest_path = os.path.join(self.repoman_settings["O"], "Manifest") - if not need_signature(manifest_path): - continue - gpgsign(manifest_path, self.repoman_settings, self.options) - except portage.exception.PortageException as e: - portage.writemsg("!!! %s\n" % str(e)) - portage.writemsg("!!! Disabled FEATURES='sign'\n") - self.repo_settings.sign_manifests = False + self.sign_manifests(myupdates, myremoved, mymanifests) if self.vcs_settings.vcs == 'git': # It's not safe to use the git commit -a option since there might @@ -821,3 +809,20 @@ class Actions(object): modified = True if modified: portage.util.write_atomic(x, b''.join(mylines), mode='wb') + + + def sign_manifest(self, myupdates, myremoved, mymanifests): + try: + for x in sorted(vcs_files_to_cps( + chain(myupdates, myremoved, mymanifests), + self.scanner.repolevel, self.scanner.reposplit, self.scanner.categories)): + self.repoman_settings["O"] = os.path.join(self.repo_settings.repodir, x) + manifest_path = os.path.join(self.repoman_settings["O"], "Manifest") + if not need_signature(manifest_path): + continue + gpgsign(manifest_path, self.repoman_settings, self.options) + except portage.exception.PortageException as e: + portage.writemsg("!!! %s\n" % str(e)) + portage.writemsg("!!! Disabled FEATURES='sign'\n") + self.repo_settings.sign_manifests = False +