| Age | Commit message (Collapse) | Author |
|
|
|
Move some stuff formerly in `Library/ENV` around:
- Move `Library/ENV/$XCODE_VERSION` to `Library/Homebrew/env/super` as they are
all superenv wrappers and all symlinks to the same version. We never needed
the "separate shims for separate versions" functionality and it just adds
confusion.
- Move `Library/ENV/pkgconfig` to `Library/Homebrew/env/pkgconfig` to get more
things under `Library/Homebrew`
- Move `Library/ENV/scm` to `Library/scm` as these wrappers are not actually
used by or related to superenv (or stdenv) in any way.
|
|
|
|
* Use vendor Ruby if it's present
* Install vendor Ruby for system without Ruby 2.x
|
|
|
|
Autoupdate has been working well for me/opt-in folks for a while so lets
enable it for Homebrew developers to test before we enable it for
everyone.
|
|
* Don't infinitely recurse `brew update --preinstall`.
This could happen when trying to `brew install git` inside `brew update
--preinstall`.
* update.sh: cache Git PATH.
We don’t need to look it up from superenv every time; this is slow.
* update.sh: print message before preinstall updates.
* update.sh: verbose output fetch directory.
This aids reading `brew update --verbose --debug` output.
* update.sh: skip taps without formulae on preinstall.
We don’t need to update them as we’re not invoking them.
* update.sh: don't force update-report on developer preinstall.
This is too slow.
|
|
This is inspired by `safe_system` with basically the same implication
(fail on error), making the name a lot less confusing and avoiding a
clash with the `chdir` function previously defined in `bin/brew`.
Closes #414.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
|
|
This avoids `xcrun` popups when installing Homebrew on a non-Xcode
non-CLT machine.
|
|
Originally introduced by me in 77975168e0f2d5e6627d049d6055bc159e3fd89d.
|
|
No need to source `cmd/update.sh` if `homebrew-update` is not going to
be called directly. Amends 750bb24a787dc6e4a13f2b842a3e8dcb8d5fb761.
|
|
|
|
git is also used in analytics.sh
|
|
Preinstall update should be performed in a separate process,
so it can maintain and close its own update lock.
|
|
|
|
|
|
- When running `brew update` and there’s been no changes from upstream
on any repositories there’s no need to call the (relatively) slow `brew
update-report` when we already know what it will say (“Already up-to
date.”).
- When any`git fetch`es fail then throw out an error at the end of the
output and produce a failing exit code (closes #65).
|
|
|
|
This is a nicer error message than the `exec` failing at a later stage.
|
|
- add `HOMEBREW_PRODUCT` global variable
- only differentiate between `/usr/local` and `non-/usr/local` Homebrew
prefixes to avoid sharing sensitive user information
- note if e.g. build errors are occurring under CI
- Add `HOMEBREW_NO_ANALYTICS` variable (this will be how people opt-out
when this is enabled for everyone)
- Add `HOMEBREW_ANALYTICS_DEBUG` variable to output all the analytics
that are sent
- Move Bash analytics code to `Library/Homebrew/utils/analytics.sh`
- Add documentation for our analytics and why/what/when/how and opt-out
- Only official Homebrew commands are reported
- Ruby analytics are now reported in a forked, background process
|
|
Also, slightly tweak the behavior of `brew update` in this case so that
it doesn't print annoying output and still allows the `brew edit` flow
for people with `HOMEBREW_DEVELOPER` set.
|
|
This is also used by `brew <cmd> --help`. The basic idea is to have the
documentation as a top level comment in each command file. To find these
comments, they have to be like this `#:`.
This is also used by the `brew man` command to keep the documentation
DRY, and for that there are now a header and footer for the man page.
|
|
This should prevent issues like #47 and make us more resilient.
|
|
`uname -p` seems to be less useful on Linux (Debian 8 yields `unknown`),
thus prefer `uname -m` on those systems to determine the processor type.
Closes #35.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
|
|
On Linux (and other non-OS X platforms), `HOMEBREW_OS_VERSION` was
*always* replaced with the product name, leading to less useful user
agent. E.g., on a reasonably up-to-date Debian system:
Linuxbrew/0.9.9 (Linux; unknown Linuxbrew)
With this fix the user agent is instead (first if `lsb_release` is
available and outputs something, second otherwise):
Linuxbrew/0.9.9 (Linux; unknown Debian GNU/Linux 8.3 (jessie))
Linuxbrew/0.9.9 (Linux; unknown 3.16.0-4-amd64)
|
|
Bash can read directly from a file in its command substitution.
|
|
Use `printf -v` and strip out the unnecessary `echo`, thus avoiding two
unnecessary command substitutions.
|
|
For uses like this one, `case` is much more compact and easier to read.
|
|
|
|
If analytics are enabled and `brew` is used in a command substitution
context, e.g. `brew search` for tab completion, the result is that even
though the Google Analytics `curl` process runs in the background it
still is attached to the captured `stdout`, thus could theoretically
contribute to the result of the command substitution and consequently
makes the command substitution block on the completion of this process.
Redirecting `stdout` (and `stderr` for good measure) to `/dev/null`
makes this process truly asynchronous in these contexts.
Furthermore, even if the process is in the background, it is still
included in the shell's job list and thus shell internals like `wait`
(used in `cmd/update.sh`) have to wait on this process, even if they
never intended to do so. Removing the analytics process from the job
list via `disown` avoids this unintended effect.
Fixes #29.
Closes #34.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
|
|
Add the first Google Analytics usage to monitor the command names that
are run by Homebrew.
|
|
Generally it seems user agents are all `software/version` but ours is
not. Also, set the user agent in a way that it's shared between Bash
and Ruby code.
Closes https://github.com/Homebrew/legacy-homebrew/pull/50480.
|
|
* move shell completion scripts to where can be auto picked up
Let's use switching new remote as opportunity to put shell completion
scripts to where they should be and avoid git conflict during the process.
* add Library/Formula and Library/Aliases symlinks
Formulae and Aliases has been relocated to homebrew/core tap.
The symlinks are pointed to new location to keep backward compatibility.
* remove formula_renames and tap_migrations
They have been replaced by the json files in the core tap.
* update: set new remote
* bump Homebrew version to 0.9.9
|
|
So we can know whether a Homebrew installation is pre or post
core/formula separation.
Will update to 0.9.9 when moving core code to new repo.
|
|
This needs to be `Homebrew $HOMEBREW_VERSION` so we can be adequately
filtered.
Closes Homebrew/homebrew#49961.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
|
|
Follow-up to Homebrew/homebrew#49327 that leaves empty argument handling to the Ruby code
(it is a bit more sophisticated and distinguished between `help` and an
empty argument list and treats them differently) instead of hard-wiring
the former to the `help` command.
Closes Homebrew/homebrew#49538.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
|
|
This is a follow-up fix to a minor oversight in Homebrew/homebrew#49523.
|
|
Fixes Homebrew/homebrew#49325.
Closes Homebrew/homebrew#49327.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
`bin/brew` is getting a bit bloated and it's annoying to open all of
`HOMEBREW_PREFIX` in your editor of choice and have it search through
the `Cellar`. Let's instead keep the bare minimum in `bin/brew` and
move the rest to `Library`.
Closes Homebrew/homebrew#49185.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|