Refusing to unlink files from another keg introduced issues when
files changed between formula versions; for instance, this
introduced issues when upgrading from gtk+ 2.24.10 to 2.24.11.
See Homebrew/homebrew#12778.
Rather than skip unlinking if there's no linked keg record, check to
see whether the destination's realpath is the same as the source file
in the keg being unlinked.
Since 3ee9b7bd88a2d9017cdf005b10567a1d6d8ec211 ("SoftwareSpec:
initialize @mirrors"), @active_spec.mirrors will always be non-nil.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Commit 3b5d7939d9a660a83e29a86e6bab234f3e9f2dcb added completion for
`brew link` options, but disabled completion of the actual command
itself.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Some programs fail where they would otherwise succeed if stdout or stderr is
closed. For example, using mpicc from the mpich2 formula:
quiet_system 'mpicc', '--version'
Fails with:
LLVM ERROR: IO failure on output stream.
While
system 'mpicc', '--version'
Succeeds.
ClosesHomebrew/homebrew#13253.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
Add an ARGV.dry_run? helper method for '--dry-run'/'-n' now that
'-n' is being used as a git-style dry-run in two commands.
ClosesHomebrew/homebrew#12898.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
`brew link` can now be made to delete any conflicting files using
the --force argument. It also has a --dry-run option, similar to
git clean -n, which will list any files which would be deleted
without touching the filesystem.
ClosesHomebrew/homebrew#11811.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
SDK/usr/include and lib now appended instead of prepended.
Prepending overwrote our precedence of HOMEBREW_PREFIX/include and lib.
ClosesHomebrew/homebrew#13292.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
When the first error pipe object is finalized, the underlying file
descriptor is closed, breaking the pipe between the build script and the
main Homebrew process. Keep a reference to this object so it isn't
closed.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
In 1.8, Pathname.find would work (and do nothing) if the
source path didn't exist. In 1.9 this throws an exception
instead, so check whether the file exists before trying.
Pathname is one of the basic building block classes in Homebrew, and as
such it is preferrable that `require`ing it does not drag in other
Homebrew code; thus avoiding circular dependency situations. Its
dependency on bottles.rb gave it an implicit dependency on formula.rb,
among other things.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Tools like `brew create` need to create and manipulate SoftwareSpec
objects. It is useful to be able to do this directly, rather than by
proxy through the special methods that serve the main formula DSL.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>