2022-09-19 16:29:40 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
"""
|
|
|
|
This script checks Meson configuration logs to verify no installed file is
|
|
|
|
missing installation tag.
|
|
|
|
"""
|
|
|
|
|
|
|
|
import argparse
|
2022-10-26 16:43:07 +02:00
|
|
|
import json
|
2022-09-19 16:29:40 +02:00
|
|
|
from pathlib import Path
|
|
|
|
|
2022-09-25 19:26:31 +02:00
|
|
|
|
2022-09-19 16:29:40 +02:00
|
|
|
def main():
|
|
|
|
parser = argparse.ArgumentParser()
|
2022-09-25 19:26:31 +02:00
|
|
|
parser.add_argument("builddir", type=Path)
|
2022-09-19 16:29:40 +02:00
|
|
|
args = parser.parse_args()
|
|
|
|
|
2022-10-26 16:43:07 +02:00
|
|
|
success = True
|
|
|
|
path = args.builddir / "meson-info" / "intro-install_plan.json"
|
|
|
|
with path.open(encoding="utf-8") as f:
|
|
|
|
install_plan = json.load(f)
|
|
|
|
for target in install_plan.values():
|
|
|
|
for info in target.values():
|
|
|
|
if not info["tag"]:
|
2022-10-27 09:51:28 +02:00
|
|
|
print("Missing install_tag for", info["destination"])
|
2022-10-26 16:43:07 +02:00
|
|
|
success = False
|
|
|
|
return 0 if success else 1
|
2022-09-19 16:29:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
exit(main())
|