Skip to content
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 bug in bottles #6144

Merged
merged 2 commits into from May 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Library/Homebrew/brew.sh
Expand Up @@ -235,6 +235,7 @@ export HOMEBREW_MACOS_VERSION
export HOMEBREW_MACOS_VERSION_NUMERIC
export HOMEBREW_USER_AGENT
export HOMEBREW_USER_AGENT_CURL
export HOMEBREW_BOTTLE_DEFAULT_DOMAIN

if [[ -n "$HOMEBREW_MACOS" && -x "/usr/bin/xcode-select" ]]
then
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/dev-cmd/bottle.rb
Expand Up @@ -13,7 +13,7 @@

BOTTLE_ERB = <<-EOS.freeze
bottle do
<% if !["#{HOMEBREW_BOTTLE_DEFAULT_DOMAIN}/bottles", "https://homebrew.bintray.com/bottles"].include?(root_url) %>
<% if !root_url.start_with?(HOMEBREW_BOTTLE_DEFAULT_DOMAIN) %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this bit for? Not disagreeing just curious.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code has a purpose. Part of the macOS bottling pipeline runs on Linux, where HOMEBREW_BOTTLE_DEFAULT_DOMAIN is https://linuxbrew.bintray.com/bottles. We can end up with the opposite problem, where we'd have root_url "https://homebrew.bintray.com/bottles" in bottles.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code has a purpose. Part of the macOS bottling pipeline runs on Linux, where HOMEBREW_BOTTLE_DEFAULT_DOMAIN is https://linuxbrew.bintray.com/bottles.

It is no longer in this case as we now set HOMEBREW_FORCE_HOMEBREW_ON_LINUX in brew test-bot.

Further, reverting this would also help to remove superfluous root_url in linuxbrew/xorg and linuxbrew/extra.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with me if/when it's fine with @sjackman.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with me then. Thanks, @xu-cheng.

root_url "<%= root_url %>"
<% end %>
<% if ![Homebrew::DEFAULT_PREFIX, "/usr/local"].include?(prefix) %>
Expand Down