4632 Commits

Author SHA1 Message Date
Misty De Meo
faf332054f doctor: don't warn about recent MacGPG2 versions
Fixes Homebrew/homebrew#12238.
2012-06-19 09:25:18 -05:00
Misty De Meo
c2b057fc70 doctor: skip Cellar test if Cellar doesn't exist
Fixes Homebrew/homebrew#5188 (again).
2012-06-19 09:24:59 -05:00
Jack Nagel
9ebb1a3d08 audit: prefer ARGV.build_head? to inspecting 'version'
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-17 18:01:22 -05:00
Jack Nagel
6a94df360a audit: prefer modifying ENV to using env or export
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-17 17:59:30 -05:00
Jack Nagel
38a28285a6 audit: catch unnecessary 'ENV.foo' interpolation
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-17 17:58:49 -05:00
Misty De Meo
6229a20db7 doctor: Mono-specific warning for pkg-config
Mono installs its own pkg-config symlink into /usr/bin/pkg-config,
which breaks non-Mono builds. Provide a specific warning.

Closes Homebrew/homebrew#12859.
2012-06-17 12:17:11 -05:00
Adam Vandenberg
ec4b34aa08 Fix doctor's use of missing.
`brew doctor` shelled to `brew missing` and parsed the results.
When VERBOSE was true, this caused an error as extra, unexpected
output is generated.

Make missing an internal command, and give it a programmatic interface.
2012-06-12 20:03:26 -07:00
Jack Nagel
9e2fc82ad6 Use which method in doctor
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-06-12 00:17:36 -05:00
Adam Vandenberg
73d047d3ac 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
65bea86ae9 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
7af4622b0f 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 Homebrew/homebrew#12009.

Closes Homebrew/homebrew#12333.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-06-01 09:24:25 -05:00
Jack Nagel
01bcf58e6a create: update cmake calls in template
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-22 22:32:16 -05:00
Jack Nagel
4dfa2806b9 audit: fix broken deps check
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-15 17:45:26 -05:00
Jack Nagel
ec3615fec7 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
210c9ac205 Use 'which' helper method more
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-13 19:28:03 -05:00
Misty De Meo
71d34a86d6 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 Homebrew/homebrew#12154
2012-05-11 09:48:51 -05:00
Jack Nagel
68124d481f 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 Homebrew/homebrew#12115.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-07 21:05:47 -05:00
Jack Nagel
fa1edd6846 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
4d027874b0 audit: check MacPorts patch URLs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-07 17:44:57 -05:00
Nicolas Despres
c2fdcf1a34 Honor build options and bottles when upgrading
Fixes Homebrew/homebrew#11552.
Closes Homebrew/homebrew#11777.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-05 12:24:56 -05:00
Misty De Meo
827d263d01 brew tap: allow dashes in GitHub usernames 2012-04-30 14:02:23 -05:00
Mike McQuaid
fe969c21ad Add ofail command and fix bottle command output. 2012-04-30 21:38:08 +08:00
Mike McQuaid
a1ce504e7d Cleanup old bottles. 2012-04-30 21:37:58 +08:00
Adam Vandenberg
162b1ee936 audit: reduce false-positives 2012-04-29 09:32:39 -07:00
Adam Vandenberg
1d975de41b doctor: add another path to the macgpg2 check 2012-04-28 14:08:05 -07:00
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