commit:     1a8d6cd3d31f960755c3237679539d9cab175bc6
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 16 22:33:17 2022 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Feb 16 22:33:52 2022 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=1a8d6cd3

catalyst: Add .sha256 to list of ignored extensions

Otherwise the presence of a .sha256 file would cause this error:

ERROR:catalyst:CatalystError: Ambiguous Filename: 
/home/catalyst/builds/default/stage3-ia64-openrc-20220216T032203Z
ERROR:catalyst:Please specify the correct extension as well

Fixes: 7457cd3b ("catalyst: generate .sha256 file if any digest is enabled")
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 catalyst/support.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/catalyst/support.py b/catalyst/support.py
index 37d53bc4..a69566d2 100644
--- a/catalyst/support.py
+++ b/catalyst/support.py
@@ -77,8 +77,11 @@ def file_check(filepath, extensions=None):
     # so check if there are files of that name with an extension
     files = glob.glob("%s.*" % filepath)
     # remove any false positive files
-    files = [x for x in files if not x.endswith(
-        ".CONTENTS") and not x.endswith(".CONTENTS.gz") and not 
x.endswith(".DIGESTS")]
+    files = [x for x in files if
+             not x.endswith( ".CONTENTS") and
+             not x.endswith(".CONTENTS.gz") and
+             not x.endswith(".DIGESTS") and
+             not x.endswith(".sha256")]
     if len(files) == 1:
         return files[0]
     if len(files) > 1:

Reply via email to