New issue
Advanced search Search tips

Issue 774495 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Adjust cros_config_host to know the config file location

Project Member Reported by sjg@chromium.org, Oct 13 2017

Issue description

It 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.
 
Cc: sjg@chromium.org
What's a good way to go about this?

Comment 2 by sjg@chromium.org, Oct 17 2017

Can you use the same shell variables that get_dtb_path uses in cros-unibuild.eclass?

os.environ['SYSROOT'] ?

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?

Comment 4 by sjg@chromium.org, 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)

Project Member

Comment 5 by bugdroid1@chromium.org, 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

Project Member

Comment 6 by bugdroid1@chromium.org, 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

Status: Fixed (was: Untriaged)

Sign in to add a comment