New issue
Advanced search Search tips

Issue 648211 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: May 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature



Sign in to add a comment

gclient recursedeps does not provide a way to control cwd for running the hooks of the recursed DEPS files

Project Member Reported by kkinnu...@nvidia.com, Sep 19 2016

Issue description

What steps will reproduce the problem?
Not a problem for Chromium, rather using gclient to build other apps or libraries.

Trying to integrate Chromium to a build system, with a master gclient DEPS file controlling chromium checkout.
The gclient recursedeps does not provide a way to control cwd for running the hooks of the recursed DEPS files.

Consider a DEPS file snippet:

deps = {
  'chromium/src': 'https://chromium.googlesource.com/chromium/src.git@' + Var('chromium_revision'),
  'chromium/src/cef': 'https://bitbucket.org/chromiumembedded/cef.git@' + Var('cef_revision'),
}
recursedeps = [ 'chromium/src' ]


What is the expected output?

Kind of intuitively I'd expect the Chromium checkout "to just work", e.g. complete just fine.

What do you see instead?

The checkout fails due to landmines.py script not being able to run. Chromium DEPS file hooks contains paths relative to its DEPS file. When integrated to other projects, the DEPS file assumptions of course do not hold, as the gclient runs all hooks with cwd set to the root dir containing the .gclient file.

So the Chromium DEPS is like:
hooks = [
  {
    'name': 'landmines',
    'pattern': '.',
    'action': [
        'python',
        'src/build/landmines.py',
    ],
  },
...
]

The src/build/landmines.py is of course not found, since the cwd is the root of the project that tries to embed the chromium.

The "intuitive" expectation would be that it is not observable whether the DEPS file is processed as a recursed entry or as a top-level entry. "Intuitive" from the perspective of using gclient as a integration tool for any project, which of course it probably is not strictly intended.

I understand that this is probably not something strictly necessary in order to build Chrome the browser, the main point of gclient. I'm filing this too just get a comment whether this sort of added functionality of controlling the cwd somehow would be desired or not. Some other project have seem to run into the same problem: https://codereview.chromium.org/1410783004/


 
Components: -Infra Infra>SDK
Status: WontFix (was: Untriaged)

Sign in to add a comment