skylab_inventory tools: clean up host-related logic (part 4) BUG=chromium:1119035 TEST=None Change-Id: Ia8d86c64e9fef4e73dc67c112df72dee50511464 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/skylab_inventory/+/2607674 Commit-Queue: Xixuan Wu <xixuan@chromium.org> Tested-by: Xixuan Wu <xixuan@chromium.org> Reviewed-by: Allen Li <ayatane@chromium.org>
Inventory schema is stored as protobuf definitions in the proto/ directory. When you update these protobuf definitions, you must also update the generated python libraries for them.
You need the protoc compiler for this. On gLinux:
sudo apt-get install protobuf-compiler go get github.com/golang/protobuf/protoc-gen-go
Then, regenerate the libraries inside the chroot:
cros_sdk (cr) cd ~/trunk/infra/skylab_inventory/protos (cr) protoc --python_out=../venv/skylab_inventory/protos/ *.proto (cr) protoc --go_out=../go/src/chromiumos/infra/skylab/inventory/protos/ *.proto