about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-01-09 11:06:46 +0000
committerbors <bors@rust-lang.org>2021-01-09 11:06:46 +0000
commit46c35c76fedb90b547201d111e6423bb1de78cd6 (patch)
tree6683cd1a230eda33281c9b6d5d0850b29fd27668 /compiler/rustc_parse/src
parent1f9dc9a1821d55b1641c517feac7fcd6ac76aadc (diff)
parent2caf9bcb33b73ea952bfb3f2750d2a80622caaae (diff)
downloadrust-46c35c76fedb90b547201d111e6423bb1de78cd6.tar.gz
rust-46c35c76fedb90b547201d111e6423bb1de78cd6.zip
Auto merge of #80797 - pietroalbini:fix-relative-install, r=Mark-Simulacrum
Fix x.py install not working with relative prefix

The code powering `./x.py install` did not handle relative paths well: the installation script is executed inside a temporary directory, so all the relative paths specified in `config.toml` and in the `DESTDIR` environment variable were relative to that temporary directory. The original code fixed the problem for `config.toml` paths by canonicalizing the prefix, but breaking `DESTDIR`. https://github.com/rust-lang/rust/pull/80240 fixed the `DESTDIR` problem, but also regressed `config.toml` paths (#80683).

This PR refactors the installation code to generate paths that *in my understanding* are correct, adding comments in the meantime to explain what each step does. There was no documentation on why choices were made before, so my understanding could actually be wrong.

Regardless, executed `./x.py install` with various combinations of `config.toml` and `DESTDIR` paths, and everything seems to work according to my understanding. Still, I'd love if `@vext01` and `@yshui` could test these changes.

r? `@Mark-Simulacrum`
`@rustbot` modify labels: beta-nominated T-infra
Diffstat (limited to 'compiler/rustc_parse/src')
0 files changed, 0 insertions, 0 deletions