diff --git a/swh/lister/nixguix/lister.py b/swh/lister/nixguix/lister.py --- a/swh/lister/nixguix/lister.py +++ b/swh/lister/nixguix/lister.py @@ -430,6 +430,18 @@ # the output can be anything, including a directory tree. outputHashMode = artifact.get("outputHashMode", "flat") + if not is_tar and outputHashMode == "recursive": + # T4608: Cannot deal with those properly yet as some can be missing + # 'critical' information about how to recompute the hash (e.g. fs + # layout, executable bit, ...) + logger.warning( + "Skipping artifact <%s>: 'file' artifact of type <%s> is " + " missing information to properly check its integrity", + artifact, + artifact_type, + ) + continue + logger.debug("%s: %s", "dir" if is_tar else "cnt", origin) yield ArtifactType.ARTIFACT, Artifact( origin=origin, diff --git a/swh/lister/nixguix/tests/data/sources-failure.json b/swh/lister/nixguix/tests/data/sources-failure.json --- a/swh/lister/nixguix/tests/data/sources-failure.json +++ b/swh/lister/nixguix/tests/data/sources-failure.json @@ -37,6 +37,17 @@ ], "inferredFetcher": "fetchzip" }, + { + "outputHash": "0s2mvy1nr2v1x0rr1fxlsv8ly1vyf9978rb4hwry5vnr678ls522", + "outputHashAlgo": "sha256", + "outputHashMode": "recursive", + "type": "url", + "urls": [ + "https://www.unicode.org/Public/emoji/12.1/emoji-zwj-sequences.txt" + ], + "integrity": "sha256-QhRN0THZ7uIzh2RldFJyfgdP0da0u5Az6GGLbIPfVWg=", + "inferredFetcher": "unclassified" + }, { "type": "url", "urls": [ "unknown://example.org/wrong-scheme-so-skipped.txt" ],