* [gentoo-portage-dev] [PATCH v2] fetch: Make FlatLayout.get_filenames() not return directories
@ 2019-10-13 19:46 99% Michał Górny
0 siblings, 0 replies; 1+ results
From: Michał Górny @ 2019-10-13 19:46 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Michał Górny
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.
Signed-off-by: Michał Górny <mgorny@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):
--
2.23.0
^ permalink raw reply related [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-10-13 19:46 99% [gentoo-portage-dev] [PATCH v2] fetch: Make FlatLayout.get_filenames() not return directories Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox