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.
brew test-bot --ci-upload is run on a Linux machine.
The macOS bottles have a prefix of "/usr/local".
The default prefix on Linux is /home/linuxbrew/.linuxbrew.
Elide prefix "/usr/local" in the bottle block, even it does not match
the default prefix. Ditto for cellar.
Use ::detect method of DownloadStrategyDetector to detect download strategy of a bottle from its root_url.
This allows bottle root_urls to be s3:// style URLs and be handled by the S3DownloadStrategy without specifying ':using =>'