tree: 802d6b7b24b7a221733cd60b451f18be44f6af22 [path history] [tgz]
  1. common.py
  2. package_schema.json
  3. README.md
  4. verify_layer.py
  5. visualize_hierarchy.py
packages/README.md

Build package tools

This folder contains a set of utilities to manage build packages, i.e. files defined under //<layer>/packages.

verify_layer

This tool verifies that a given layer's packages/ directory is properly organized. It checks that:

  • all files in the directory are JSON files;
  • all files in the directory are valid according to the schema;
  • all subdirectories (except a few canonical ones for which it does not make sense) have a file named all which contains all files in that subdirectory;
  • all packages files listed as import are valid files;
  • the root directory contains a set of canonical files.

The tool relies on a JSON validator commonly built as part of the Fuchsia build. The validator can be found at:

out/<build_type>/<host_toolchain>/json_validator

visualize_hierarchy

This tool generates a visualization of the package hierarchy for a given package file. The resulting graph file uses the DOT format.

In order to generate an image file from the graph file, use the following command:

dot -Tpng <graph.dot> -o graph.png