38364 Commits

Author SHA1 Message Date
Max Howell
cadc0506f9 cd KNOWN_DIR before executing any functions or tools
It is fucking amazing how much shit breaks if CWD is invalid. Fucking amazing.

Also fuck you dumb user who can't figure out what "No such file or directory - getcwd" means so you force me to waste half an hour fixing it for you.
2012-03-09 12:10:50 +00:00
Max Howell
63d8cb1a6b We need the executable permission to create files in directories
Fixes Homebrew/homebrew#6512.

I also set +r as a bunch of Homebrew will fail without that.
2012-03-09 12:10:50 +00:00
Max Howell
d053188da4 curl -k 2012-03-09 12:10:50 +00:00
Max Howell
488252ddbf Tidy ohais 2012-03-09 12:10:50 +00:00
Max Howell
283cefa163 Revert "Ensure resulting /usr/local is not user writable"
This reverts commit 549e7c1c2046010430849a3e92ecefb64b21a733.
2012-03-09 12:10:50 +00:00
Max Howell
cb3ffba635 Revert "Ensure that we undo the o+w chmod"
This reverts commit b3d5ac0c8500006ef4fbd0bf3bd53b22a06869ab.
2012-03-09 12:10:50 +00:00
Max Howell
9c5ad5c978 Error out with link to help if OS X < 10.5 2012-03-09 12:10:49 +00:00
Max Howell
c1568ab277 Fix install script for Ruby 1.9.x 2012-03-09 12:10:49 +00:00
Max Howell
ab66113f0b Ensure that we undo the o+w chmod 2012-03-09 12:10:49 +00:00
Max Howell
4696401e5d Look for bad dylibs in the installer
A common source of compile error, lets tell the user straight away.

Removed relevant documentation from the installation instructions as a consequence.
2012-03-09 12:10:49 +00:00
Max Howell
1fb3a2e20c Ensure resulting /usr/local is not user writable
Because we should do as little modification to the system as possible.

Even though /usr/local doesn't exist on a virgin OS X, many tools create it, and some of them expect /usr/local to be root owned for security reasons.

This modification fixes Airfoil on systems where it is installed.

The result of this is we can no longer create new directories in the HOMEBREW_PREFIX unless we check and prompt for sudo first when required.
2012-03-09 12:10:49 +00:00
Max Howell
3c2656c933 Better check for already installed 2012-03-09 12:10:49 +00:00
Max Howell
2332a564aa Less documentation
Changelog documentation, what were we thinking?
2012-03-09 12:10:49 +00:00
Max Howell
06450d4924 We don't care about var/log
Actually not sure about this commit's purpose. It was a gist edit, so no commit message was provided.
2012-03-09 12:10:49 +00:00
Max Howell
2cb0bd2cae Github URLS now are https 2012-03-09 12:10:49 +00:00
Max Howell
a721e736c5 If curl fails propagate its exit status through the pipe 2012-03-09 12:09:38 +00:00
Max Howell
bdbb8dc2a4 Check for all manpaths 2012-03-09 12:09:38 +00:00
Max Howell
d39364b70a Use full path to sudo 2012-03-09 12:09:38 +00:00
Max Howell
897dd14ae5 Amend paths to check for chmods 2012-03-09 12:09:38 +00:00
Max Howell
76ad14507c Direct the user to Xcode download 2012-03-09 12:09:38 +00:00
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