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
2e5e9286
Commit
2e5e9286
authored
8 years ago
by
Mike McQuaid
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #870 from MikeMcQuaid/revert-keep-old
bottle: revert --keep-old changes.
parents
e5869b1e
cf505fa6
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/cmd/bottle.rb
+6
-25
6 additions, 25 deletions
Library/Homebrew/cmd/bottle.rb
with
6 additions
and
25 deletions
Library/Homebrew/cmd/bottle.rb
+
6
−
25
View file @
2e5e9286
...
...
@@ -279,9 +279,10 @@ module Homebrew
end
bottle
.
rebuild
rebuild
sha256
=
bottle_path
.
sha256
bottle
.
sha256
sha256
=>
Utils
::
Bottles
.
tag
if
ARGV
.
include?
(
"--keep-old"
)
&&
!
f
.
bottle_specification
.
checksums
.
empty?
old_spec
=
f
.
bottle_specification
old_spec
=
f
.
bottle_specification
if
ARGV
.
include?
(
"--keep-old"
)
&&
!
old_spec
.
checksums
.
empty?
bad_fields
=
[
:root_url
,
:prefix
,
:cellar
,
:rebuild
].
select
do
|
field
|
old_spec
.
send
(
field
)
!=
bottle
.
send
(
field
)
end
...
...
@@ -290,11 +291,8 @@ module Homebrew
bottle_path
.
unlink
if
bottle_path
.
exist?
odie
"--keep-old is passed but there are changes in:
#{
bad_fields
.
join
", "
}
"
end
bottle
=
old_spec
end
bottle
.
sha256
sha256
=>
Utils
::
Bottles
.
tag
output
=
bottle_output
bottle
puts
"./
#{
filename
}
"
...
...
@@ -325,19 +323,6 @@ module Homebrew
},
},
}
if
ARGV
.
include?
(
"--keep-old"
)
bottle
.
checksums
.
each
do
|
hash_type
,
checksums
|
checksums
.
each
do
|
checksum_hash
|
checksum_hash
.
each
do
|
checksum
,
tag
|
tag_hash
=
{}
tag_hash
[
"filename"
]
||=
Bottle
::
Filename
.
create
(
f
,
tag
,
rebuild
).
to_s
tag_hash
[
hash_type
.
to_s
]
||=
checksum
.
hexdigest
json
[
f
.
full_name
][
"bottle"
][
"tags"
][
tag
.
to_s
]
||=
tag_hash
end
end
end
end
File
.
open
(
"
#{
filename
.
prefix
}
.bottle.json"
,
"w"
)
do
|
file
|
file
.
write
Utils
::
JSON
.
dump
json
end
...
...
@@ -391,14 +376,10 @@ module Homebrew
if
!
tag
.
empty?
if
!
bottle_hash
[
"bottle"
][
"tags"
][
tag
].
to_s
.
empty?
old_value
=
bottle_hash
[
"bottle"
][
"tags"
][
tag
][
key
].
to_s
if
value
!=
old_value
mismatches
<<
"
#{
key
}
=>
#{
tag
}
"
end
next
mismatches
<<
"
#{
key
}
=>
#{
tag
}
"
else
bottle
.
send
(
key
,
value
=>
tag
.
to_sym
)
end
bottle
.
send
(
key
,
value
=>
tag
.
to_sym
)
next
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