New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bottle prefix and repository handling #9481
Fix bottle prefix and repository handling #9481
Conversation
Review period ended. |
c43840e
to
f223fbb
Compare
We were previously only looking at the `cellar` value when pouring bottles and ignoring the `prefix` and (implicit) `repository`. Actually look at these values and set the defaults for each platform. Also, when we're relocating to create or pour bottles when `prefix` and `repository` are equal then skip relocating the `repository` and always use references to the `prefix` instead. Fixes #9453
f223fbb
to
0f9bad0
Compare
Fixes bottling issues on ARM Big Sur (tested on |
After this PR, it is no longer possible to install $ git clone --reference=/usr/local/Homebrew https://github.com/Homebrew/brew ~/.homebrew
$ git clone --reference=/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core https://github.com/Homebrew/homebrew-core ~/.homebrew/Library/Taps/homebrew/homebrew-core
$ ~/.homebrew/bin/brew install hello
Warning: Building hello from source as the bottle needs:
- HOMEBREW_CELLAR: any_skip_relocation (yours is /Users/shaun.jackman/.homebrew/Cellar)
- HOMEBREW_PREFIX: /usr/local (yours is /Users/shaun.jackman/.homebrew)
- HOMEBREW_REPOSITORY: /usr/local/Homebrew (yours is /Users/shaun.jackman/.homebrew)
==> Downloading https://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz
…
$ ~/.homebrew/bin/brew --version
Homebrew 2.6.2-9-g26a59c9
Homebrew/homebrew-core (git revision 1b4630; last commit 2020-12-14) |
After this PR, $ git clone --reference=/usr/local/Homebrew https://github.com/Homebrew/brew ~/.homebrew
$ git clone --reference=/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core https://github.com/Homebrew/homebrew-core ~/.homebrew/Library/Taps/homebrew/homebrew-core
$ ~/.homebrew/bin/brew install --force-hello hello
==> Downloading https://homebrew.bintray.com/bottles/hello-2.10.catalina.bottle.
Already downloaded: /Users/shaun.jackman/Library/Caches/Homebrew/downloads/6a8a266068965d3a7ea16bfe4821367cb94c47f904e7fc23ec61fad8a9859c54--hello-2.10.catalina.bottle.tar.gz
Error: undefined method `stage' for nil:NilClass Issue reported at #9521 |
Fixed in #10025 |
We were previously only looking at the
cellar
value when pouring bottles and ignoring theprefix
and (implicit)repository
.Actually look at these values and set the defaults for each platform.
Also, when we're relocating to create or pour bottles when
prefix
andrepository
are equal then skip relocating therepository
and always use references to theprefix
instead.Fixes #9453