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 2C23F138330 for ; Sat, 26 May 2018 06:09:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 40180E0830; Sat, 26 May 2018 06:09:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1A65EE0830 for ; Sat, 26 May 2018 06:09:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 871F0335C7A for ; Sat, 26 May 2018 06:09:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 19E27292 for ; Sat, 26 May 2018 06:09:54 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1527314875.cd44fea4c8c8154fee74bcc37529c0d5c2e9d789.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/package/ebuild/prepare_build_dirs.py X-VCS-Directories: pym/portage/package/ebuild/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: cd44fea4c8c8154fee74bcc37529c0d5c2e9d789 X-VCS-Branch: master Date: Sat, 26 May 2018 06:09: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: 158ee65e-78b5-41ee-aa0a-adfd93f00678 X-Archives-Hash: 4e2bf1c8ea01f3afeb0eb95aec36644b commit: cd44fea4c8c8154fee74bcc37529c0d5c2e9d789 Author: Zac Medico gentoo org> AuthorDate: Sat May 26 05:46:36 2018 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat May 26 06:07:55 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=cd44fea4 prepare_build_dirs: convert PermissionError to PermissionDenied (bug 656542) This supresses display of a big PermissionError traceback for bin/ebuild, like in https://bugs.gentoo.org/656542#c0, and also suppresses additional messages that may occur when the unhandled PermissionError prevents bin/ebuild from cleanly closing the asyncio event loop. Bug: https://bugs.gentoo.org/656542 pym/portage/package/ebuild/prepare_build_dirs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pym/portage/package/ebuild/prepare_build_dirs.py b/pym/portage/package/ebuild/prepare_build_dirs.py index 21e2aa87c..e53ccd0fb 100644 --- a/pym/portage/package/ebuild/prepare_build_dirs.py +++ b/pym/portage/package/ebuild/prepare_build_dirs.py @@ -19,6 +19,7 @@ from portage.localization import _ from portage.output import colorize from portage.util import apply_recursive_permissions, \ apply_secpass_permissions, ensure_dirs, normalize_path, writemsg +from portage.util.install_mask import _raise_exc from portage.const import EPREFIX def prepare_build_dirs(myroot=None, settings=None, cleanup=False): @@ -50,7 +51,9 @@ def prepare_build_dirs(myroot=None, settings=None, cleanup=False): clean_dir, noiselevel=-1) return 1 else: - raise + # Wrap with PermissionDenied if appropriate, so that callers + # display a short error message without a traceback. + _raise_exc(oe) def makedirs(dir_path): try: