The symlinks taps write to Formula show up in git status, but this trick prevents this. brew-(un)tap maintain a .gitignore in Formula that contains all the symlinks brew-tap creates.
We add the .gitignore to the root .gitignore and TADA! Magic.
I wanted to make it possible to not do the additional newline (in brew) if this code path is hit. But I didn't see a way to do it without overriding the Interrupt exception and throwing a new one.
“Never add more code than necessary for aesthetics in error handling.” — mxcl
Except for keg-only reps of course.
I suspect quite a few bug reports we receive are due to this sort of thing.
Ideally we'd not do this check for deps, since they have already been checked. I fear some weird consequences. But this check *should* be done before unlinking the previously installed brew in the case of upgrades. And the ignore_deps flag is set after the initialiser. There are ways round this but the code would be less nice.
Commit ee2c3ab ("Remove spurious libiconv dependencies") pruned all
existing "depends_on 'libiconv'" usages from Homebrew in preparation for
removing the libiconv dupe itself.
Now that is done, and we can remove and blacklist it. It can be obtained
from Homebrew-alt.
ClosesHomebrew/homebrew#10464.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
We don't penalise existing users; if ~/Library/Caches/Homebrew already exists and is writable, we select that.
This is the correct choice, the cache should be the same directory whichever user is used and whatever instance of brew is invoked.
The Cache directory is set to 0777 this allows any user to write to it and fixesHomebrew/homebrew#10857.
ed1a674c ("keg: allow selective linking at the file level") had a
regression which caused the link step to skip files with the same name
as a directory in the user's CWD.
Keg#link_dir yields a relative pathname, so assumptions cannot be made
about the nature of that pathname in the block.
Instead, introduce ":skip_dir" and ":skip_file" to replace the existing
":skip" directive. This way, we won't skip things marked ":skip_dir"
when linking a file, and vice-versa.
FixesHomebrew/homebrew#10860.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Homebrew itself is found under HOMEBREW_REPOSITORY,
which *may* be the same HOMEBREW_PREFIX, but does not have
to be if you link brew into /usr/local/bin from another location.
GFortran chokes when it is passed CPU flags specific to Clang. This change
ensures the environment variables `FCFLAGS` and `FFLAGS` contain the same CPU
flags that would be set for the GCC compiler.
FixesHomebrew/homebrew#10424.
FixesHomebrew/homebrew#10744.
ClosesHomebrew/homebrew#10774.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
All logic has been copied into a new method `set_cpu_flags` that accepts an
additional argument, `flags`, which contains a list of environment variables
for which the CPU flags are to be adjusted.
`set_cpu_cflags` now recalls `set_cpu_flags` and passes `cflags_flags` as the
first argument.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
`ENV` methods that modify environment variables, `prepend`, `append` and
`remove`, can now accept lists of flags as well as a single flag.
The list of flags affected by `append_to_cflags` and `remove_from_cflags` are
now definied in a shortcut method `cc_flag_vars`.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
Even though we now prevent linking of this file into the prefix in
Keg#link, its presence still triggers a "non-lib in lib" warning during
installation. So keep cleaning it, and leave the check in Keg#link so
things that skip_clean 'lib' still won't have it linked.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This still isn't perfect, but it will handle hyphens in formula-names better now. A proper solution is not easy or maybe even possible unless we ban hyphens in versions AND formula names, or use a different character as a separate in downloaded cache files which we then ban from formula-name and version strings.
Refs Homebrew/homebrew#2923.