| 1319 | |
| 1320 | |
| 1321 | def explain_missing(check: dict[str, Any]) -> str: |
| 1322 | if check.get("ok"): |
| 1323 | return f"{check['bundle']} is present under {check.get('root')}." |
| 1324 | lines = [ |
| 1325 | f"{check.get('bundle')} is not ready.", |
| 1326 | f"Root: {check.get('root') or 'not configured'}", |
| 1327 | ] |
| 1328 | if check.get("error"): |
| 1329 | lines.append(f"Error: {check['error']}") |
| 1330 | if check.get("missing"): |
| 1331 | lines.append("Missing files:") |
| 1332 | lines.extend(f"- {item}" for item in check["missing"]) |
| 1333 | license_note = check.get("metadata", {}).get("license_note") |
| 1334 | if license_note: |
| 1335 | lines.append(f"License/source note: {license_note}") |
| 1336 | return "\n".join(lines) + "\n" |
| 1337 | |
| 1338 | |
| 1339 | def parse_args() -> argparse.Namespace: |