4907 Commits

Author SHA1 Message Date
Samuel John
6ae2e872d3 reinstall cleanup 2013-09-05 14:59:33 +02:00
Xiyue Deng
8aae1dac7b Make reinstall transaction safe.
* Aborting during reinstall will now restore the originally installed
  keg.
  - Change install code to pass on CannotInstallFormulaError exception
    to caller so it can be reused in reinstall.
* Add "--force-new-install" flag to force installing a new formula.

Closes Homebrew/homebrew#22190.

Signed-off-by: Samuel John <github@SamuelJohn.de>
2013-09-05 14:02:29 +02:00
Samuel John
9b755e5ad2 brew search <user>/<repo> [substring]
For example `brew search homebrew/science` to get a list of all formulae
from that tap, even if not yet tapped.

`brew search <user>/<repo>/<substr>` or
`brew search <user>/<repo> <substr>` to grep for `<substr>`
inside of the tap `<user>/<repo>`.
2013-09-03 11:52:34 +02:00
Samuel John
a260bb1906 doctor: be more helpful with suggestion about PATH
- Show a one liner that will append to
  the user's ~/.bash_profile. In 95% this will be
  ok and we assume zsh people are smart enough
  to know what they have to do.
2013-09-03 11:44:48 +02:00
Samuel John
5515fda59a PythonInstalled: Allow formulae to set/append PYTHONPATH
Improve robustness of `PYTHONPATH` by first unsetting it (during
`satisfy`) so that the `PythonInstalled` can get the `python.version`
and so forth and then, after that, setting the `PYTHONPATH` to our
`global_site_packages`.
In the `python_helper` we append to the `PYTHONPATH` so if that var has
been set in a formula, it is respected.
Brew audit does no longer complain about setting the
`ENV['PYTHONPATH']`.
2013-09-03 10:46:06 +02:00
Mike McQuaid
626b56f9f6 brew-postinstall: add new command.
Runs post-install jobs in case they failed or need rerun for any reason.
2013-09-01 13:57:40 +01:00
Mike McQuaid
0c5d928cad brew-reinstall: don't list --force in args. 2013-09-01 13:57:40 +01:00
Mike McQuaid
22da8eb633 brew-reinstall: don't try and rebuild bottles. 2013-09-01 13:57:40 +01:00
Dan Hughes
51d1a8e3c5 Use system path for more tools, for Linux compat.
Closes Homebrew/homebrew#22196.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-08-30 13:02:19 -07:00
Jack Nagel
23c2ec56f8 Prefer interpolation to concatenation 2013-08-26 21:58:18 -05:00
Samuel John
43fc7423d7 brew reinstall: Is able to work for all formulae
... and not just installed ones. Of course, strictly speaking,
reinstalling not-yet-installed formulae makes semantically little
sense, but the big win is that we can tell people (after we have
resolved an issue) to `brew reinstall <formula>` and even if a user
has removed that formula in the meantime, reinstall will do the right
thing. Basically adding --force to uninstall. I think this makes
reinstall more robust.
2013-08-21 20:18:55 +02:00
Samuel John
5a0bad6b42 Revert "brew reinstall: Is able to work for all formulae"
This reverts commit 865f763ae59fdf32f496ca416fd98117f3370f86.
2013-08-21 20:17:38 +02:00
Samuel John
4bb49a6439 brew reinstall: Is able to work for all formulae
... and not just installed ones. Of course, strictly speaking,
reinstalling not-yet-installed formulae makes semantically little
sense, but the big win is that we can tell people (after we have
resolved an issue) to `brew reinstall <formula>` and even if a user
has removed that formula in the meantime, reinstall will do the right
thing. Basically adding --force to uninstall. I think this makes
reinstall more robust.
2013-08-21 19:20:41 +02:00
Samuel John
c4d7e21df5 brew create: Mention the example-formula 2013-08-20 15:44:12 +02:00
Amos Wenger
52ace99f14 Use File::PATH_SEPARATOR globally instead of ':'
On Unix, the path separator is ':', whereas on Windows,
it is ';'. This is the first of a series of patch to bring
macbrew's and winbrew's codebases closer together.

The main places the magic constant ':' was being used were:
  - the $PATH environment variable
  - CMAKE-related environment variables
  - pkg-config related environment variables

Closes Homebrew/homebrew#21921.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-08-19 13:35:44 -05:00
Jack Nagel
809a52a6a3 audit: activate ENV extensions 2013-08-19 13:03:41 -05:00
Jack Nagel
dd9c269c69 Rename HomebrewEnvExtension to Stdenv 2013-08-19 12:32:59 -05:00
Jack Nagel
eebc04ec9b Move common stuff to extend/ENV.rb 2013-08-19 12:32:57 -05:00
Jack Nagel
bf0e329010 Make Superenv activation explicit 2013-08-19 12:32:56 -05:00
Adam Vandenberg
31348c34ae add ubuntu package search 2013-08-14 22:14:35 -07:00
Adam Vandenberg
124ddce262 audit: show real name for aliases 2013-08-14 21:35:46 -07:00
Samuel John
cae03e3363 brew reinstall: Reuse options from last time
Now, we can finally stop stuggesting to
    `brew rm <foo>` and then `brew install <foo> <with-your-preferred options>

So `brew reinstall` will honor all options that have been recorded
into the INSTALL_RECEIPT.json plus if `--build-bottle` was used.
2013-08-14 22:25:03 +02:00
Misty De Meo
f960cf94d1 Doctor: missed CLT URL replacement 2013-08-10 22:30:15 -07:00
Misty De Meo
49cd13406b Update URL for CLT download
http://connect.apple.com is still down, but
https://developer.apple.com/downloads has all of the Apple developer
downloads available.

Fixes Homebrew/homebrew#21812.
2013-08-10 22:05:18 -07:00
Jack Nagel
966e82663f Make usage of ObserverPathnameExtension more obvious
Remove use of globals.

Closes Homebrew/homebrew#21795.
2013-08-10 19:02:00 -05:00
Adam Vandenberg
bcaa823538 Add fedora to brew search 2013-08-09 09:32:51 -07:00
Adam Vandenberg
5600713bbb Add opensuse package search 2013-08-05 15:05:02 -07:00
Adam Vandenberg
1540b3aadd Search marcqualie/nginx
Closes Homebrew/homebrew#21678.
2013-08-05 13:32:23 -07:00
Mike McQuaid
5104fd21a5 bottles: update version regex messaging. 2013-08-04 08:25:51 -07:00
Adam Vandenberg
583dd38b08 Add homebrew-binary to search 2013-08-03 10:27:45 -07:00
Ches Martin
7d30e4445e brew-create: don't break when given --set-version
Since 9f2782812cbaf2, specifying a version breaks with:

    Error: undefined method `detected_from_url?' for "1.2.2":String

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-08-03 10:11:11 -07:00
Jack Nagel
faf0a7204a Improve signal-to-noise ratio of brew list --unbrewed
Closes Homebrew/homebrew#21573.
2013-08-01 22:13:46 -05:00
Mike McQuaid
b072da141f audit: don't complain about bottle versions.
`brew bottle` already complains and this is a niche case.

References Homebrew/homebrew#21374.
2013-07-28 16:26:16 -07:00
Jack Nagel
366cb87aec search: silence JSON decode errors
Closes Homebrew/homebrew#21506.
Closes Homebrew/homebrew#21508.
2013-07-28 15:38:46 -05:00
Adam Vandenberg
9608c2bfae audit: add TODO 2013-07-23 10:51:07 -07:00
Jack Nagel
387200cea5 audit: use !~ instead of "not ... =~" 2013-07-23 11:22:16 -05:00
Jack Nagel
be984215c9 audit: fix dep name escaping 2013-07-23 11:22:15 -05:00
Jack Nagel
a3863394c0 audit: escape dep before regexp interpolation 2013-07-22 22:53:43 -05:00
Jack Nagel
3afa9c2ceb audit: fix indentation 2013-07-22 22:53:22 -05:00
Jack Nagel
dd9b317e24 audit: fix broken condition 2013-07-22 22:53:11 -05:00
Adam Coffman
753adbb0ce upgrade: put exit statements in both conditional branches
This check was only occurring in one branch of the conditional.
As a result, if you ran `brew upgrade` with no args and there were no packages to upgrade,
the nonsensical message

"==> Upgrading 0 outdated package, with result:"

would be printed.

Closes Homebrew/homebrew#21316.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-07-18 15:35:17 -05:00
Mike McQuaid
f3821364a7 Warn more about failing bottle version detection.
This is needed for local bottle installation and also possible when
detecting bottle versions from URLs.
2013-07-18 09:56:55 -07:00
Adam Vandenberg
ebcf8be789 audit: skip an audit for mongodb 2013-07-17 06:58:11 -07:00
Adam Vandenberg
456621bb54 audit: ARGV.find is a warning, .value is allowed 2013-07-17 06:58:10 -07:00
Samuel John
702b5e5ba2 doctor: Using Xcode-only is no longer experimental
In 10.9 we'll probably have to use that code path
anyways and by now we have adapted all formulae
to be able to build on Xcode-only.
2013-07-17 15:18:00 +02:00
Jack Nagel
d9790309a6 Fix SYMROOT audit 2013-07-16 23:15:22 -05:00
Jack Nagel
86cf6f0329 More linewise audits 2013-07-16 21:39:46 -05:00
Jack Nagel
b4bb0bf1c0 Audit text linewise 2013-07-16 21:25:02 -05:00
Jack Nagel
a632994403 Audit conditional deps that can be made declarative 2013-07-16 21:24:54 -05:00
Jack Nagel
51023ef15b Fix some false-positive build-time dep audits 2013-07-16 15:49:11 -05:00