commit | 9ec4792e62cc13ceb37084e3e0de6285cb623ef5 | [log] [tgz] |
---|---|---|
author | Xixuan Wu <xixuan@google.com> | Thu Jan 14 00:53:47 2021 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Jan 14 19:55:57 2021 |
tree | 174ef18b7db61bb2fc9bfffad805057249cc00be | |
parent | 32c86ba52e3dd814ecb886e9181c259c43a77a9e [diff] |
skylab_inventory tools: restore translation_utils.py from symlink to file Before it's a symlink to translation/utils.py, utils.py is already deleted in CL:2607674 This CL changes the type of translation_utils.py BUG=chromium:1119035 TEST=None Change-Id: Ice9e9d923edffa232331935d23752cf7d5e0f5a4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/skylab_inventory/+/2626054 Tested-by: Xixuan Wu <xixuan@chromium.org> Reviewed-by: Allen Li <ayatane@chromium.org> Commit-Queue: Xixuan Wu <xixuan@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