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 A515E139BC8 for ; Sun, 20 Sep 2015 02:07:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3E13721C0BE; Sun, 20 Sep 2015 02:07:02 +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 7D73321C04A for ; Sun, 20 Sep 2015 02:07:00 +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 C6641340909 for ; Sun, 20 Sep 2015 02:06:59 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B1BFD234 for ; Sun, 20 Sep 2015 02:06:54 +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: <1442714502.22fc20dea05f86d061826dc39026e10a8fec1497.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:repoman 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: 22fc20dea05f86d061826dc39026e10a8fec1497 X-VCS-Branch: repoman Date: Sun, 20 Sep 2015 02:06:54 +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: 9fea6ab6-c2ad-4a80-a057-f56163a78a01 X-Archives-Hash: 7a4e0fb49dd595e58402f2bf7a509a76 commit: 22fc20dea05f86d061826dc39026e10a8fec1497 Author: Brian Dolbec gentoo org> AuthorDate: Sat Sep 19 04:27:19 2015 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Sun Sep 20 02:01:42 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=22fc20de 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 +