Adjust cros_config_host to know the config file location |
||
Issue descriptionIt should not be necessary to tell cros_config_host where to find the config file from an ebuild. It should be able to look at the running ebuild and board, and select the config file automatically. This avoids us needed to specify it in various places.
,
Oct 17 2017
Can you use the same shell variables that get_dtb_path uses in cros-unibuild.eclass? os.environ['SYSROOT'] ?
,
Oct 17 2017
From what I can tell, because the filepath right now is passed in without a flag (no --filepath=...) it can't have a default value because of the sub-commands :( This means changing the CLI signature to use a --filepath flag over the <filepath> property. It complains that it can't tell if the filepath you just give it is supposed to be a command name or not. Recommendations?
,
Oct 17 2017
Yes I think you should change that to a flag, like -c or --config and that way you can specify nothing (for the default), or: -c /path/to/file -c - (for stdin)
,
Oct 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/a561c4b3c8c0255cd9edc68253dca4a797616b5d commit a561c4b3c8c0255cd9edc68253dca4a797616b5d Author: Alec Thilenius <athilenius@chromium.org> Date: Sat Oct 21 18:46:53 2017 chromeos-config: Change <filepath> to -c flag in cros_config_host_py Change the required <filepath> property of cros_config_host_py to be an optional --config flag. If the flag is not specified, the system configuration will be used. Note that SYSROOT must be set for that to work. BUG= chromium:774495 TEST=FEATURES=test sudo -E emerge chromeos-base/chromeos-config-tools CQ-DEPEND=CL:730765 Change-Id: I900398c00c0b91adf631a531002816dc98c2487d Reviewed-on: https://chromium-review.googlesource.com/726301 Commit-Ready: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Tested-by: Alec Thilenius <athilenius@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> [modify] https://crrev.com/a561c4b3c8c0255cd9edc68253dca4a797616b5d/chromeos-config/cros_config_host_py/cros_config_host_unittest.py [modify] https://crrev.com/a561c4b3c8c0255cd9edc68253dca4a797616b5d/chromeos-config/cros_config_host_py/cros_config_host.py
,
Oct 21 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/1ab6809096424ee88108ef7532fff53870cbb16d commit 1ab6809096424ee88108ef7532fff53870cbb16d Author: Alec Thilenius <athilenius@chromium.org> Date: Sat Oct 21 18:46:52 2017 chromeos-config-tools: Update cros_config_host_py -c flag usage In all eclass uses of cros_config_host_py, the -c flag was added where the file path is passed in from stdin, and the entire call to get_dtb_path was removed in other calls. cros_config_host_py now supports useing the default config if no file is specified. BUG= chromium:774495 TEST=FEATURES=test sudo -E emerge chromeos-config-tools CQ-DEPEND=CL:726301 Change-Id: I6458cd4ac5eff46417e528bc34e637e6e1dce339 Reviewed-on: https://chromium-review.googlesource.com/730765 Commit-Ready: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> [modify] https://crrev.com/1ab6809096424ee88108ef7532fff53870cbb16d/eclass/cros-unibuild.eclass [modify] https://crrev.com/1ab6809096424ee88108ef7532fff53870cbb16d/eclass/cros-firmware.eclass
,
Oct 23 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by athilenius@chromium.org
, Oct 17 2017