From e19fab86c0c24a3e99630e28c0e431d5253904e4 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Tue, 15 Oct 2019 20:13:04 +0200 Subject: [PATCH 1/2] bottle: allow prefix cellar to be any* --- Library/Homebrew/dev-cmd/bottle.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 51b597ce76..2c3c940e66 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -367,7 +367,9 @@ module Homebrew mismatches = [:root_url, :prefix, :cellar, :rebuild].reject do |key| old_spec.send(key) == bottle.send(key) end - if old_spec.cellar == :any && bottle.cellar == :any_skip_relocation + if (old_spec.cellar == :any && bottle.cellar == :any_skip_relocation) || + (old_spec.cellar == cellar && + [:any, :any_skip_relocation].include?(bottle.cellar)) mismatches.delete(:cellar) bottle.cellar :any end From aa9950282ffc424210685396329235e6c1e2fb69 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Mon, 21 Oct 2019 14:03:50 +0200 Subject: [PATCH 2/2] bottle: set bottle.cellar to old_spec.cellar if deleting mismatch Co-Authored-By: Mike McQuaid --- Library/Homebrew/dev-cmd/bottle.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 2c3c940e66..2d7f86ecdf 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -371,7 +371,7 @@ module Homebrew (old_spec.cellar == cellar && [:any, :any_skip_relocation].include?(bottle.cellar)) mismatches.delete(:cellar) - bottle.cellar :any + bottle.cellar old_spec.cellar end unless mismatches.empty? bottle_path.unlink if bottle_path.exist?