diff options
| author | Max Howell | 2009-08-10 11:45:25 +0100 |
|---|---|---|
| committer | Max Howell | 2009-08-10 18:12:16 +0100 |
| commit | ce16f44d3fdf26f23949dc74a7a0e0e5d3b4fe0b (patch) | |
| tree | 26d0c5eece16e2b9e9fe92ebebcbc9d6147eab1d | |
| parent | af21407fec7f7dd37b43a0734c9ab5e55872c1e5 (diff) | |
| download | homebrew-ce16f44d3fdf26f23949dc74a7a0e0e5d3b4fe0b.tar.bz2 | |
Allow skip_clean? to skip entire directories
Speeds up Python formula plenty in clean phase
| -rw-r--r-- | Library/Formula/python.rb | 3 | ||||
| -rw-r--r-- | Library/Homebrew/brew.h.rb | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb index 6118ad716..d1d058644 100644 --- a/Library/Formula/python.rb +++ b/Library/Formula/python.rb @@ -11,7 +11,8 @@ class Python <Formula end def skip_clean? path - return path == bin+'python' or path == bin+'python2.6' + path == bin+'python' or path == bin+'python2.6' or # if you strip these, it can't load modules + path == lib+'python2.6' # save a lot of time end def install diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb index 842439a8c..f3dee102a 100644 --- a/Library/Homebrew/brew.h.rb +++ b/Library/Homebrew/brew.h.rb @@ -238,7 +238,9 @@ private def clean_dir d d.find do |path| - if not path.file? + if path.directory? + Find.prune if @f.skip_clean? path + elsif not path.file? next elsif path.extname == '.la' and not @f.skip_clean? path # *.la files are stupid |
