4907 Commits

Author SHA1 Message Date
Jack Nagel
d33f60815c test: improve "formula not installed" error text
Closes Homebrew/homebrew#11779.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-20 14:00:09 -05:00
Jack Nagel
472322af24 Don't attempt to walk nonexistent directories
Fixes Homebrew/homebrew#11298.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-17 17:10:47 -05:00
Maurice Kelly
3ab2cc62e2 info: handle git:// URLs in origin remote
The URL being constructed is only able to extract the correct username
when git@ or https:// URLs are found as the origin remote. This change
allows git:// to be used as well.

Signed-off-by: Maurice Kelly <osv-github@chatswood.org.uk>

Closes Homebrew/homebrew#11670.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-15 14:41:41 -05:00
Jack Nagel
801d8b2bfd deps: fix --tree for new deps
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-11 18:24:46 -05:00
Misty De Meo
4dc1a7bdce brew doctor: add check for outdated compilers
A common source of build problems on Xcode 4.3+ is outdated compilers,
usually when a user has installed over top of an old version and hasn't
installed the CLT. Since the compilers from the previous Xcode are still
around, brew doctor wouldn't complain.

This adds a hash containing a list of the canonical compiler versions
for supported versions of Xcode, and adds a check against that to determine
whether a given installation has any compilers which are out of date.

Closes Homebrew/homebrew#11518.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-04-11 10:08:46 -05:00
Misty De Meo
c134ba6c4a doctor: be specific about libiconv files detected
Closes Homebrew/homebrew#11417.
2012-04-09 13:19:42 -05:00
Misty De Meo
c9fd1b9bf0 doctor: skip Cellar checks if Cellar doesn't exist
Attempting to call certain methods on the Cellar before it exists,
such as realpath, would cause brew doctor to throw unnecessary "file
does not exist" errors. This was fixed once before, but new tests
have been added since without the appropriate checks.
cf. 0d28bc78d71590c8e8a5961d8d10e3d7d9b8822d

Fixes Homebrew/homebrew#5188 (again).
2012-04-08 15:50:16 -05:00
Jack Nagel
d2c9b27e14 info: output correct URL for tapped dupes
Tapped formulae that dupe those in core now display the correct URL when
invoked like `brew info homebrew/dupes/openssl`.

This also fixes the broken `brew info` test.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-06 23:54:41 -05:00
Max Howell
5d3c65f68e Use GitHub API 3 in brew search 2012-04-05 13:06:36 -04:00
Rory O’Kane
c2ca1773c5 doctor: fix typos
Closes Homebrew/homebrew#11418.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-03 16:21:01 -05:00
Jack Nagel
227ee505b0 fetch: don't display cached location twice
The download strategy will print the cached location if we've already
fetched it, so avoid printing redundant information.

Also just "puts" it instead of using a second `ohai` line.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-02 21:04:30 -05:00
Mike McQuaid
a947064994 Version bottles. 2012-04-03 11:43:41 +10:00
Jack Nagel
49b0b3903f info: always indicate if a keg is linked
We mark the linked keg with an asterisk when multiple kegs exist, but
not when there is only a single keg. Start marking even in this case,
giving consistent behavior and a reliable indicate of the link status.

Fixes Homebrew/homebrew#11300.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-29 21:30:13 -05:00
Mike McQuaid
0cbdeeaa3c Exit with bad exit code on command failures. 2012-03-29 18:44:37 +11:00
Mike McQuaid
61444ee3a6 brew-bottle doesn't need to specify filenames now. 2012-03-29 18:41:47 +11:00
Max Howell
05c140e2e4 Search Homebrew/games 2012-03-25 11:06:28 +01:00
Jack Nagel
0aea8d39e6 Fix typo in --config.rb
Closes Homebrew/homebrew#11183.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-24 12:11:37 -05:00
Jack Nagel
8c4e7ca5b5 Parse raw diff output in brew update
Using each_cons() "works", but to report all changes correctly we need
to look at the last elements even after we've looked at the last 3
consecutive elements.

Instead, let's parse each line of the raw diff output using a regexp.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-23 20:39:24 -05:00
Jack Nagel
1bc6313694 Pass the tab to FormulaInstaller
Callers of FormulaInstaller now usually unlink the existing keg prior to
running the installer. However, Tab.for_formula uses the LinkedKeg
record to obtain the tab.

Since we need the tab to persist install options across upgrades, we
must start creating the Tab object before unlinking the old keg and
passing it to the FormulaInstaller.

Fixes Homebrew/homebrew#11086.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-23 13:05:08 -05:00
Jack Nagel
9076037a0d Detect and display renames in brew update
Renamed formulae will cease to display as an add/delete pair and instead
end up the in the "Renamed" section. In the future we should be able to
take this information and use it to rename existing kegs during updates,
allowing us to rename formulae without breaking upgrades.

Renaming a formula requires renaming the class, so there will be at
least one add/delete pair in the file. Thus, the similarity threshold
for detecting renames is set at 85% to allow a little bit of content
turnover without losing track of the rename.

Closes Homebrew/homebrew#11158.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-22 22:15:57 -05:00
Jack Nagel
10f8443f8a Use --verify when querying HEAD
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-22 22:15:57 -05:00
Max Howell
bb8d92c3cf Check tapped before trying to untap
If the tap-formula wasn't symlinked for some reason, don't throw an exception—the job is already done.
2012-03-23 00:16:08 +00:00
Adam Vandenberg
23664db4d7 brew doctor: check for trailing slashes in path
Having path directories with trailing slashes can cause other false
warnings.

Closes Homebrew/homebrew#9986.
2012-03-21 22:03:21 -07:00
Jack Nagel
76c86d1ac8 Update missing Xcode advice
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-21 12:47:51 -05:00
Adam Vandenberg
a161058bcd brew fetch: show downloaded path 2012-03-21 09:09:11 -07:00
Jack Nagel
fa837edcbb Update Xcode version checks
Closes Homebrew/homebrew#11044.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-20 19:06:59 -05:00
Jack Nagel
ed83fa609b Remove broken puts from verbose brew link
The print wrapper which has its own `puts` broke this line; though with
the changes to `link` it isn't necessary any longer, so just remove it.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-20 11:24:35 -05:00
Max Howell
17bdfb1d38 Don't query online for plain brew search 2012-03-20 16:03:27 +00:00
Adam Vandenberg
9c28138889 audit: add tests for patches 2012-03-19 18:50:17 -07:00
Max Howell
9ab1df5b68 If no formula but multiple kegs, advise resolution
In this case the user will simply have to delete all but one keg in order to use the command that uses ARGV.kegs.

Refs Homebrew/homebrew#11050.
2012-03-19 14:17:50 +00:00
Max Howell
88118b51b2 Don't error if exact link already exists
If the link already exists exactly (well almost exactly) as we are about to correct it, then it's okay. Otherwise we error out. This is a safe choice, and really, the correct choice too.

This will prevent the tickets like Homebrew/homebrew#11050 from occurring.
2012-03-19 12:24:13 +00:00
Max Howell
c3370c48ce Better error when linking fails
Refs http://stackoverflow.com/questions/9762943

The system ln no longer outputs anything. Though the user can force its output with a --verbose of course. So in cases where it's not the usual of: not writable or existing file, we can ask the user to run with --verbose. I don't particularly like hiding its output, but it just confused the error IMO since it is creating a relative symlink the output was weird every time I've seen it in tickets.

I made a print wrapper so that the brew-link output doesn't get mucked up if an exception is thrown.
2012-03-19 00:28:38 +00:00
Mike McQuaid
64457b2315 Remove reliance of bottle DSL on EOCLASS. 2012-03-18 20:38:18 +13:00
Mike McQuaid
23b84ef732 Set MACOS_VERSION as 0 on non-OSX platforms. 2012-03-18 15:43:39 +13:00
Mike McQuaid
d47cf55f68 Use fetch for downloading bottles.
Fixes Homebrew/homebrew#10958.
2012-03-18 15:16:57 +13:00
Max Howell
059727a9e8 Downcase when checking if no tap search needed 2012-03-18 02:03:19 +00:00
Max Howell
aeb9440b90 Special case "Homebrew" in brew-search
Again, "Homebrew" is changed to "homebrew" before rendering to the user.
2012-03-18 01:51:36 +00:00
Max Howell
ceeb768c84 Special case Homebrew organization taps
We allow homebrew/dupes for instance, rather than Homebrew/dupes. Because nobody likes shifting in the terminal.

In the process of doing this I discovered some case-insensitive filesystem bugs we have avoided before because I had the foresight to mandate lowercase in formula names. GitHub considers Homebrew and homebrew to be different (even though you can't create both). So we had to allow case insensitivity in tap input. I have made it now so the resulting directory however is lowercased, neatly avoiding the issue. And so we also downcase tap arguments when applying them to tap directories or formula.
2012-03-18 01:45:26 +00:00
Max Howell
c346ebd948 Add brew/versions and brew/dupes to search 2012-03-18 01:23:15 +00:00
Max Howell
88604e1bb1 Handle when formula are deleted from taps
The symlinks in Formula must be updated.
2012-03-18 01:23:01 +00:00
Max Howell
d388c43863 Generalise the untap step so we can add to update
brew-update needs to be able to unsymlink removed stuff from taps too.
2012-03-18 01:14:00 +00:00
Max Howell
21bddc7972 Make the tapping already there step actually work
For when the symlink for a tap already exists and points to the thing we are about to symlink. This can happen, mostly because my code has sucked, but since the filesystem can be edited by the user at whim, it's possible then too.
2012-03-18 01:14:00 +00:00
Max Howell
d01e9a8fd7 Don't warn about .DS_Store
Fixes Homebrew/homebrew#11018.
2012-03-18 00:16:09 +00:00
Adam Vandenberg
1cdd35b7e8 doctor: check OS version
We warn if you are not running the latest Leopard or Snow Leopard.
(We do not currently check Lion or Mountain Lion versions.)
2012-03-17 11:56:32 -07:00
Jack Nagel
672128c908 bsdmake is a build-time dep
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-17 11:16:45 -05:00
Adam Vandenberg
8f47bdb782 audit: check for install options being shadowed 2012-03-17 08:46:04 -07:00
Adam Vandenberg
5141c9cadd Add brew uses --recursive
Closes Homebrew/homebrew#8870.
2012-03-16 22:00:59 -07:00
Max Howell
5c2837c18c Report correct conflicting tap
Fixes:

$ brew tap adamv/alt
...blah blah blah..
$ brew tap josegonzalez/php
...blah blah blah...
Warning: Could not tap josegonzalez/php/php over mxcl/master/php

Where it should be "over adamv/alt/php".
2012-03-17 01:24:03 +00:00
Max Howell
ab01c1e357 Plain brew tap doesn't error if no Library/Taps
Fixes Homebrew/homebrew#10994.
2012-03-17 00:04:43 +00:00
Max Howell
4d53e2f169 brew search will search taps we decide are core
This means `brew search` always does some network operations. Which is a shame, but I think (for brew) fine. Probably the no-connectivity handling needs to be improved.
2012-03-16 22:37:11 +00:00