| Print an overview of the layer to help writing release notes. |
| Output includes sublayers, machines, recipes. |
| # - More human-readable output |
| # - Diff mode, give two revisions and list the changes |
| Determine if this path looks like a layer (is a directory and contains conf/layer.conf). |
| return path.is_dir() and (path / "conf" / "layer.conf").exists() |
| Print a summary of the layer. |
| machines = sorted(p for p in layer.glob("conf/machine/*.conf")) |
| recipes = sorted((p for p in layer.glob("recipes-*/*/*.bb")), key=lambda p:p.name) |
| pn, pv = r.stem.rsplit("_", 1) |
| parser = argparse.ArgumentParser() |
| parser.add_argument("repository") |
| parser.add_argument("revision", nargs="?") |
| args = parser.parse_args() |
| base = gitpathlib.GitPath(args.repository, args.revision) |
| base = pathlib.Path(args.repository) |
| sublayers = sorted(p for p in base.glob("meta-*") if is_layer(p)) |
| print(f"No layers found in {base}", file=sys.stderr) |