From 635340e32e324b3884dcba4593a55ad53b838ae0 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Sat, 12 Sep 2015 16:33:11 +0800 Subject: bottle: allow updating :any to :any_skip_relocation when keep old Closes Homebrew/homebrew#43849. Signed-off-by: Xu Cheng --- Library/Homebrew/cmd/bottle.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 1df7b2b6e..7774a568f 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -235,6 +235,7 @@ module Homebrew bad_fields = [:root_url, :prefix, :cellar, :revision].select do |field| old_spec.send(field) != bottle.send(field) end + bad_fields.delete(:cellar) if old_spec.cellar == :any && bottle.cellar == :any_skip_relocation if bad_fields.any? bottle_path.unlink if bottle_path.exist? odie "--keep-old is passed but there are changes in: #{bad_fields.join ", "}" @@ -289,7 +290,7 @@ module Homebrew bad_fields = [:root_url, :prefix, :cellar, :revision].select do |field| old_spec.send(field) != bottle.send(field) end - + bad_fields.delete(:cellar) if old_spec.cellar == :any && bottle.cellar == :any_skip_relocation if bad_fields.any? ofail "--keep-old is passed but there are changes in: #{bad_fields.join ", "}" next -- cgit v1.2.3