New issue
Advanced search Search tips

Issue 708352 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Correct operation of SRC_URI in cros-firmware.eclass

Project Member Reported by sjg@chromium.org, Apr 5 2017

Issue description

From vapier's comment in:

https://chromium-review.googlesource.com/c/458899/10:

SRC_URI must be immutable regardless of SYSROOT.  so you'll have to figure out a diff way to do this

This bug tracks that discussion and resolution.

 

Comment 1 by sjg@chromium.org, Apr 5 2017

One more comment:

this isn't based on files/ content, it's based on an existing SYSROOT which simply does not work.  cros-firmware_setup_source is called in global scope which calls setup_source_unibuild which calls get_model_conf_value which directly reads from ROOT.

when you emerge this package, there is no guarantee that ROOT exists or is even set.  portage generates global metadata (like SRC_URI) w/out any board context and caches it so that it can use it later on for speed.  this isn't something you can just punt on "and figure out later".


Comment 2 by sjg@chromium.org, Apr 5 2017

This package has a depend:

        unibuild? ( chromeos-base/chromeos-config )

so I would expect the config file to be present when this ebuild is used. It does seem to work locally but perhaps it would have problems in a buildbot?

Ideas:

1. Is there a way to turn off the SRC_URI caching on this ebuild?

2. The whole SRC_URI thing does feel a bit brittle. Is there a way to manually download files given a URI?

3. I'd prefer to avoid doing all this processing before the ebuild is properly being run. Can we move it into a normal ebuild function so that it runs as part of src_prepare(), for example?

Comment 3 by sjg@chromium.org, Apr 7 2017

Status: Started (was: Available)
Proposed approach is here:

https://chromium-review.googlesource.com/c/470407/
> so I would expect the config file to be present when this ebuild is used. It does seem to work locally but perhaps it would have problems in a buildbot?

DEPEND/RDEPEND is irrelevant -- fetching is run independently & in parallel before anything is compiled or installed.  this is an explicit design decision, and a good one imo.

> 1. Is there a way to turn off the SRC_URI caching on this ebuild?

no, nor does such a thing make sense

> 2. The whole SRC_URI thing does feel a bit brittle. Is there a way to manually download files given a URI?

we do not permit ebuilds/eclasses to download files themselves.  it's a bad idea and does not play with caching, reliability, or security.

> 3. I'd prefer to avoid doing all this processing before the ebuild is properly being run. Can we move it into a normal ebuild function so that it runs as part of src_prepare(), for example?

also not feasible or desirable

Comment 5 by sjg@chromium.org, Apr 10 2017

I've done a change that relies only the source files via a symlink and does not access the root. Hopefully this will resolve this issue.

https://chromium-review.googlesource.com/c/458899/

Comment 6 by sjg@chromium.org, Apr 12 2017

Status: Fixed (was: Started)
Seems to work OK, so I'm closing this.

Sign in to add a comment