Commit Graph
405 Commits
Author SHA1 Message Date
Maurice Kelly 119f18600b 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 #11670.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-15 14:41:41 -05:00
Jack Nagel e3c0a504f2 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 7b1ad6e799 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 #11518.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-04-11 10:08:46 -05:00
Misty De Meo 31f582a29e doctor: be specific about libiconv files detected
Closes #11417.
2012-04-09 13:19:42 -05:00
Misty De Meo da51cc5321 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. 0d28bc78d7

Fixes #5188 (again).
2012-04-08 15:50:16 -05:00
Jack Nagel ddfbaab578 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 4f16573afa Use GitHub API 3 in brew search 2012-04-05 13:06:36 -04:00
Rory O’Kane f00c90b552 doctor: fix typos
Closes #11418.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-03 16:21:01 -05:00
Jack Nagel f66238ba13 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 e827884e04 Version bottles. 2012-04-03 11:43:41 +10:00
Jack Nagel c7d9a09a96 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 #11300.

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

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-24 12:11:37 -05:00
Jack Nagel ba85e7563e 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 f8fefcc51e 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 #11086.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-23 13:05:08 -05:00
Jack Nagel 40599c3ed5 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 #11158.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-22 22:15:57 -05:00
Jack Nagel a58497368b Use --verify when querying HEAD
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-22 22:15:57 -05:00
Max Howell 131e19a019 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 6a6e76e2cb brew doctor: check for trailing slashes in path
Having path directories with trailing slashes can cause other false
warnings.

Closes #9986.
2012-03-21 22:03:21 -07:00
Jack Nagel 0e9eb9e17e Update missing Xcode advice
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-21 12:47:51 -05:00
Adam Vandenberg e307054cf8 brew fetch: show downloaded path 2012-03-21 09:09:11 -07:00
Jack Nagel 5a8c2af99b Update Xcode version checks
Closes #11044.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-20 19:06:59 -05:00
Jack Nagel dcdc678920 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 da917ed466 Don't query online for plain brew search 2012-03-20 16:03:27 +00:00
Adam Vandenberg edc8d46506 audit: add tests for patches 2012-03-19 18:50:17 -07:00
Max Howell 14fc553ac7 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 #11050.
2012-03-19 14:17:50 +00:00
Max Howell 45710770a3 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 #11050 from occurring.
2012-03-19 12:24:13 +00:00
Max Howell ce082c167c 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 1b71544892 Remove reliance of bottle DSL on EOCLASS. 2012-03-18 20:38:18 +13:00
Mike McQuaid 9c16145d8c Set MACOS_VERSION as 0 on non-OSX platforms. 2012-03-18 15:43:39 +13:00
Mike McQuaid d2ad0d0232 Use fetch for downloading bottles.
Fixes #10958.
2012-03-18 15:16:57 +13:00
Max Howell ab571e4d72 Downcase when checking if no tap search needed 2012-03-18 02:03:19 +00:00
Max Howell e820345902 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 41b0e8583d 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 087408b8e0 Add brew/versions and brew/dupes to search 2012-03-18 01:23:15 +00:00
Max Howell b481aec543 Handle when formula are deleted from taps
The symlinks in Formula must be updated.
2012-03-18 01:23:01 +00:00
Max Howell 21b04d5171 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 a190d47cd8 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 9658a780f6 Don't warn about .DS_Store
Fixes #11018.
2012-03-18 00:16:09 +00:00
Adam Vandenberg aa46c7638f 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 7e3287e683 bsdmake is a build-time dep
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-17 11:16:45 -05:00
Adam Vandenberg 07d42d0ce3 audit: check for install options being shadowed 2012-03-17 08:46:04 -07:00
Adam Vandenberg a75d9d51d0 Add brew uses --recursive
Closes #8870.
2012-03-16 22:00:59 -07:00
Max Howell 04243da198 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 f15c647393 Plain brew tap doesn't error if no Library/Taps
Fixes #10994.
2012-03-17 00:04:43 +00:00
Max Howell 5641e6b38e 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
Max Howell d66e23ac4b Output tapped formula account properly 2012-03-16 22:08:55 +00:00
Max Howell 585df7a6ba Don't break if symlink already exists during tap
This shouldn't happen but is possible and we should handle it.

Also added some puts when tapping/untapping.
2012-03-16 21:06:18 +00:00