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
be5484da
Commit
be5484da
authored
8 years ago
by
AnastasiaSulyagina
Committed by
Mike McQuaid
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
update-report: allow Casks migration to formulae.
Closes #588. Signed-off-by:
Mike McQuaid
<
mike@mikemcquaid.com
>
parent
2bd5e0e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Library/Homebrew/cmd/update-report.rb
+26
-2
26 additions, 2 deletions
Library/Homebrew/cmd/update-report.rb
Library/Homebrew/cmd/update.sh
+2
-0
2 additions, 0 deletions
Library/Homebrew/cmd/update.sh
with
28 additions
and
2 deletions
Library/Homebrew/cmd/update-report.rb
+
26
−
2
View file @
be5484da
...
...
@@ -193,7 +193,7 @@ class Reporter
dst
=
Pathname
.
new
paths
.
last
next
unless
dst
.
extname
==
".rb"
next
unless
paths
.
any?
{
|
p
|
tap
.
formula_file?
(
p
)
}
next
unless
paths
.
any?
{
|
p
|
tap
.
formula_file?
(
p
)}
case
status
when
"A"
,
"D"
...
...
@@ -249,8 +249,32 @@ class Reporter
def
migrate_tap_migration
report
[
:D
].
each
do
|
full_name
|
name
=
full_name
.
split
(
"/"
).
last
new_tap_name
=
tap
.
tap_migrations
[
name
]
next
if
new_tap_name
.
nil?
# skip if not in tap_migrations list.
if
tap
==
"caskroom/cask"
next
unless
(
HOMEBREW_REPOSITORY
/
"Caskroom"
/
name
).
exist?
new_tap
=
Tap
.
fetch
(
new_tap_name
)
new_tap
.
install
unless
new_tap
.
installed?
ohai
"
#{
name
}
has been moved to Homebrew."
,
<<-
EOS
.
undent
To uninstall the cask run:
brew cask uninstall --force
#{
name
}
EOS
new_full_name
=
"
#{
new_tap_name
}
/
#{
name
}
"
next
if
(
HOMEBREW_CELLAR
/
name
.
split
(
"/"
).
last
).
directory?
ohai
"Installing
#{
name
}
..."
system
HOMEBREW_BREW_FILE
,
"install"
,
new_full_name
begin
unless
Formulary
.
factory
(
new_full_name
).
keg_only?
system
HOMEBREW_BREW_FILE
,
"link"
,
new_full_name
,
"--force"
end
rescue
Exception
=>
e
onoe
e
if
ARGV
.
homebrew_developer?
end
next
end
next
unless
(
dir
=
HOMEBREW_CELLAR
/
name
).
exist?
# skip if formula is not installed.
next
unless
new_tap_name
=
tap
.
tap_migrations
[
name
]
# skip if formula is not in tap_migrations list.
tabs
=
dir
.
subdirs
.
map
{
|
d
|
Tab
.
for_keg
(
Keg
.
new
(
d
))
}
next
unless
tabs
.
first
.
tap
==
tap
# skip if installed formula is not from this tap.
new_tap
=
Tap
.
fetch
(
new_tap_name
)
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/cmd/update.sh
+
2
−
0
View file @
be5484da
...
...
@@ -359,6 +359,8 @@ EOS
# only allow one instance of brew update
lock update
# prevent recursive updates
export
HOMEBREW_NO_AUTO_UPDATE
=
"1"
git_init_if_necessary
# rename Taps directories
...
...
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