commit | 539fc2179be1942e58ba5daf69b72fddb61f87b2 | [log] [tgz] |
---|---|---|
author | Xixuan Wu <xixuan@google.com> | Wed Jan 13 22:23:43 2021 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Jan 13 23:03:00 2021 |
tree | 7604f3b054f2437aa2193e099446d1008c384a42 | |
parent | ea6c44b378a11b8701e98dd17b166bbe60921359 [diff] |
skylab_inventory tools: clean up dependencies for chromite (part 2) BUG=chromium:1119035 TEST=None Change-Id: I0fff88cea065dc5a3f63acdc84206b33aa95e68e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/skylab_inventory/+/2606999 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