"git status -s" is used to detect if the repository was corrupted during
an interrupted clone, but it can leak output to the terminal, so use
quiet_system.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
ComparableSet only allows a single object of a given class,
choosing the object with the greatest value. This was mainly created
for Requirements, so that, e.g., two X11Dependencies of differing
strictness don't both end up in the same requirement set.
FixesHomebrew/homebrew#15240.
This started happening as a result of bbc167b, which avoids reloading
previously defined formulae. The exception alters its message if the
name parameter appears to be a tapped formula, but this is lost if we
only pass in the "stem" of the pathname.
Long-term this probably needs some restructuring, perhaps with a
separate exception for tapped formula, but for now this should re-enable
the more useful error message.
FixesHomebrew/homebrew#15374.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
mkpathed directories aren't really "linked" or "unlinked" per se,
and link/unlink handle directories differently. It's easier just to
ignore them, which finally synchronizes link/unlink counts.
For real this time.
This makes sure that files won't be unlinked if they resolve into
other kegs. For example: if fish and fishfish are both installed,
with fishfish linked and fish unlinked, `brew unlink fish` would
unlink some files that resolve into fishfish's keg.
A required special case since formula that use python can optionally use system python or Homebrew python. We'll probably need more of this sort of thing.
As discussed with mistym, it's not only compiled code that goes in
/usr/lib, but any types of libraries. As such, .pm was added to the
valid extensions list a while back. Unfortunately, .sh was not added,
even though configuration includes and platform function library shell
files are often put in /usr/lib as shellscript libraries. This patch
adds .sh to the list of valid library extensions.
ClosesHomebrew/homebrew#14993.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
The changes to error ouput and logging require a few more things to be
visible during installation tests.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
- Install a sitecustomize.py that is only executed for brewed
python to
- Fix the prefix, python thinks it is installed to.
(Remember, Python thinks it lives in the Cellar)
- Remove "/System/..." stuff from sys.path which caused
a lot of install trouble because setuptools has the
habbit to inject itself upfront, overwriting our distribute.
- Allow --with-poll and don't say, we didn't warn you.
- Don't need depends_on :x11 any longer. Yeah, no XQuartz!
- Add --with-brewed-openssl
- pip 1.2.1
- pip, pip-2.7, easy_install and easy_install-2.7 are installed
to prefix, such that they are directly available, even if
people have not set their PATH to include
$(brew --prefix)/share/python
- Caveats shorter and clear.
- For Xcode-only:
- Patch the distutils buildsystem to use "xcrun cc" etc.
- Teach distutils the MacOS.sdk_path (for incs and libs)
- superenv.rb add the right python include dir depending on
whether a brewed python is installed or not.
ClosesHomebrew/homebrew#15064.
Signed-off-by: Max Howell <mxcl@me.com>
It is a no-op under Ruby 1.8 but Pathname#find raises ENOENT if the
directory doesn't exist under 1.9. But we really shouldn't try to clean
a non-existent keg anyway, and FormulaInstaller will have bailed out
long before the clean step if the keg doesn't exist, so lets just not
even test this condition; the cleaner has its own tests anyway.
Alternatively we can adjust the cleaner to handle this case, but I don't
see much value in that.
n.b. with this, the tests now pass under 1.9.3 (for me), which is nice
because I often run them on that version inadvertently.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Previously we detected this by reading the first line of the file.
However, "first line" is meaningless when dealing with binary files, but
IO#readline will happily keep reading until it finds a newline
character, which can result in some unnecessarily large buffers.
Aside from the performance issue, this causes an additional problem
under Ruby 1.9: trying to match the binary string against a pattern will
raise ArgumentError (unless the binary string just happens to also be
valid UTF-8, heh).
Fix both issues: only read the first 1024 bytes, as no sane shebang will
ever be that long, and use a plain read(), which returns an ASCII
encoded string even on 1.9.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Setting $VERBOSE in the environment makes the haskell-platform build
fall down, which is surely one of the odder bugs I've run into.
See Homebrew/homebrew#15164.
Entry_#copy_metadata has a nasty bug that makes copying symlinks
across filesystems fail. This lasted all the way through 1.9.3p194
before *finally* being fixed. This backports the official fix.
FixesHomebrew/homebrew#14710.
All logs are now stored from each command executed in Formula.install.
Error output is truncated to five lines in an attempt to not overwhelm the user and to encourage users to read the error output and report the bug properly. Maybe we can get that figure up from 70% to 90%.
The Keg constructor was throwing because we were returning a relative path, and the error-handler was just returning a string rather than raising a string.
Worrying because a lot of opts have not been fixed and I thought this was essential for depending on keg-only formula nowadays.
Refs Homebrew/homebrew#15077.
We add the bins from all deps instead. Rationale: formula find and use eg. GNU-coreutils versions of things and then break. Only allow formula to use tools that they depend on and expect.
I want to go further and only add include paths etc. for dependencies, I have done some work on this, but I fear it may be impossible. If an include path is eg. /usr/local/lib/foo/include, is it possible to know if this path is bad? Not always AFAICT.
In cases where the xcode-select -print-path is '/' xcrun still hangs indefinitely, setting DEVELOPER_DIR to something (preferably the Xcode path) fixes that. So let's.