From ec1437499a178a09805854469c5162d749270f3e Mon Sep 17 00:00:00 2001 From: Mike McQuaid <mike@mikemcquaid.com> Date: Sat, 3 Sep 2016 20:20:52 +0100 Subject: [PATCH] bottle: allow --keep-old to ignore same sha256s. It should refuse to change existing ones but it should allow them to be the same and silently ignore. --- Library/Homebrew/cmd/bottle.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 888e8c7789..12071b9078 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -391,10 +391,14 @@ module Homebrew if !tag.empty? if !bottle_hash["bottle"]["tags"][tag].to_s.empty? - mismatches << "#{key} => #{tag}" - else - bottle.send(key, value => tag.to_sym) + old_value = bottle_hash["bottle"]["tags"][tag][key].to_s + if value != old_value + mismatches << "#{key} => #{tag}" + end + next end + + bottle.send(key, value => tag.to_sym) next end -- GitLab