Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deprecations and cleanup #5598

Merged
merged 1 commit into from
Jan 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Library/Homebrew/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ Metrics/LineLength:
IgnoredPatterns: ['#: ']

# we won't change backward compatible predicate names
# TODO: deprecate whitelisted names and move to compat
Naming/PredicateName:
Exclude:
- 'compat/**/*'
# can't rename these
NameWhitelist: is_32_bit?, is_64_bit?

# whitelist those that are standard
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/brew.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
end

if ENV["HOMEBREW_BUILD_FROM_SOURCE"]
odeprecated("HOMEBREW_BUILD_FROM_SOURCE", "--build-from-source")
odisabled("HOMEBREW_BUILD_FROM_SOURCE", "--build-from-source")
end

if internal_cmd
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/build_environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def build_env_keys(env)
MACOSX_DEPLOYMENT_TARGET PKG_CONFIG_PATH PKG_CONFIG_LIBDIR
HOMEBREW_DEBUG HOMEBREW_MAKE_JOBS HOMEBREW_VERBOSE
HOMEBREW_SVN HOMEBREW_GIT
HOMEBREW_SDKROOT HOMEBREW_BUILD_FROM_SOURCE
HOMEBREW_SDKROOT
MAKE GIT CPP
ACLOCAL_PATH PATH CPATH
LD_LIBRARY_PATH LD_RUN_PATH LD_PRELOAD LIBRARY_PATH
Expand Down
2 changes: 0 additions & 2 deletions Library/Homebrew/cleanup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ def initialize(*args, dry_run: false, scrub: false, days: nil, cache: HOMEBREW_C

def self.install_formula_clean!(f)
return if ENV["HOMEBREW_NO_INSTALL_CLEANUP"]
return unless ENV["HOMEBREW_INSTALL_CLEANUP"]

cleanup = Cleanup.new
if cleanup.periodic_clean_due?
Expand All @@ -170,7 +169,6 @@ def self.install_formula_clean!(f)

def periodic_clean_due?
return false if ENV["HOMEBREW_NO_INSTALL_CLEANUP"]
return unless ENV["HOMEBREW_INSTALL_CLEANUP"]
return true unless PERIODIC_CLEAN_FILE.exist?

PERIODIC_CLEAN_FILE.mtime < CLEANUP_DEFAULT_DAYS.days.ago
Expand Down
4 changes: 0 additions & 4 deletions Library/Homebrew/cmd/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
#: source even if a bottle is provided. Dependencies will still be installed
#: from bottles if they are available.
#:
#: If `HOMEBREW_BUILD_FROM_SOURCE` is set, regardless of whether `--build-from-source` was
#: passed, then both <formula> and the dependencies installed as part of this process
#: are built from source even if bottles are available.
#:
#: If `--force-bottle` is passed, install from a bottle if it exists for the
#: current or newest version of macOS, even if it would not normally be used
#: for installation.
Expand Down
3 changes: 1 addition & 2 deletions Library/Homebrew/cmd/prune.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def prune_args
def prune
prune_args.parse

odeprecated("'brew prune'", "'brew cleanup'")
Cleanup.new(dry_run: args.dry_run?).prune_prefix_symlinks_and_directories
odisabled("'brew prune'", "'brew cleanup'")
end
end
6 changes: 0 additions & 6 deletions Library/Homebrew/cmd/reinstall.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
#:
#: If `--display-times` is passed, install times for each formula are printed
#: at the end of the run.
#:
#: If `HOMEBREW_INSTALL_CLEANUP` is set then remove previously installed versions
#: of upgraded <formulae> as well as the HOMEBREW_CACHE for that formula.

require "formula_installer"
require "development_tools"
Expand All @@ -23,9 +20,6 @@ def reinstall_args
`reinstall` [<option(s)>] <formula>:

Uninstall and then install <formula> (with existing install options).

If `HOMEBREW_INSTALL_CLEANUP` is set then remove previously installed versions
of upgraded <formulae> as well as the HOMEBREW_CACHE for that formula.
EOS
switch "-s", "--build-from-source",
description: "Compile the formula> from source even if a bottle is available."
Expand Down
7 changes: 2 additions & 5 deletions Library/Homebrew/cmd/upgrade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,10 @@ module Homebrew
module_function

def upgrade
# TODO: deprecate for next minor release.
if ARGV.include?("--cleanup")
ENV["HOMEBREW_INSTALL_CLEANUP"] = "1"
odeprecated("'brew upgrade --cleanup'", "'HOMEBREW_INSTALL_CLEANUP'")
odisabled("'brew upgrade --cleanup'")
elsif ENV["HOMEBREW_UPGRADE_CLEANUP"]
ENV["HOMEBREW_INSTALL_CLEANUP"] = "1"
odeprecated("'HOMEBREW_UPGRADE_CLEANUP'", "'HOMEBREW_INSTALL_CLEANUP'")
odisabled("'HOMEBREW_UPGRADE_CLEANUP'")
end

FormulaInstaller.prevent_build_flags unless DevelopmentTools.installed?
Expand Down
6 changes: 0 additions & 6 deletions Library/Homebrew/compat.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
require "compat/extend/os/mac/utils/bottles"
require "compat/os/mac"
require "compat/requirements/x11_requirement"
require "compat/requirements/xcode_requirement"
require "compat/cask"
require "compat/download_strategy"
require "compat/formula"
require "compat/tap"
21 changes: 0 additions & 21 deletions Library/Homebrew/compat/cask.rb

This file was deleted.

17 changes: 0 additions & 17 deletions Library/Homebrew/compat/cask/cache.rb

This file was deleted.

24 changes: 0 additions & 24 deletions Library/Homebrew/compat/cask/cask_loader.rb

This file was deleted.

49 changes: 0 additions & 49 deletions Library/Homebrew/compat/cask/caskroom.rb

This file was deleted.

22 changes: 0 additions & 22 deletions Library/Homebrew/compat/cask/dsl.rb

This file was deleted.