Skip to content
Snippets Groups Projects
Verified Commit c22f41a6 authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

nixguix: Exclude faulty "recursive" file origins from listing

For now, those can be faulty as the manifest is missing 'critical' information about how
to recompute the hash (e.g. fs layout, executable bit, ...).

Related to T4608
Related to T3781
parent 5a53243b
No related branches found
No related tags found
No related merge requests found
......@@ -430,6 +430,18 @@ class NixGuixLister(StatelessLister[PageResult]):
# 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,
......
......@@ -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" ],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment