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
|
|
|
|
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-09-25 19:26:31 +02:00
|
|
|
logfile = args.builddir / "meson-logs" / "meson-log.txt"
|
|
|
|
with logfile.open(encoding="utf-8") as f:
|
|
|
|
if "Failed to guess install tag" in f.read():
|
|
|
|
print(
|
|
|
|
f"Some files are missing install_tag, see {logfile} for details." # no-qa
|
|
|
|
)
|
2022-09-19 16:29:40 +02:00
|
|
|
return 1
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
exit(main())
|