Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
d0c33b37
Commit
d0c33b37
authored
8 years ago
by
Mike McQuaid
Browse files
Options
Downloads
Patches
Plain Diff
bottle: use key/value rather than field.
Consistent naming is good.
parent
7fb91531
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/dev-cmd/bottle.rb
+7
-7
7 additions, 7 deletions
Library/Homebrew/dev-cmd/bottle.rb
with
7 additions
and
7 deletions
Library/Homebrew/dev-cmd/bottle.rb
+
7
−
7
View file @
d0c33b37
...
...
@@ -289,17 +289,17 @@ module Homebrew
old_spec
=
f
.
bottle_specification
if
ARGV
.
include?
(
"--keep-old"
)
&&
!
old_spec
.
checksums
.
empty?
mismatches
=
[
:root_url
,
:prefix
,
:cellar
,
:rebuild
].
select
do
|
field
|
old_spec
.
send
(
field
)
!=
bottle
.
send
(
field
)
mismatches
=
[
:root_url
,
:prefix
,
:cellar
,
:rebuild
].
select
do
|
key
|
old_spec
.
send
(
key
)
!=
bottle
.
send
(
key
)
end
mismatches
.
delete
(
:cellar
)
if
old_spec
.
cellar
==
:any
&&
bottle
.
cellar
==
:any_skip_relocation
unless
mismatches
.
empty?
bottle_path
.
unlink
if
bottle_path
.
exist?
mismatches
.
map!
do
|
field
|
old_value
=
old_spec
.
send
(
field
).
inspect
value
=
bottle
.
send
(
field
).
inspect
"
#{
field
}
: old:
#{
old_value
}
, new:
#{
value
}
"
mismatches
.
map!
do
|
key
|
old_value
=
old_spec
.
send
(
key
).
inspect
value
=
bottle
.
send
(
key
).
inspect
"
#{
key
}
: old:
#{
old_value
}
, new:
#{
value
}
"
end
odie
<<-
EOS
.
undent
...
...
@@ -405,7 +405,7 @@ module Homebrew
if
old_value
.
empty?
||
value
!=
old_value
old_value
=
old_value_original
.
inspect
value
=
value_original
.
inspect
mismatches
<<
"
#{
field
}
: old:
#{
old_value
}
, new:
#{
value
}
"
mismatches
<<
"
#{
key
}
: old:
#{
old_value
}
, new:
#{
value
}
"
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment