From da56a4502597a7ea6380e9443ecb70411d59650b Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 10 Oct 2014 13:06:50 -0500 Subject: [PATCH] Prefer current CLT package ID It seems that "com.apple.pkg.CLTools_Base" was only used for one release. New releases are using "com.apple.pkg.CLTools_Executables" again. Fixes Homebrew/homebrew#33063. --- Library/Homebrew/os/mac/xcode.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 5cf40277d5..f24d36e6f9 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -149,8 +149,7 @@ module OS STANDALONE_PKG_ID = "com.apple.pkg.DeveloperToolsCLILeo" FROM_XCODE_PKG_ID = "com.apple.pkg.DeveloperToolsCLI" MAVERICKS_PKG_ID = "com.apple.pkg.CLTools_Executables" - # Used for Yosemite and Mavericks CLT since June 2014. - MAVERICKS_NEW_PKG_ID = "com.apple.pkg.CLTools_Base" + MAVERICKS_NEW_PKG_ID = "com.apple.pkg.CLTools_Base" # obsolete MAVERICKS_PKG_PATH = "/Library/Developer/CommandLineTools" # Returns true even if outdated tools are installed, e.g. @@ -187,7 +186,7 @@ module OS end def detect_version - [MAVERICKS_NEW_PKG_ID, MAVERICKS_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID].find do |id| + [MAVERICKS_PKG_ID, MAVERICKS_NEW_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID].find do |id| version = MacOS.pkgutil_info(id)[/version: (.+)$/, 1] return version if version end