With #10186 now merged, the tag specific cellar information is being read by brew.
This PR (once merged) will start adding the cellar information for each tag instead
of having a single cellar line on the top of the bottle block.
Each new CI build in homebrew-core will slowly start migrating the cellar lines to
the right place. If keep-old is used, the old "all tag" cellar line is removed and
added to each tag.
- Refuse to create bottles which have non-relocatable references to
`HOMEBREW_LIBRARY`. This allows us to make all bottles ignore where
`HOMEBREW_REPOSITORY` is (even those that aren't `cellar :any`).
I cannot see any circumstances in which any bottle should link to
anything within `HOMEBREW_REPOSITORY`.
- Remove audit that becomes unnecessary given the above change.
- Relocate references to `@HOMEBREW_LIBRARY@` but don't actually write
any references yet. This will allow us to move to using
`@HOMEBREW_LIBRARY` and remove all relocation of `HOMEBREW_REPOSITORY`
in a future release (2.7.1, most likely).
`cellar :any` actually requires no references to the cellar, prefix or
repository (not just cellar) so we can pour those bottles anywhere
regardless of the cellar, prefix or repository.
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
As `:arm64_big_sur` and `:big_sur` equated to the same version: their
sorting was not consistent. Instead, suffix the tag and use that for
sorting so `:big_sur` is always before `:arm64_big_sur`.
Empty resources are allowed to exist under the following form:
resource "filelock" do
on_linux do
url "6ee2168387/filelock-3.0.12.tar.gz"
sha256 "18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59"
end
end
In this case (or for the on_macos only resource case), just ignore the resource block.
Fixes:
/usr/local/Homebrew/Library/Homebrew/dependency_collector.rb:148:in `resource_dep'
/usr/local/Homebrew/Library/Homebrew/dependency_collector.rb:99:in `parse_spec'
/usr/local/Homebrew/Library/Homebrew/dependency_collector.rb:53:in `build'
/usr/local/Homebrew/Library/Homebrew/dependency_collector.rb:40:in `block in fetch'
/usr/local/Homebrew/Library/Homebrew/dependency_collector.rb:40:in `fetch'
/usr/local/Homebrew/Library/Homebrew/dependency_collector.rb:40:in `fetch'
/usr/local/Homebrew/Library/Homebrew/dependency_collector.rb:30:in `add'
/usr/local/Homebrew/Library/Homebrew/software_spec.rb:120:in `resource'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2439:in `block in resource'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2438:in `each'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2438:in `resource'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/aws-google-auth.rb:149:in `<class:AwsGoogleAuth>'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/aws-google-auth.rb:1:in `load_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:38:in `rescue in load_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:35:in `load_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:56:in `load_formula_from_path'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:138:in `load_file'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:128:in `klass'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:124:in `get_formula'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:333:in `factory'
/usr/local/Homebrew/Library/Homebrew/cli/args.rb:87:in `block in formulae'
/usr/local/Homebrew/Library/Homebrew/cli/args.rb:86:in `map'
/usr/local/Homebrew/Library/Homebrew/cli/args.rb:86:in `formulae'
/usr/local/Homebrew/Library/Homebrew/cmd/install.rb:133:in `install'
/usr/local/Homebrew/Library/Homebrew/brew.rb:111:in `<main>'
Companion to https://github.com/Homebrew/brew/pull/7698.
Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`.
Refactor the CLI::Args module so it doesn't have different paths to
check arguments depending on whether the arguments have been parsed or
not. Instead, set the values we need from the global ARGV at
first, global initialisation time where they will be thrown away when
the actual arguments are parsed.
To do this some other general refactoring was needed:
- more methods made private when possible
- e.g. `HEAD?` used consistently instead of `head` before arguments
are parsed.
- formula options are only parsed after named arguments are extracted
We're not actually using this anywhere and it makes the code
more complicated.
Relatedly, this PR fixes the issue where
`uses_from_macos "python@2" => :build` was valid on macOS but not
on Linux.
- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
Layout/InconsistentIndentation once the auto-fixer had got rid of the
"redundant begin"s.