28944 Commits

Author SHA1 Message Date
Max Howell
dec885bc16 Check for tty before trying to grab it 2012-03-09 12:09:37 +00:00
Max Howell
d9f1be7ef2 Use original system function for gcc check 2012-03-09 12:09:37 +00:00
Max Howell
f939a2c8b2 chmod Library and libexec too 2012-03-09 12:09:37 +00:00
Max Howell
13e73a2c55 Duplicating installation steps sucks 2012-03-09 12:09:37 +00:00
Max Howell
7a193f39b7 Support Ruby < 1.8.7 2012-03-09 12:08:52 +00:00
Max Howell
97b5808cac Warn if Xcode is not installed. 2012-03-09 12:08:52 +00:00
mattetti
4c0545619d Use getbyte and not getc 2012-03-09 12:08:51 +00:00
Max Howell
ebbc2e5b3f Use full path to stty 2012-03-09 12:08:51 +00:00
Max Howell
ca5bccd2d9 Only abort if user is not in staff group
Rationale: We aren't sure if the suggested command works on 10.5 and this is
an edge case.
2012-03-09 12:08:51 +00:00
Max Howell
16352d90b4 Moved code to top ready for amend 2012-03-09 12:08:51 +00:00
Max Howell
e12165138f Add user to staff if necessary 2012-03-09 12:08:51 +00:00
mxcl
3529226865 Advise user if they are not in the right group 2012-03-09 12:08:51 +00:00
Mike McQuaid
5f1a9098c9 Add better Unix exit codes.
Closes Homebrew/homebrew#10809.
2012-03-09 19:16:33 +13:00
Mike McQuaid
a005834d7a Run tests from anywhere and provide an exit code. 2012-03-09 18:28:47 +13:00
Mike McQuaid
0e2258f0fa Fix test_ENV on 10.7/Xcode 4. 2012-03-09 16:49:19 +13:00
Mike McQuaid
31e2ec485b Fix test_arch_for_command on 10.7. 2012-03-09 16:49:19 +13:00
Jack Nagel
d6851033f9 Fix gdk-pixbuf module installation
When other packages install gdk-pixbuf modules, they get installed into
the gdk-pixbuf keg. To avoid this, we explicitly create the top level
lib directories for gdk-pixbuf and hack the pkgconfig file to point at
the top-level directories instead of the keg.

This results in other packages installing modules into the top-level
directory and as such they are "lost" and treated as unbrewed files, but
that is still better than losing them during upgrades of gdk-pixbuf
itself.

If we had a post-link hook, we could keep everything confined to its own
keg, linked into the top-level modules directory, and then run

    gdk-pixbuf-query-loaders --update-cache

ourselves. In the abscence of that, I think this is the best compromise.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-08 20:40:26 -06:00
Oscar Del Ben
94bafe05f4 Include vi in list of binaries already in OS X
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-03-07 21:25:20 -08:00
Max Howell
4e3c99d96f Don't attempt to cleanup source checkouts
Fixes Homebrew/homebrew#10751.
2012-03-07 17:14:06 +00:00
Max Howell
5b0d97efc7 Suggest full path to Xcode 4.3 /Developer
Some people seem to have an older xcode-select even after installing the CLT from inside Xcode or otherwise. So this is works for both.

Now we aren't future-proofed in case Apple change the location, but hopefully they won't, seems unlikely.

Refs Homebrew/homebrew#10743. Fixes Homebrew/homebrew#10745.
2012-03-07 15:19:30 +00:00
Adam Vandenberg
a396e5e720 Remove 'is this a git command?' 2012-03-07 07:00:27 -08:00
Adam Vandenberg
c7ec737f86 Remove silly path method 2012-03-07 06:57:23 -08:00
Max Howell
8fd2778a95 Allow dependencies to still install
Oops bug.
2012-03-07 13:48:04 +00:00
Max Howell
d830e17a12 Protect against unwritable cache location 2012-03-07 12:51:02 +00:00
Max Howell
6988a75b84 Don't allow sudo brew upgrade if not sensible 2012-03-07 12:50:15 +00:00
Max Howell
a13ff43886 Don't abort upgrade if one formula won't build
Also, unlink previous keg before installing to prevent issues when existing installed brews cause build problems for the newer installed brew.

If the build fails the active keg is relinked before aborting.

Fixes #10341.
2012-03-07 12:34:40 +00:00
Max Howell
76aa0a62f3 Stop supporting `brew install --force'
Rationale: it breaks stuff. You should not be able to install over something already installed *and* linked. brew now prompts you to unlink the existing linked keg first.

I came to fix this because I discovered that `brew install foo` works without --force provided foo's formula version is different to that which is installed and linked. I'm not sure if this was intentionally broken, but it led to at least two tickets I found where people were getting crazy issues trying to install over the top of already installed previous versions.

So I also fixed a whole category of other issues, mostly by moving error handling into FormulaInstaller. Now error's can be caught in Homebrew.install and handled on a formula-by-formula basis. I will next port this behaviour to upgrade.
2012-03-07 12:33:47 +00:00
Max Howell
15a70c36d0 Move brew output for BuildError into BuildError
So upgrade can output errors but continue to upgrade the rest of the installation.
2012-03-07 12:33:47 +00:00
Max Howell
735b6337a1 If multiple kegs, default to formula keg
If it exists, ARGV.kegs will return the Formula.prefix keg for each rack examined.

So for ARGV=[wget, foo] and the following Cellar (wget/1.11, wget/1.12, foo/1.0) you'll get [wget/1.12, foo/1.0] from ARGV.kegs provided 1.12 is the formula version of wget.
2012-03-07 12:33:47 +00:00
Jack Nagel
67c3f1b2b4 Extend FileUtils rather than include it
Fixes Homebrew/homebrew#10729.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-06 19:23:51 -06:00
Max Howell
158efd8c9a brew cleanup cleans up the download-cache
Manpage updated.

The -s switch is "scrub" and removes downloads for uninstall formula which are downloads for the latest version of that formula still.

Please NOTE cache is NOT cleaned if a formula argument is provided. I couldn't be bothered. Patches welcome :)

Closes Homebrew/homebrew#2923.
2012-03-06 20:28:06 +00:00
Max Howell
1b4b8a722e Pathname.stem knows about bottles 2012-03-06 20:28:06 +00:00
Max Howell
b63ec18564 Proper single character switch handling
Includes a test. So now you can do `brew cleanup -ns` and it will work.
2012-03-06 20:28:06 +00:00
Max Howell
9c5ddb5721 The doctor checks if you need to brew update
Well at least it checks to see if it's been a while since the last one.
2012-03-06 20:28:05 +00:00
Jonathan Hitchcock
de30a7844f 'brew doctor' provides bad example command
If there are multiple dependencies missing, 'brew doctor' can suggest
that you run something like:

  brew install autoconf libyaml autoconf, libyaml

This commit improves that output.

Closes Homebrew/homebrew#10720.

Signed-off-by: Max Howell <max@methylblue.com>
2012-03-06 15:38:33 +00:00
Adam Vandenberg
cc78050dc5 add which method 2012-03-06 06:53:06 -08:00
Max Howell
6868bf0d6e Don't require formula files for brew rm --force
In fixing this I also made it so that ARGV.kegs will return the LinkedKeg if the symlink is set. Which is almost always is. This neatly avoids most multiple-kegs issues.

Fixes Homebrew/homebrew#10685.
2012-03-06 13:47:31 +00:00
Max Howell
7ddaaf9bb0 Doctor check for python is Python-3
Refs Homebrew/homebrew#9541.
2012-03-06 12:20:02 +00:00
Jack Nagel
ed5f7dfbaa Require specialties at the end of formula.rb
classes in formula_specialties.rb need Formula, so it has to be last.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-06 00:28:50 -06:00
Adam Vandenberg
962f4fa9ef Move llvm method to FailsWithLLVM 2012-03-05 21:14:48 -08:00
Adam Vandenberg
fca0a66649 shrink 2012-03-05 21:14:39 -08:00
Adam Vandenberg
ee5193e3e8 invert condition 2012-03-05 21:14:39 -08:00
Adam Vandenberg
09d23d91ef Move AmazonWebServicesFormula to formula_specialties
Enough formulae in core depend on this, pull it in here.
When multi-repo support lands, perhaps we could set up Homebrew-AWS.
2012-03-05 21:14:39 -08:00
Adam Vandenberg
6af1aae50b Move specialized formulae base classes into a new file 2012-03-05 21:14:39 -08:00
Adam Vandenberg
1b372d7840 Move path utils out of formula.rb
Make a new module for our FileUtils extensions and use that instead.
2012-03-05 21:14:39 -08:00
Jack Nagel
19a0aa51a1 Adjust updater tests for git config calls
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-05 12:35:55 -06:00
Jack Nagel
01994c7be1 keg: allow selective linking at the file level
Some parts of a keg's tree are not subject to the cleaner, and sometimes
we still want to remove things in directories marked skip_clean; this
allows us that freedom.

If 'lib' is marked skip_clean, we still want to avoid linking the
charset.alias file into the top of the tree. The same needs to be done
for the locale.alias file in share/locale.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-04 23:56:22 -06:00
Max Howell
f7d7fb1e81 Don't allow brew link to be run as sudo 2012-03-04 02:47:53 +00:00
Nicolas Despres
6898eadcc5 brew-man: only exit 1 when an error occurs
Because of "set -e" in non verbose mode brew man had an exit status
equals to 1 whereas there was no error.  The reason was that the "test"
command failed.  This patch fix this.

Closes Homebrew/homebrew#10664.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-03 14:25:45 -06:00
Jack Nagel
28d6a0f4de update: disable git line ending conversion
If a user has set core.autocrlf = true (which shouldn't ever be used on
OS X, but alas...), a subsequent `brew update` will check out files with
CRLF line endings. Setting core.autocrlf = false in Homebrew's repo
config will override this global setting, and let us check out files
with their in-repository line endings.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-02 18:37:48 -06:00