From fdb18b8916f0a668360d5f55a9f841e75a6d6449 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 2 Apr 2019 08:18:30 +0100 Subject: [PATCH 1/2] brew install --ignore-dependencies: unsupported, developer flag. People are using this instead of adjusting their PATH. --- Library/Homebrew/cmd/install.rb | 15 +++++++++++++-- docs/Manpage.md | 2 +- manpages/brew-cask.1 | 2 +- manpages/brew.1 | 4 ++-- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 44895b3fe4..11452715aa 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -32,8 +32,10 @@ module Homebrew "If `super` is passed, use superenv even if the formula specifies the "\ "standard build environment." switch "--ignore-dependencies", - description: "Skip installing any dependencies of any kind. If they are not already "\ - "present, the formula will probably fail to install." + description: "An unsupported Homebrew development flag to skip installing any dependencies of "\ + "any kind. If the dependencies are not already present, the formula will have issues. "\ + "If you're not developing Homebrew, consider adjusting your PATH rather than "\ + "using this flag." switch "--only-dependencies", description: "Install the dependencies with specified options but do not install the "\ "specified formula." @@ -92,6 +94,15 @@ module Homebrew install_args.parse raise FormulaUnspecifiedError if args.remaining.empty? + if args.ignore_dependencies? + opoo <<~EOS + #{Tty.bold}--ignore-dependencies is an unsupported Homebrew developer flag!#{Tty.reset} + Adjust your PATH to put any preferred versions of applications earlier in the + PATH rather than using this unsupported flag! + + EOS + end + unless args.force? ARGV.named.each do |name| next if File.exist?(name) diff --git a/docs/Manpage.md b/docs/Manpage.md index a47c0784ef..4cd5da9b75 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -229,7 +229,7 @@ installed formulae or, every 30 days, for all formulae. * `--env`: If `std` is passed, use the standard build environment instead of superenv.If `super` is passed, use superenv even if the formula specifies the standard build environment. * `--ignore-dependencies`: - Skip installing any dependencies of any kind. If they are not already present, the formula will probably fail to install. + An unsupported Homebrew development flag to skip installing any dependencies of any kind. If the dependencies are not already present, the formula will have issues. If you're not developing Homebrew, consider adjusting your PATH rather than using this flag. * `--only-dependencies`: Install the dependencies with specified options but do not install the specified formula. * `--cc`: diff --git a/manpages/brew-cask.1 b/manpages/brew-cask.1 index 30fde11c4f..d34358b377 100644 --- a/manpages/brew-cask.1 +++ b/manpages/brew-cask.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BREW\-CASK" "1" "March 2019" "Homebrew" "brew-cask" +.TH "BREW\-CASK" "1" "April 2019" "Homebrew" "brew-cask" . .SH "NAME" \fBbrew\-cask\fR \- a friendly binary installer for macOS diff --git a/manpages/brew.1 b/manpages/brew.1 index 0816a4624f..b6d361d3fb 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "BREW" "1" "March 2019" "Homebrew" "brew" +.TH "BREW" "1" "April 2019" "Homebrew" "brew" . .SH "NAME" \fBbrew\fR \- The missing package manager for macOS @@ -279,7 +279,7 @@ If \fBstd\fR is passed, use the standard build environment instead of superenv\. . .TP \fB\-\-ignore\-dependencies\fR -Skip installing any dependencies of any kind\. If they are not already present, the formula will probably fail to install\. +An unsupported Homebrew development flag to skip installing any dependencies of any kind\. If the dependencies are not already present, the formula will have issues\. If you\'re not developing Homebrew, consider adjusting your PATH rather than using this flag\. . .TP \fB\-\-only\-dependencies\fR From 6987fb4d05c611331e760715d8399bd21edc8d1d Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 2 Apr 2019 08:20:11 +0100 Subject: [PATCH 2/2] upgrade: make clear formula options are used (not install options). --- Library/Homebrew/cmd/upgrade.rb | 2 +- docs/Manpage.md | 2 +- manpages/brew.1 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb index 34ef98199f..55e68dfff2 100644 --- a/Library/Homebrew/cmd/upgrade.rb +++ b/Library/Homebrew/cmd/upgrade.rb @@ -14,7 +14,7 @@ module Homebrew usage_banner <<~EOS `upgrade` [] - Upgrade outdated, unpinned brews (with existing and any appended install options). + Upgrade outdated, unpinned formulae (with existing and any appended brew formula options). If are given, upgrade only the specified brews (unless they are pinned; see `pin`, `unpin`). diff --git a/docs/Manpage.md b/docs/Manpage.md index 4cd5da9b75..c56ed90b61 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -545,7 +545,7 @@ Fetches and resets Homebrew and all tap repositories (or any specified `reposito ### `upgrade` [*`options`*] *`formula`* -Upgrade outdated, unpinned brews (with existing and any appended install +Upgrade outdated, unpinned formulae (with existing and any appended brew formula options). If *`formula`* are given, upgrade only the specified brews (unless they are diff --git a/manpages/brew.1 b/manpages/brew.1 index b6d361d3fb..c9c9113abf 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -664,7 +664,7 @@ Fetch the newest version of Homebrew and all formulae from GitHub using \fBgit\f Fetches and resets Homebrew and all tap repositories (or any specified \fBrepository\fR) using \fBgit\fR(1) to their latest \fBorigin/master\fR\. Note this will destroy all your uncommitted or committed changes\. . .SS "\fBupgrade\fR [\fIoptions\fR] \fIformula\fR" -Upgrade outdated, unpinned brews (with existing and any appended install options)\. +Upgrade outdated, unpinned formulae (with existing and any appended brew formula options)\. . .P If \fIformula\fR are given, upgrade only the specified brews (unless they are pinned; see \fBpin\fR, \fBunpin\fR)\.