WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 3207db1

Browse files
committed
Remove migration of linuxbrew-core formulae
Follow up to #21190. We enabled migration over 4 years ago since #12248, which was part of brew 3.3.0. So at least 2 major brew releases have passed and all active Linuxbrew users would have been migrated already. There are only 25 formulae left so anyone who hasn't migrated can just reinstall formulae if impacted.
1 parent 70badad commit 3207db1

File tree

3 files changed

+1
-77
lines changed

3 files changed

+1
-77
lines changed

Library/Homebrew/cmd/update-report.rb

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -148,29 +148,6 @@ def output_update_report
148148
next if !tap.git? || tap.git_repository.origin_url.nil?
149149
next if (tap.core_tap? || tap.core_cask_tap?) && !Homebrew::EnvConfig.no_install_from_api?
150150

151-
if ENV["HOMEBREW_MIGRATE_LINUXBREW_FORMULAE"].present? && tap.core_tap? &&
152-
Settings.read("linuxbrewmigrated") != "true"
153-
ohai "Migrating formulae from linuxbrew-core to homebrew-core"
154-
155-
require "linuxbrew-core-migration"
156-
LINUXBREW_CORE_MIGRATION_LIST.each do |name|
157-
begin
158-
formula = Formula[name]
159-
rescue FormulaUnavailableError
160-
next
161-
end
162-
next unless formula.any_version_installed?
163-
164-
keg = formula.installed_kegs.fetch(-1)
165-
tab = keg.tab
166-
# force a `brew upgrade` from the linuxbrew-core version to the homebrew-core version (even if lower)
167-
tab.source["versions"]["version_scheme"] = -1
168-
tab.write
169-
end
170-
171-
Settings.write "linuxbrewmigrated", true
172-
end
173-
174151
begin
175152
reporter = Reporter.new(tap)
176153
rescue Reporter::ReporterRevisionUnsetError => e
@@ -251,7 +228,7 @@ def output_update_report
251228
end
252229
end
253230
puts if args.auto_update?
254-
elsif !args.auto_update? && !ENV["HOMEBREW_UPDATE_FAILED"] && !ENV["HOMEBREW_MIGRATE_LINUXBREW_FORMULAE"]
231+
elsif !args.auto_update? && !ENV["HOMEBREW_UPDATE_FAILED"]
255232
puts "Already up-to-date." unless args.quiet?
256233
end
257234

Library/Homebrew/cmd/update.sh

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -674,13 +674,6 @@ EOS
674674
[[ "${HOMEBREW_CORE_DEFAULT_GIT_REMOTE}" != "${HOMEBREW_CORE_GIT_REMOTE}" ||
675675
-n "${HOMEBREW_LINUXBREW_CORE_MIGRATION}" ]]
676676
then
677-
if [[ -n "${HOMEBREW_LINUXBREW_CORE_MIGRATION}" ]]
678-
then
679-
# This means a migration is needed (in case it isn't run this time)
680-
safe_cd "${HOMEBREW_REPOSITORY}"
681-
git config --bool homebrew.linuxbrewmigrated false
682-
fi
683-
684677
safe_cd "${HOMEBREW_CORE_REPOSITORY}"
685678
echo "HOMEBREW_CORE_GIT_REMOTE set: using ${HOMEBREW_CORE_GIT_REMOTE} as the Homebrew/homebrew-core Git remote."
686679
git remote set-url origin "${HOMEBREW_CORE_GIT_REMOTE}"
@@ -692,12 +685,6 @@ EOS
692685

693686
safe_cd "${HOMEBREW_REPOSITORY}"
694687

695-
# This means a migration is needed but hasn't completed (yet).
696-
if [[ "$(git config get --type=bool homebrew.linuxbrewmigrated 2>/dev/null)" == "false" ]]
697-
then
698-
export HOMEBREW_MIGRATE_LINUXBREW_FORMULAE=1
699-
fi
700-
701688
# This means the user has run `brew which-formula` before and we should fetch executables.txt
702689
if [[ "$(git config get --type=bool homebrew.commandnotfound 2>/dev/null)" == "true" ]]
703690
then
@@ -1056,7 +1043,6 @@ EOS
10561043
[[ -n "${HOMEBREW_UPDATE_FAILED}" ]] ||
10571044
[[ -n "${HOMEBREW_MISSING_REMOTE_REF_DIRS}" ]] ||
10581045
[[ -n "${HOMEBREW_UPDATE_FORCE}" ]] ||
1059-
[[ -n "${HOMEBREW_MIGRATE_LINUXBREW_FORMULAE}" ]] ||
10601046
[[ -d "${HOMEBREW_LIBRARY}/LinkedKegs" ]] ||
10611047
[[ ! -f "${HOMEBREW_CACHE}/all_commands_list.txt" ]] ||
10621048
[[ -n "${HOMEBREW_DEVELOPER}" && -z "${HOMEBREW_UPDATE_AUTO}" ]]

Library/Homebrew/linuxbrew-core-migration.rb

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)