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 06075138334 for ; Sun, 13 Oct 2019 19:50:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3E82EE080E; Sun, 13 Oct 2019 19:50:22 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 2A087E080E for ; Sun, 13 Oct 2019 19:50:22 +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 D785C34BA5A for ; Sun, 13 Oct 2019 19:50:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B441F82D for ; Sun, 13 Oct 2019 19:50:13 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1570996189.0e8d17b56f5b86bd4b66d4720808e8b30c90a0ed.mgorny@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/package/ebuild/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/package/ebuild/fetch.py X-VCS-Directories: lib/portage/package/ebuild/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 0e8d17b56f5b86bd4b66d4720808e8b30c90a0ed X-VCS-Branch: master Date: Sun, 13 Oct 2019 19:50:13 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 249b79d6-d451-4611-aaa9-f37612bb0b3f X-Archives-Hash: a6ac85831451b2532c077cfd4975d7ca commit: 0e8d17b56f5b86bd4b66d4720808e8b30c90a0ed Author: Michał Górny gentoo org> AuthorDate: Sun Oct 13 11:55:29 2019 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Oct 13 19:49:49 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=0e8d17b5 fetch: Make FlatLayout.get_filenames() not return directories Stop returning directories from FlatLayout.get_filenames(). This causes emirrordist to wrongly presume directories created by new layout to be distfiles, and causes some noisy errors. Reviewed-by: Zac Medico gentoo.org> Signed-off-by: Michał Górny gentoo.org> lib/portage/package/ebuild/fetch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/portage/package/ebuild/fetch.py b/lib/portage/package/ebuild/fetch.py index 5d0bc7355..cd204b755 100644 --- a/lib/portage/package/ebuild/fetch.py +++ b/lib/portage/package/ebuild/fetch.py @@ -35,6 +35,7 @@ portage.proxy.lazyimport.lazyimport(globals(), 'portage.util:atomic_ofstream', 'portage.util.configparser:SafeConfigParser,read_configs,' + 'ConfigParserError', + 'portage.util.install_mask:_raise_exc', 'portage.util._urlopen:urlopen', ) @@ -269,7 +270,9 @@ class FlatLayout(object): return filename def get_filenames(self, distdir): - return iter(os.listdir(distdir)) + for dirpath, dirnames, filenames in os.walk(distdir, + onerror=_raise_exc): + return iter(filenames) @staticmethod def verify_args(args):