Commit Graph
424 Commits
Author SHA1 Message Date
Adam Vandenberg ff96f4cd9f Use sha1 as the default checksum for new formulae
See: https://github.com/mxcl/homebrew/pull/12587
2012-06-06 07:04:51 -07:00
Jack Nagel 084e761f6a doctor: improve outdated Homebrew check
We now skip the outdated check if our local origin/master tracking
branch matches the origin remote's current master. This prevents false
positives when we are actually up-to-date but the latest commit is over
24 hours old.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-03 10:32:40 -05:00
Misty De Meo d727f8b7f3 Replace /usr/bin/ruby with full Framework path
Rationale: some users insist on replacing the /usr/bin/ruby symlink
to point to another ruby on their system, which may break homebrew.
Use the full Framework path instead, which is less likely to be tampered with.

This also reorganizes the brew --config checks to reflect the different path.

Fixes #12009.

Closes #12333.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-06-01 09:24:25 -05:00
Jack Nagel 88ccd16ce5 create: update cmake calls in template
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-22 22:32:16 -05:00
Jack Nagel 28fa55824e audit: fix broken deps check
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-15 17:45:26 -05:00
Jack Nagel d2c417a02b doctor: rework check_pkg_config_paths
pkg-config can give us this information a colon-separated list; use
that.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-13 19:28:03 -05:00
Jack Nagel 2fb94e4d9b Use 'which' helper method more
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-13 19:28:03 -05:00
Misty De Meo b73b40fa1d doctor: report if a path element is invalid
Under certain circumstances, an invalid path element would cause
File.expand_path to bail out. Catch mistakes and report them, then
continue instead.

Fixes #12154
2012-05-11 09:48:51 -05:00
Jack Nagel 76604c1cd5 Unify 'which' and which_s' utility methods
'which' only returns a Pathname or nil, and doesn't care about anything
sent to stderr, so just silence it by default and combine the two
methods.

Closes #12115.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-07 21:05:47 -05:00
Jack Nagel 839d0ddad8 audit: don't count printed URLs as problems
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-07 17:50:05 -05:00
Jack Nagel 2d68a3f319 audit: check MacPorts patch URLs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-07 17:44:57 -05:00
Nicolas Despres 1c74a94276 Honor build options and bottles when upgrading
Fixes #11552.
Closes #11777.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-05 12:24:56 -05:00
Misty De Meo 87fd6f3372 brew tap: allow dashes in GitHub usernames 2012-04-30 14:02:23 -05:00
Mike McQuaid 34c970b103 Add ofail command and fix bottle command output. 2012-04-30 21:38:08 +08:00
Mike McQuaid cd4f7c10cd Cleanup old bottles. 2012-04-30 21:37:58 +08:00
Adam Vandenberg c84add7bea audit: reduce false-positives 2012-04-29 09:32:39 -07:00
Adam Vandenberg dfb171b173 doctor: add another path to the macgpg2 check 2012-04-28 14:08:05 -07:00
Jack Nagel cf327aece7 test: improve "formula not installed" error text
Closes #11779.

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

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-17 17:10:47 -05:00
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