Rationale: people break their installs by mixing sudo and non-sudo usage. They are used to having to `sudo port install` and shit like that, so I understand why the mixing happens.
* may be a problem if the constant is scoped (like A::B), but this is not the case
(const.split('::').inject(Object) { |c, part| c.const_get part } would solve that)
* this was noticed in a comment of 9afc85ad but it has disappeared
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
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.
HOMEBREW_CACHE isn't really helpful in diagnosing problems, and some
people don't like their username / home folder going into bug reports
on the web, so let's take it out.
Passing --installed will limit the list to formulae that you have installed.
Documented this and "brew deps --1" which limits the dependency list to
one level down (direct dependencies).
optparse adds an "options" method to ARGV, and so does Homebrew.
Rename this method (and remove optparse blocking script) so that
Homebrew plays nicer with external Ruby software.
This fixes the issue where "gem install thin" would break
"brew server", for instance.
Partly simpler because the output is less pretty. But I think the output is
now more useful for other tools. And comma separated lists aren't particularly
human-readable IMO either.
* Add path to external command examples to PATH.
* Only add them to PATH from inside Homebrew.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
* Move external commands path down near check
"brew --env" will set up a build environment and then dump certain ENV
variables (CC, CXX, LD, CFLAGS, CXXFLAGS, MAKEFLAGS).
If any of CC, CXX, LD are symlinks, now also output the target compiler.
(Typically these will be symlinks from eg /usr/bin/cc to /usr/bin/gcc-4.2).
This is a diagnostic command which may be merged into --config, turned
into an external command, or removed if it doesn't turn out to be useful.
While it is useful to be able to see the user's path in bug reports, it is
perhaps slightly too intrusive to post this without the user's permission.
A path can have usernames or other project sensitive information, and several
Homebrew users were editing their bug reports to omit this information.
`brew doctor` will still report on the path issues that we typically care
about, so dropping automatic posting of PATH.