Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Issue 1236933002: Make RelativePath use abspath rather than realpath for the 'path' variable. (Closed)

Created:
5 years, 5 months ago by lindleyf
Modified:
5 years, 3 months ago
CC:
gyp-developer_googlegroups.com
Target Ref:
refs/heads/master
Project:
gyp
Visibility:
Public.

Description

Make RelativePath use abspath rather than realpath for the 'path' variable. This allows gyp to work correctly in symlink-heavy environments. Basically, this is because gyp paths need to be in a consistent tree, so we need to compute a path to the target within the *stated* tree, even if it is not the real underlying path to the target. The 'relative_path' variable does need to be resolved using realpath, since gyp or the underlying build system might cd to it before looking for the 'path' target. Also make Ninja's host configuration consult environment variables analogous to those it previously had for the target configuration, and replace os.getenv with os.environ.get for consistency. R=thakis@chromium.org Committed: https://chromium.googlesource.com/external/gyp/+/3a0fcb40557e3ba02273609e49801fdb714f9ee2 Committed: https://chromium.googlesource.com/external/gyp/+/121d89dfcd4f6ebe1c89524b3f9ca11ddd437e77

Patch Set 1 #

Patch Set 2 : Add a test for RelativePath. Also change sys.path manipulation to always put the pylib implementati… #

Patch Set 3 : Update test to actually run gyp. Confirmed test fails using realpath() but passes using abspath(). #

Total comments: 11

Patch Set 4 : Added some comments and used a with block. #

Patch Set 5 : Revert files moved to https://codereview.chromium.org/1313553008/ #

Patch Set 6 : Don't try to test on Windows. #

Patch Set 7 : Remove except OSError block. If the trybots find more systems the test doesn't work on, update the … #

Patch Set 8 : Updated copywrite in hello.c and hello.gyp 2009->2015. The presubmit doesn't pass with a 2009 copyw… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -7 lines) Patch
M pylib/gyp/common.py View 1 chunk +1 line, -1 line 0 comments Download
M pylib/gyp/generator/ninja.py View 1 2 3 4 5 3 chunks +7 lines, -2 lines 0 comments Download
A test/symlinks/gyptest-symlinks.py View 1 2 3 4 5 6 1 chunk +69 lines, -0 lines 0 comments Download
A + test/symlinks/hello.c View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
A + test/symlinks/hello.gyp View 1 2 3 4 5 6 7 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 32 (3 generated)
lindleyf
5 years, 5 months ago (2015-07-13 17:18:52 UTC) #2
Nico
not lgtm, projects generated by gyp should be relocatable by default if it helps you, ...
5 years, 5 months ago (2015-07-13 17:29:24 UTC) #3
lindleyf
On 2015/07/13 17:29:24, Nico wrote: > not lgtm, projects generated by gyp should be relocatable ...
5 years, 5 months ago (2015-07-13 17:33:21 UTC) #4
Nico
i think i misunderstood what this does. can you add a test that demonstrates where ...
5 years, 5 months ago (2015-07-13 17:38:48 UTC) #5
lindleyf
On 2015/07/13 17:38:48, Nico wrote: > i think i misunderstood what this does. can you ...
5 years, 5 months ago (2015-07-13 17:41:30 UTC) #6
lindleyf
On 2015/07/13 17:41:30, lindleyf wrote: > On 2015/07/13 17:38:48, Nico wrote: > > i think ...
5 years, 5 months ago (2015-07-13 22:50:34 UTC) #7
lindleyf
On 2015/07/13 22:50:34, lindleyf wrote: > On 2015/07/13 17:41:30, lindleyf wrote: > > On 2015/07/13 ...
5 years, 4 months ago (2015-08-19 01:00:22 UTC) #8
lindleyf
Ping?
5 years, 4 months ago (2015-08-24 16:18:13 UTC) #9
lindleyf
I improved the test to actually run gyp. I accidentally figured out the key in ...
5 years, 4 months ago (2015-08-26 01:54:00 UTC) #10
Nico
lgtm assuming all tests pass for you (in particular, the tests that were added in ...
5 years, 3 months ago (2015-08-31 17:35:23 UTC) #11
lindleyf
On 2015/08/31 17:35:23, Nico wrote: > lgtm assuming all tests pass for you (in particular, ...
5 years, 3 months ago (2015-08-31 18:14:34 UTC) #12
lindleyf
https://codereview.chromium.org/1236933002/diff/40001/test/symlinks/gyptest-symlinks.py File test/symlinks/gyptest-symlinks.py (right): https://codereview.chromium.org/1236933002/diff/40001/test/symlinks/gyptest-symlinks.py#newcode3 test/symlinks/gyptest-symlinks.py:3: # Copyright (c) 2012 Google Inc. All rights reserved. ...
5 years, 3 months ago (2015-08-31 18:14:58 UTC) #13
Nico
https://codereview.chromium.org/1236933002/diff/40001/test/symlinks/gyptest-symlinks.py File test/symlinks/gyptest-symlinks.py (right): https://codereview.chromium.org/1236933002/diff/40001/test/symlinks/gyptest-symlinks.py#newcode69 test/symlinks/gyptest-symlinks.py:69: test.pass_test() # os.symlink may not be supported on all ...
5 years, 3 months ago (2015-08-31 18:33:36 UTC) #14
lindleyf
https://codereview.chromium.org/1236933002/diff/40001/test/symlinks/gyptest-symlinks.py File test/symlinks/gyptest-symlinks.py (right): https://codereview.chromium.org/1236933002/diff/40001/test/symlinks/gyptest-symlinks.py#newcode69 test/symlinks/gyptest-symlinks.py:69: test.pass_test() # os.symlink may not be supported on all ...
5 years, 3 months ago (2015-08-31 19:02:41 UTC) #15
Nico
bots will find other platforms where this might not work, but only if the try/catch ...
5 years, 3 months ago (2015-08-31 19:11:32 UTC) #16
lindleyf
Removed except OSError block.
5 years, 3 months ago (2015-08-31 20:03:22 UTC) #17
lindleyf
Committed patchset #8 (id:140001) manually as 3a0fcb40557e3ba02273609e49801fdb714f9ee2 (presubmit successful).
5 years, 3 months ago (2015-08-31 20:17:35 UTC) #18
Nico
I filed https://code.google.com/p/chromium/issues/detail?id=527089 for us silently dropping commits from people without commit bits. I'll land ...
5 years, 3 months ago (2015-09-01 17:00:53 UTC) #19
Nico
Turns out the test doesn't pass with the xcode generator as-is; it gets confused that ...
5 years, 3 months ago (2015-09-01 17:39:35 UTC) #20
lindleyf
On 2015/09/01 17:39:35, Nico wrote: > Turns out the test doesn't pass with the xcode ...
5 years, 3 months ago (2015-09-01 17:46:51 UTC) #21
Nico
Committed patchset #8 (id:140001) manually as 121d89dfcd4f6ebe1c89524b3f9ca11ddd437e77 (presubmit successful).
5 years, 3 months ago (2015-09-01 17:49:00 UTC) #22
kjellander_chromium
This breaks how WebRTC checkouts are built. Since we use a lot of the Chromium ...
5 years, 3 months ago (2015-09-02 09:58:25 UTC) #24
lindleyf
On 2015/09/02 09:58:25, kjellander (chromium) wrote: > This breaks how WebRTC checkouts are built. > ...
5 years, 3 months ago (2015-09-02 16:49:59 UTC) #25
bradn
This is also causing a problem for an alternate v8 configuration using symlinks.
5 years, 3 months ago (2015-09-02 16:51:20 UTC) #27
Nico
let's revert and reland once things are figured out then
5 years, 3 months ago (2015-09-02 16:53:11 UTC) #28
titzer
On 2015/09/02 16:53:11, Nico (vacation Thu Sep 2) wrote: > let's revert and reland once ...
5 years, 3 months ago (2015-09-03 08:01:02 UTC) #29
kjellander_chromium
On 2015/09/03 08:01:02, titzer wrote: > On 2015/09/02 16:53:11, Nico (vacation Thu Sep 2) wrote: ...
5 years, 3 months ago (2015-09-04 07:38:48 UTC) #30
lindleyf
On 2015/09/04 07:38:48, kjellander (chromium) wrote: > On 2015/09/03 08:01:02, titzer wrote: > > On ...
5 years, 3 months ago (2015-09-04 07:55:48 UTC) #31
bradn
5 years, 3 months ago (2015-09-04 19:49:29 UTC) #32
Message was sent while issue was closed.
Sent out a revert here:
https://codereview.chromium.org/1315373003/

Powered by Google App Engine
This is Rietveld 408576698