From f6bc7dc4c61f5fb34709da62eb68cfad74f9fd91 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Sat, 14 Oct 2017 04:17:03 +0100 Subject: [PATCH 01/13] search: pass explicit sort to handle APFS --- Library/Homebrew/cmd/search.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb index c01a11c104..d0f85a858c 100644 --- a/Library/Homebrew/cmd/search.rb +++ b/Library/Homebrew/cmd/search.rb @@ -24,7 +24,7 @@ module Homebrew def search if ARGV.empty? - puts Formatter.columns(Formula.full_names) + puts Formatter.columns(Formula.full_names.sort) elsif ARGV.include? "--macports" exec_browser "https://www.macports.org/ports.php?by=name&substr=#{ARGV.next}" elsif ARGV.include? "--fink" @@ -52,15 +52,15 @@ module Homebrew results = search_taps(name) end - puts Formatter.columns(results) unless results.empty? + puts Formatter.columns(results.sort) unless results.empty? else query = ARGV.first regex = query_regexp(query) local_results = search_formulae(regex) - puts Formatter.columns(local_results) unless local_results.empty? + puts Formatter.columns(local_results.sort) unless local_results.empty? tap_results = search_taps(query) - puts Formatter.columns(tap_results) unless tap_results.empty? + puts Formatter.columns(tap_results.sort) unless tap_results.empty? if $stdout.tty? count = local_results.length + tap_results.length From 60eb7c6216c389aa1968adee5bad04e12f8d8214 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Sat, 14 Oct 2017 04:17:48 +0100 Subject: [PATCH 02/13] uses: pass explicit sort to handle APFS --- Library/Homebrew/cmd/uses.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/uses.rb b/Library/Homebrew/cmd/uses.rb index 0b09e1bf19..1688899f9d 100644 --- a/Library/Homebrew/cmd/uses.rb +++ b/Library/Homebrew/cmd/uses.rb @@ -125,7 +125,7 @@ module Homebrew end return if uses.empty? - puts Formatter.columns(uses.map(&:full_name)) + puts Formatter.columns(uses.map(&:full_name).sort) odie "Missing formulae should not have dependents!" if used_formulae_missing end end From ca69d654564246cf4db326dfb905ab02f32828b9 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Sat, 14 Oct 2017 04:22:22 +0100 Subject: [PATCH 03/13] update-report: pass explicit sort to handle APFS --- Library/Homebrew/cmd/update-report.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index 0974df0b41..e3d3c10bb9 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -598,7 +598,7 @@ class ReporterHub return if formulae.empty? # Dump formula list. ohai title - puts Formatter.columns(formulae) + puts Formatter.columns(formulae.sort) end def installed?(formula) From e308df25a9af0e84172448f03a91892a98c92b8a Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Sat, 14 Oct 2017 04:24:10 +0100 Subject: [PATCH 04/13] commands: pass explicit sort to handle APFS --- Library/Homebrew/cmd/commands.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/commands.rb b/Library/Homebrew/cmd/commands.rb index addccd6097..a3527bc94c 100644 --- a/Library/Homebrew/cmd/commands.rb +++ b/Library/Homebrew/cmd/commands.rb @@ -16,12 +16,12 @@ module Homebrew else # Find commands in Homebrew/cmd puts "Built-in commands" - puts Formatter.columns(internal_commands) + puts Formatter.columns(internal_commands.sort) # Find commands in Homebrew/dev-cmd puts puts "Built-in developer commands" - puts Formatter.columns(internal_developer_commands) + puts Formatter.columns(internal_developer_commands.sort) # Find commands in the path unless (exts = external_commands).empty? From 35fae7ce6ab9a8bb0bde731b294771166ed9bdef Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Sat, 14 Oct 2017 05:47:17 +0100 Subject: [PATCH 05/13] tap-info: pass explicit sort to handle APFS --- Library/Homebrew/cmd/tap-info.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/tap-info.rb b/Library/Homebrew/cmd/tap-info.rb index cb0e0b387e..d01ce8a027 100644 --- a/Library/Homebrew/cmd/tap-info.rb +++ b/Library/Homebrew/cmd/tap-info.rb @@ -21,10 +21,11 @@ module Homebrew module_function def tap_info + # TODO: This still returns a non-alphabetised list on APFS. if ARGV.include? "--installed" taps = Tap else - taps = ARGV.named.map do |name| + taps = ARGV.named.sort.map do |name| Tap.fetch(name) end end From e98d0fda86719794fd35f42b25a22fad408fd7ef Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Sat, 14 Oct 2017 06:13:40 +0100 Subject: [PATCH 06/13] tap: pass explicit sort to handle APFS --- Library/Homebrew/tap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index 78dc4cf4e7..4b3cfc38ab 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -494,7 +494,7 @@ class Tap # an array of all installed {Tap} names. def self.names - map(&:name) + map(&:name).sort end # @private From 7b8ba77ed26f84aacc1648eeb78b6d9964adfda2 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Sat, 14 Oct 2017 06:18:09 +0100 Subject: [PATCH 07/13] missing: pass explicit sort to handle APFS --- Library/Homebrew/cmd/missing.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/missing.rb b/Library/Homebrew/cmd/missing.rb index 8a1dc506df..707ad68345 100644 --- a/Library/Homebrew/cmd/missing.rb +++ b/Library/Homebrew/cmd/missing.rb @@ -16,9 +16,9 @@ module Homebrew return unless HOMEBREW_CELLAR.exist? ff = if ARGV.named.empty? - Formula.installed + Formula.installed.sort else - ARGV.resolved_formulae + ARGV.resolved_formulae.sort end ff.each do |f| From 795c7170e3e8135557b91e477e48cde98a714643 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Sat, 14 Oct 2017 06:18:49 +0100 Subject: [PATCH 08/13] leaves: pass explicit sort to handle APFS --- Library/Homebrew/cmd/leaves.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/leaves.rb b/Library/Homebrew/cmd/leaves.rb index 4038aee4c3..574ceb64ed 100644 --- a/Library/Homebrew/cmd/leaves.rb +++ b/Library/Homebrew/cmd/leaves.rb @@ -9,7 +9,7 @@ module Homebrew module_function def leaves - installed = Formula.installed + installed = Formula.installed.sort deps_of_installed = Set.new installed.each do |f| From 16ea29a641f1672baa1fead658de2b0ad4f308b2 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Sat, 14 Oct 2017 06:23:18 +0100 Subject: [PATCH 09/13] diagnostic: pass explicit sort to handle APFS --- Library/Homebrew/diagnostic.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index 3edf31012f..baf04e332a 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -804,7 +804,7 @@ module Homebrew def check_for_linked_keg_only_brews return unless HOMEBREW_CELLAR.exist? - linked = Formula.installed.select do |f| + linked = Formula.installed.sort.select do |f| f.keg_only? && __check_linked_brew(f) end return if linked.empty? From d9074b80b7617e73084a55d8318da3fb67641bbf Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Sat, 14 Oct 2017 06:25:31 +0100 Subject: [PATCH 10/13] options: pass explicit sort to handle APFS --- Library/Homebrew/cmd/options.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/options.rb b/Library/Homebrew/cmd/options.rb index 843d3a1ee8..6bb6afafe9 100644 --- a/Library/Homebrew/cmd/options.rb +++ b/Library/Homebrew/cmd/options.rb @@ -16,9 +16,9 @@ module Homebrew def options if ARGV.include? "--all" - puts_options Formula.to_a + puts_options Formula.to_a.sort elsif ARGV.include? "--installed" - puts_options Formula.installed + puts_options Formula.installed.sort else raise FormulaUnspecifiedError if ARGV.named.empty? puts_options ARGV.formulae From f1b183b287f7b3d94d5cc5093581fe8c1de8be9d Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Sat, 14 Oct 2017 06:33:06 +0100 Subject: [PATCH 11/13] list: pass explicit sort to handle APFS --- Library/Homebrew/cmd/list.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/list.rb b/Library/Homebrew/cmd/list.rb index 436fc1f976..263f33564f 100644 --- a/Library/Homebrew/cmd/list.rb +++ b/Library/Homebrew/cmd/list.rb @@ -87,7 +87,7 @@ module Homebrew dirs.delete "etc" dirs.delete "var" - args = dirs + %w[-type f (] + args = dirs.sort + %w[-type f (] args.concat UNBREWED_EXCLUDE_FILES.flat_map { |f| %W[! -name #{f}] } args.concat UNBREWED_EXCLUDE_PATHS.flat_map { |d| %W[! -path #{d}] } args.concat %w[)] From c9684c372754ae1e1335ccf27eda128079ff65d0 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Sat, 14 Oct 2017 06:42:53 +0100 Subject: [PATCH 12/13] deps: pass explicit sort to handle APFS --- Library/Homebrew/cmd/deps.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/cmd/deps.rb b/Library/Homebrew/cmd/deps.rb index de7aa4a512..ae758e1433 100644 --- a/Library/Homebrew/cmd/deps.rb +++ b/Library/Homebrew/cmd/deps.rb @@ -68,16 +68,16 @@ module Homebrew if mode.tree? if mode.installed? - puts_deps_tree Formula.installed, !ARGV.one? + puts_deps_tree Formula.installed.sort, !ARGV.one? else raise FormulaUnspecifiedError if ARGV.named.empty? puts_deps_tree ARGV.formulae, !ARGV.one? end elsif mode.all? - puts_deps Formula + puts_deps Formula.sort elsif ARGV.named.empty? raise FormulaUnspecifiedError unless mode.installed? - puts_deps Formula.installed + puts_deps Formula.installed.sort elsif mode.for_each? puts_deps ARGV.formulae else From 9a323c51078ee9c900fda3ee6b88d1c1e3b26b8f Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Sat, 14 Oct 2017 06:44:30 +0100 Subject: [PATCH 13/13] info: pass explicit sort to handle APFS --- Library/Homebrew/cmd/info.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index 5eb0337066..6ee24a7fab 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -67,9 +67,9 @@ module Homebrew def print_json ff = if ARGV.include? "--all" - Formula + Formula.sort elsif ARGV.include? "--installed" - Formula.installed + Formula.installed.sort else ARGV.formulae end