138 Commits

Author SHA1 Message Date
Xu Cheng
7ba9eabc14 uses/deps: default to skip optional/build deps.
Also add options to include optional/build deps and an option
to skip recommended deps.

Closes Homebrew/legacy-homebrew#50066.
2016-04-16 21:47:47 +08:00
Max Nordlund
fa1fd70a37 Add all the top level comments 2016-04-10 22:59:25 +02:00
Alexis Hildebrandt
a9b380539c brew-deps: improved --tree formatting
Use proper BOX DRAWINGS LIGHT VERTICAL unicode character.

Closes Homebrew/homebrew#46158.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-11-19 10:20:40 +01:00
Xu Cheng
d6a50f1e76 deps: remove duplicated entires
Fixes Homebrew/homebrew#43955

Closes Homebrew/homebrew#43966.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-16 19:57:37 +08:00
BrewTestBot
13d544e11e Core files style updates.
Closes Homebrew/homebrew#42354.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03 13:22:35 +01:00
Alex Dunn
d2c1a182d5 cmd/deps: --tree shows required dependencies only
Until we figure out how to allow --tree to show optional dependencies in
a way that fits on a normal screen, this helps to explain the
discrepancy between `brew deps` and `brew deps --tree`.

Closes Homebrew/homebrew#41841.
Closes Homebrew/homebrew#41947.
2015-07-21 09:44:15 -07:00
Misty De Meo
90af721152 deps: Array#keep_if isn't defined in 1.8.7
Fixes Homebrew/homebrew#41365.
2015-07-04 18:26:08 -07:00
Baptiste Fontaine
919698fdde brew deps --installed support for formulae
Closes Homebrew/homebrew#40233.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-06-03 00:35:26 +02:00
Baptiste Fontaine
9e6934d00c brew-deps: improved --tree formatting
Closes Homebrew/homebrew#40018.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-05-29 19:26:27 +02:00
Xu Cheng
06133a8ae8 deps: use Formula#full_name 2015-05-29 17:02:22 +08:00
Xu Cheng
8b57871220 uses/deps: fix for recursive deps/reqs
Closes Homebrew/homebrew#39906.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-05-20 16:29:15 +08:00
Mike McQuaid
a09641a581 deps: allow skipping build, optional deps. 2015-03-23 13:30:54 +00:00
Jack Nagel
10a1952d2c Only "extend self" once on the Homebrew module 2014-06-19 13:10:36 -05:00
tduehr
c101919a2e Add brew deps --union
The default behavior of `brew deps foo bar` is to return the
intersection of the deps of foo and bar. This option returns the union.

Closes Homebrew/homebrew#27480.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-05-06 21:06:23 -05:00
Jack Nagel
4002abb146 deps: use Dependency objects in recursive_deps_tree 2014-02-27 12:56:59 -06:00
Jack Nagel
87cbe716d9 deps: keep "--all" output sorted 2014-02-27 12:56:42 -06:00
Jack Nagel
aafae73cf9 Fix regression in brew deps
The default mode is intended to display recursive dependencies, with the
`--1` flag to display only one level.
2013-11-02 22:22:45 -05:00
Mike McQuaid
d6ffd493a6 deps: don't use symbol-like output by default. 2013-10-30 13:13:41 -07:00
Mike McQuaid
34d836872f deps: display requirements default_formulae. 2013-10-30 10:48:53 -07:00
Adam Vandenberg
ae9401291d fix deps
Closes Homebrew/homebrew#21113.
2013-07-10 06:59:45 -07:00
Jack Nagel
2356a6d874 deps: allow "--installed --tree" 2013-06-22 12:54:46 -05:00
Jack Nagel
a02d5f33b4 deps: use OpenStruct to capture the mode 2013-06-22 12:54:46 -05:00
Jack Nagel
c2faf2a0ca deps: remove need for Array extension 2013-06-22 12:54:45 -05:00
Jack Nagel
6790f6adb0 deps: extract output methods 2013-06-22 12:54:45 -05:00
Jack Nagel
d28deee516 deps: move recursive_deps_tree into Homebrew module 2013-06-09 12:59:42 -05:00
Jack Nagel
2517969585 deps: fix --1 output
Fixes Homebrew/homebrew#17550.
Closes Homebrew/homebrew#19668.
2013-05-10 23:45:30 -05:00
Jaime Marquínez Ferrándiz
adbd8cee6d New visualization for brew deps --tree
Closes Homebrew/homebrew#18835.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-04-13 20:32:45 -05:00
Matt Torok
5f2f6a35dd Added '--installed' option to deps command.
When deps command is passed this option, it will only show the dependencies
for the installed forumas. This option overrides the '--all' option.

Closes Homebrew/homebrew#18276.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-03-05 19:43:12 -08:00
Jack Nagel
109145bf21 Replace usages of recursive_deps with recursive_dependencies 2013-01-26 12:14:49 -06:00
Jack Nagel
e629f14d56 Remove <=> from Dependency interface
It is important that dep equality corresponds to the name attribute, but
we may want to use the Comparable interface to sort them by installation
order in the future. Code that needs to sort them alphabetically should
just use sort_by.
2013-01-13 21:01:15 -06: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
Jack Nagel
1a3a1249bf Warn the user of required arguments
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-04 00:27:05 -06:00
Jack Nagel
8b88ea3eae Move brew-depstree into brew deps --tree
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-11-27 23:29:41 -06:00
Adam Vandenberg
0523f66bec deps: document -n switch 2011-06-15 09:02:18 -07:00
Adam Vandenberg
bfd75db803 brew deps: add hidden option -n
-n means 'natural order' instead of alpha-order, and will show
the order in which the deps will be installed.
2011-04-13 13:48:31 -07:00
Adam Vandenberg
1eec1ed20f Make brew deps Leopard compatible 2011-04-10 21:13:05 -07:00
Max Howell
e96744eb6f brew deps foo bar now gives the dependency intersection
Rationale: this is more useful than the union, and you can still easily get the union by running the command twice and concatenating the result.
2011-03-12 11:55:04 -08:00
Max Howell
768910283a Refactor the brew command into one file per command
The code was sucking. To the extent that maintenance was hard. It's a lot
easier to work with code that is sensibly split at sensible boundaries. So
now it is more like that.

But the refactor is minimal. Because we don't want you to have more merge
hell than absolutely necessary.

If you merge you will need to pay attention to brew.h.rb (as it is deleted)
and bin/brew (as command logic is gone). It will be painful, but you will just
have to help git out by moving any changes around manually.

Note compatibility.rb. It ensures that any function renames or removals don't
break anything. We're pretty serious about backwards compatibility. And that's
because we encourage you to hack around with the innards. And we couldn't do
that if we would then just make stuff disappear behind your back.
2011-03-12 11:55:02 -08:00