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
6ac9d435
Commit
6ac9d435
authored
4 years ago
by
Bo Anderson
Browse files
Options
Downloads
Patches
Plain Diff
formula_installer: fix already-satisfied test deps not being pruned
parent
bfc081ee
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/formula_installer.rb
+14
-17
14 additions, 17 deletions
Library/Homebrew/formula_installer.rb
with
14 additions
and
17 deletions
Library/Homebrew/formula_installer.rb
+
14
−
17
View file @
6ac9d435
...
...
@@ -453,22 +453,18 @@ class FormulaInstaller
build
=
effective_build_options_for
(
dependent
)
install_bottle_for_dependent
=
install_bottle_for?
(
dependent
,
build
)
keep_build_test
=
false
keep_build_test
||=
runtime_requirements
.
include?
(
req
)
keep_build_test
||=
req
.
test?
&&
include_test?
&&
dependent
==
f
keep_build_test
||=
req
.
build?
&&
!
install_bottle_for_dependent
keep_build_test
||=
(
dep
=
formula_deps_map
[
dependent
.
name
])
&&
!
dep
.
build?
if
req
.
prune_from_option?
(
build
)
Requirement
.
prune
elsif
req
.
satisfied?
Requirement
.
prune
elsif
req
.
test?
||
req
.
build?
keep
=
false
keep
||=
runtime_requirements
.
include?
(
req
)
keep
||=
req
.
test?
&&
include_test?
&&
dependent
==
f
keep
||=
req
.
build?
&&
!
install_bottle_for_dependent
keep
||=
(
dep
=
formula_deps_map
[
dependent
.
name
])
&&
!
dep
.
build?
if
keep
unsatisfied_reqs
[
dependent
]
<<
req
else
Requirement
.
prune
end
elsif
(
req
.
build?
||
req
.
test?
)
&&
!
keep_build_test
Requirement
.
prune
else
unsatisfied_reqs
[
dependent
]
<<
req
end
...
...
@@ -492,13 +488,14 @@ class FormulaInstaller
inherited_options
.
fetch
(
dependent
.
name
,
[]),
)
keep_build_test
=
false
keep_build_test
||=
dep
.
test?
&&
include_test?
&&
Homebrew
.
args
.
include_formula_test_deps?
(
dependent
)
keep_build_test
||=
dep
.
build?
&&
!
install_bottle_for?
(
dependent
,
build
)
if
dep
.
prune_from_option?
(
build
)
Dependency
.
prune
elsif
dep
.
test?
||
(
dep
.
build?
&&
install_bottle_for?
(
dependent
,
build
))
keep
=
false
keep
||=
dep
.
test?
&&
include_test?
&&
Homebrew
.
args
.
include_formula_test_deps?
(
dependent
)
keep
||=
dep
.
build?
&&
!
install_bottle_for?
(
dependent
,
build
)
Dependency
.
prune
unless
keep
elsif
(
dep
.
build?
||
dep
.
test?
)
&&
!
keep_build_test
Dependency
.
prune
elsif
dep
.
prune_if_build_and_not_dependent?
(
dependent
)
Dependency
.
prune
elsif
dep
.
satisfied?
(
inherited_options
[
dep
.
name
])
...
...
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