1538 Commits

Author SHA1 Message Date
Adam Vandenberg
017d8690d3 Ensure cache folder exists 2011-10-11 10:13:19 -07:00
Jack Nagel
d73df34bc6 doctor: check git version
Checking out over HTTP/HTTPS from GitHub requires git 1.6.6, as GitHub
only allows Smart HTTP transport.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-10 18:20:50 -05:00
Jack Nagel
0a49981a30 Add an attr_reader for 'head'
This allows `brew audit` to inspect the head URLs, for example; until
now, that check was failing silently.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-10 15:34:28 -05:00
Jack Nagel
f29c44d1fd fetch: use correct sha256 instance variable
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-09 15:56:15 -05:00
Jack Nagel
558ce2dd3d Fix syntax error in the bash-completion script
My bad.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-09 13:40:49 -05:00
Jack Nagel
cc7efdc94d Make bash completion for upgrade smarter
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-08 20:30:10 -05:00
Motonori Iwata
a8437a62ca Make zsh completion for upgrade smarter
Closes Homebrew/homebrew#7889.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-08 20:24:59 -05:00
Bertrand Marron
744ab8fc8c Add upgrade to the zsh completion script
Closes Homebrew/homebrew#7923.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-08 20:15:40 -05:00
Jack Nagel
74207f71e6 cleaner: correctly obey HOMEBREW_KEEP_INFO
The advertised default is that anything in share/info is removed unless
the user sets HOMEBREW_KEEP_INFO, but we've actually been installing the
files *unless* the variable is set. To illustrate:

  $ unset HOMEBREW_KEEP_INFO
  $ brew install -v wdiff
  [...]
  ln /usr/local/share/locale/af/LC_MESSAGES/wdiff-gnulib.mo
  ln /usr/local/share/info/wdiff.info
  ln /usr/local/share/info/dir
  ==> Summary
  [...]
  $ HOMEBREW_KEEP_INFO=1 brew install -v wdiff
  ln /usr/local/share/locale/af/LC_MESSAGES/wdiff-gnulib.mo
  ==> Summary
  [...]

Obviously not what we wanted.

Closes Homebrew/homebrew#7989.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-06 00:11:34 -05:00
Charlie Sharpsteen
e7aaeda953 formula.rb: Don't attempt to mirror unstable URLs
If a build is being influenced by an option such as `--HEAD`. Don't attempt
mirrors if a download fails.

Fixes Homebrew/homebrew#7971.
2011-10-04 18:36:31 -07:00
Dustin Koupal
bcea01ca0a pathname.rb: Fix spelling for permssions
Closes Homebrew/homebrew#7970.

Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
2011-10-04 15:19:06 -07:00
Adam Vandenberg
51ab8c3b56 Add FileVault use case to manual. 2011-10-04 14:01:42 -07:00
Daniel Bingham
fbd0d7ec7b Fix :sha spec so that it actually checks out the SHA
:sha was used to prevent the "--depth" option to git clone, but was
never actually used to checkout the SHA.

Closes Homebrew/homebrew#7859.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-03 18:45:25 -05:00
Jack Nagel
2f85acfeb2 doctor: warn about expired SSL certs on Leopard
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-03 13:57:33 -05:00
Jack Nagel
e0c53c56e4 audit: improve SF 'use_mirror' detection
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-10-02 15:46:09 -05:00
Adam Vandenberg
0aa9fe73f8 Fix gem install help for brew-server
Sinatra gem must be installed for the system ruby.
2011-09-30 08:05:28 -07:00
at@an-ti.eu
4cf74bc972 List all local installed packages in brew server
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-09-30 08:02:33 -07:00
Jack Nagel
be9d91b2b8 audit: match #{prefix}/libexec and prefix+'libexec'
These were being picked up as just "#{prefix}/lib" and prefix+'lib' due
to the eagerness of the regex. Reordering "lib" and "libexec" will take
care of it; I couldn't think of a more clever solution.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-28 14:42:04 -05:00
Jack Nagel
9bce115e9a doctor: remove redundant sentence
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-27 23:35:30 -05:00
Adam Vandenberg
1ff01a872e missing should not error if Cellar does not exist 2011-09-26 10:46:50 -07:00
Charlie Sharpsteen
e49dc46bf3 manpage: Remove missing, server and which
These are external commands---documentation has been moved to the wiki.
2011-09-23 11:53:44 -07:00
Jack Nagel
dec66e951a update: correct failing tests
Commit dec4b73aa0 ("Allow `brew update --rebase`") changed the format of
the `git pull` command slightly, introducing an extra space (to allow
for the --rebase option), so let's update the test expectations for this.

We still need to write tests for '--rebase', but in the meantime they
once again pass for the normal case.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-21 17:37:36 -05:00
Jack Nagel
27d2a95e8f Correctly parse ImageMagick bottle version
Commit 2695821e98 ("Only use the bottle if its version is up-to-date")
essentially broke the ImageMagick bottle, because the version parsing
logic returns "1" as the bottle version.

Fixing this requires only a slight modification to the bottle URL regex;
includes a test.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-21 17:29:14 -05:00
Jack Nagel
51f010ac39 audit: recognize options used with 'ARGV.flag?'
A few formula use ARGV.flag? instead of ARGV.include?. This made `audit`
recognize a few undocumented instances of a '--devel' option, but we can
just ignore that like '--HEAD' for now, and change the behavior if we
decide they need to be documented explicitly in each formula.

cf. Homebrew/homebrew#7456.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-21 15:25:28 -05:00
Jack Nagel
d817e5e51e doctor: only check git status if repository exists
Closes Homebrew/homebrew#7722.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-19 21:49:29 -05:00
Max Howell
28aef26a47 More docs for brew create generated formula tests
To assist those new to stuff.
2011-09-20 03:39:07 +01:00
Charlie Sharpsteen
d05478e85b formula.rb: Move cache dir creation to fetch
So that the cache directory will get created if the user runs `brew fetch`
instead of `brew install` as the first command.
2011-09-19 19:05:44 -07:00
Jack Nagel
ea30b66ced manpage: boldface --rebase option
This is consistent with how other options are displayed.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-19 20:50:39 -05:00
Max Howell
e26797f471 Allow brew update --rebase 2011-09-20 02:30:31 +01:00
Jack Nagel
2be915db99 Remove brew-man documentation
It was extraneous, and useful only for maintainers and contributors. It
is currently documented on the External Commands page of the wiki.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-19 18:27:19 -05:00
Jack Nagel
783b71fa5a Improve external command documentation
In addition to a brief overview of what external commands are, add a
link to the wiki page where the real documentation resides.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-19 18:24:03 -05:00
Max Howell
6bd47cf0f9 Only try mirrors for CurlDownloadStrategies
Also adjust output text slightly for prettiness.

A possibly useful side effect here is safe_system has a defined Exception (subclassing RuntimeError) now.
2011-09-19 23:30:10 +01:00
Jack Nagel
1dc0775a15 Revert "Pretty-print the "Trying a mirror" message"
This reverts commit af8e3b5aeacdb10a412560e131d631ba733a8346.

Sorry for the noise.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-19 12:19:50 -05:00
Jack Nagel
9b3c22c7bd Pretty-print the "Trying a mirror" message
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-19 12:15:56 -05:00
Charlie Sharpsteen
aa6f96003b mirror support: External command for mirror tests
`brew mirror-check <formula...>` will process a list of Formulae and check
their mirrors to see if they are reachable and the MD5 sums are valid.
2011-09-19 09:25:02 -07:00
Charlie Sharpsteen
3ada407922 mirror support: Add test 2011-09-19 09:25:02 -07:00
Charlie Sharpsteen
9d19506ee9 mirror support: Add mirror method to Formula.rb
Mirrors can now be declared using the `mirror` method which works similar to
`depends_on` and takes the same arguments as `url`.

The formula class now has a public `fetch` method that cycles through the
mirror list if the downloader for the primary URL throws a `DownloadError`.
Other brew commands, like brew-fetch, also benefit from mirror support by using
this method.

Closes Homebrew/homebrew#7574.
2011-09-19 09:24:43 -07:00
Charlie Sharpsteen
ff7c886556 exceptions.rb: Add DownloadError
`DownloadError` is an exception that download stratigies can throw to indicate
that a fetch was incomplete due to a failure in communication.

The `curl` method in `utils.rb` has been upgraded to throw a `DownloadError` if
something bad happens to `curl` execution.
2011-09-19 09:21:36 -07:00
Jack Nagel
560fb2dbcb brew-missing: use name accessor on Formula objects
Commit 00cd16f changed oudated_brews to return a list of Formula
objects rather than a list of lists containing formula information.

Now we must access the formula name by using the 'name' accessor rather
than an array index.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-18 15:03:37 -05:00
Adam Vandenberg
3898010309 doctor: restore some line breaks 2011-09-16 10:05:11 -07:00
Charlie Sharpsteen
a404ceb29a brew-upgrade: Fix installation of dependencies
Fixes Homebrew/homebrew#7528.
Closes Homebrew/homebrew#7572.
2011-09-16 09:02:02 -07:00
Charlie Sharpsteen
2492c6564d Return Formula objects from outdated_brews
Previously, `outdated_brews` returned a list of lists---each containing three
components of a Formula object:

  - f.rack
  - f.name
  - f.version

Frequently more information is required which necessitates back-casting from
`name` to a Formula object---simpy returning formula objects removes this step.
2011-09-16 08:55:38 -07:00
Charlie Sharpsteen
94dba21f7d Centralize definition of rack in formula.rb
`rack` is a commonly used alias for `formula.prefix.parent`---so common that it
gets defined and used quite a bit. This patch makes `rack` an official method
of the `Formula` class.
2011-09-16 08:55:38 -07:00
Max Howell
95ce00729c Check Cellar can be made before installing stuff
Refs Homebrew/homebrew#5188.
2011-09-15 10:57:22 +01:00
Jack Nagel
f4c301a827 audit: improve GNU url check
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-13 23:35:31 -05:00
Jack Nagel
ff9042f650 audit: correctly match SourceForge https URLs
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-13 23:35:31 -05:00
Jack Nagel
d95e7079a2 Reset to remote master when updating git clones
When installing with --HEAD, cached repo clones do "git fetch origin"
followed by "git reset --hard". This will only reset the working tree
and index to the state of the local HEAD, but Homebrew will think it's
updated and install anyway. "git reset --hard origin/master" will
achieve the desired result.

Should fix Homebrew/homebrew#7613.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-13 22:26:36 -05:00
Charlie Sharpsteen
555b9d149f formula_installer.rb: Call link before check_PATH
Otherwise, for formula that making the very first install into `sbin`, the
following line will fail with a critical error:

    bin = (HOMEBREW_PREFIX/bin.basename).realpath.to_s

Because `sbin` will not exist until after `link` runs.

This isn't very clean as it moves `check_PATH` away from the other checks in
`caveats`, but I couldn't think of a better hotfix that did not require a bit
of code shuffling and re-writing.
2011-09-13 19:40:51 -07:00
Charlie Sharpsteen
5790935b12 brew-unpack: Apply patches and use formula options
`brew-unpack` now runs `Formula.brew` and copies the stage directory to the
unpack location. This provides two improvements:

  - Patches may be applied. The `patch` metho of the Formula class is
    overloaded such that patches are only applied if the `--patch` option is
    passed to `brew unpack`.

  - Formula can respond better to flags passed by `ARGV`.

Some trickery is pulled to ensure `DATA` is correctly set for each unpacked
formula.
2011-09-12 23:32:01 -07:00
Jack Nagel
b0f5566566 brew-options: add --installed flag
`brew options --installed` will print options for formulae that are
already installed.

Closes Homebrew/homebrew#7565.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-12 15:43:18 -05:00