9 Commits

Author SHA1 Message Date
Jack Nagel
f222ca04fd Remove pin directory when empty 2014-06-23 22:34:41 -05:00
Jack Nagel
d9e73c9d43 Simplify picking pinned version 2014-06-21 18:32:53 -05:00
Jack Nagel
4e817eaa6c Remove FormulaPin dependency on FileUtils 2014-06-21 18:32:38 -05:00
Jack Nagel
3a0726406b Add tests for FormulaPin and simplify implementation 2013-04-16 01:58:11 -05:00
Jack Nagel
1bad199776 Avoid slow operations in FormulaPin#initialize
A FormulaPin object is created every time Formula is instantiated, so
don't do filesystem operations or Pathname concatenation eagerly.
2013-04-14 21:41:30 -05:00
Jack Nagel
b258bee44e Don't use Pathname#/ in performance-critical code
This method (well, really, #join) is *twice* as slow as simple
concatenation, and shouldn't really be used at all in non-Formula code.
2013-04-14 20:09:20 -05:00
Jack Nagel
ae9060fc54 Remove circular require 2013-04-04 10:53:01 -05:00
Simon Sigurdhsson
4cd95652ea brew-pin: Fix bug in FormulaPin#pinned?
Since `pinned?` was using `File#exists?`, broken symlinks left by force-upgraded
formulae made `pinned?` return false while `pin` returned with an error because
it could not overwrite the broken link. This is fixed by using `File#symlink?`
instead, which returns true for broken symlinks and false only when they do not
exist.

Closes Homebrew/homebrew#18858.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-31 19:27:17 +01:00
Simon Sigurdhsson
f8a88b5f28 brew-pin: prevent selected formulae from upgrade.
* Added `pin` et. al. to manpage.
* Added `brew pin` to `brew.1` * Added `brew unpin` to `brew.1`
* Added `brew list --pinned` to `brew.1`
* Added information about frozen formulae to `brew upgrade` in `brew.1`
* Added `pin` et.al. to completion scripts.
* Unpin formulae when uninstalling them
* Unpin and re-pin formulae when upgrading (avoids stale symlink)

References Homebrew/homebrew#18386.
Closes Homebrew/homebrew#18515.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-30 19:50:47 +00:00