From 31dea3b80035bc73db50d8dccf6d9a95ed7a9c99 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 24 Nov 2010 09:40:37 +0000 Subject: [PATCH] Add changes to Homebrew internals for bottling. --- Library/Homebrew/download_strategy.rb | 14 +++++++- Library/Homebrew/extend/ARGV.rb | 9 +++++ Library/Homebrew/formula.rb | 47 ++++++++++++++++++++++----- Library/Homebrew/install.rb | 6 ++-- 4 files changed, 63 insertions(+), 13 deletions(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 772a3d40c4..ea25eafbb5 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -60,7 +60,7 @@ class CurlDownloadStrategy < AbstractDownloadStrategy raise end else - puts "File already downloaded and cached to #{HOMEBREW_CACHE}" + puts "File already downloaded in #{File.dirname(@tarball_path)}" end return @tarball_path # thus performs checksum verification end @@ -160,6 +160,18 @@ class CurlUnsafeDownloadStrategy < CurlDownloadStrategy end end +# This strategy extracts our binary packages. +class CurlBottleDownloadStrategy filename rescue nil (f.prefix+file).chmod 0644 rescue nil end - build_time = Time.now-beginning + build_time = Time.now-beginning if not f.pouring end end rescue Exception @@ -131,7 +131,7 @@ def install f begin require 'cleaner' - Cleaner.new f + Cleaner.new f if not f.pouring rescue Exception => e opoo "The cleaning step did not complete successfully" puts "Still, the installation was successful, so we will link it into your prefix"