INNER CODE UNIT · Python
check_resolvability
wolfSSL/wolfssl · scripts/bomsh_verify.py:94
def check_resolvability(spdx_gitoids, omnibor_objects_dir):
"""(A) Every SPDX gitoid resolves to a file at
`<omnibor_objects_dir>/<aa>/<rest>`. Returns a list of
(pkg_name, gitoid, expected_path) for the unresolved ones; empty
list means every gitoid resolved."""
missing = []
for pkg_name, gid in spdx_gitoids:
obj = os.path.join(omnibor_objects_dir, gid[:2], gid[2:])
if not os.path.isfile(obj):
missing.append((pkg_name, gid, obj))
return missing
_HEX_CHARS = frozenset('0123456789abcdef')
def _looks_like_blob_path(parts):
"""True iff `parts` is the canonical `<aa>/<rest>` shape Git uses