3352 Commits

Author SHA1 Message Date
Mike McQuaid
a2f19f0a67 update-report: tweak migration messaging
References #1023.
2016-09-19 09:52:13 +01:00
Mike McQuaid
6e1312d4a1 Merge pull request #1011 from MikeMcQuaid/migrate-legacy-repository-everyone
update-report: migrate everyone to new repository.
2016-09-19 09:05:14 +01:00
Mike McQuaid
167af26a24 Merge pull request #1019 from MikeMcQuaid/macos-rename
Use new "macOS" naming where appropriate.
2016-09-19 08:17:36 +01:00
Andrew Janke
245838d86d info: print requirements 2016-09-18 19:44:41 -04:00
Mike McQuaid
d0204207ed update-report: remove cask dir after migration.
This will hang around otherwise due to e.g. running `bundle install` in
here once.
2016-09-18 21:42:44 +01:00
Mike McQuaid
42e9782dd6 update-report: cleanup git harder in migration.
Before stashing also try to cancel any current merge, rebase and
reset. This will prevent any data loss but also make the stash more
likely to succeed.
2016-09-18 20:25:18 +01:00
Mike McQuaid
027d8923f2 Merge pull request #1018 from MikeMcQuaid/update-migration-create-cellar
update-report: also create Cellar on migration.
2016-09-18 20:18:53 +01:00
Mike McQuaid
8bae49941c outdated: prefer .join over *. 2016-09-18 19:58:12 +01:00
Alyssa Ross
d3788c58ef brew outdated: use full name in verbose 2016-09-18 19:58:12 +01:00
Alyssa Ross
c874b4e4c2 install: don't install alias if already installed 2016-09-18 19:58:11 +01:00
Alyssa Ross
2a683f2569 upgrade, outdated: follow alias changes 2016-09-18 19:58:09 +01:00
Mike McQuaid
3f9cce0a03 Use new "macOS" naming where appropriate.
Not quite a mass replacement as I've used OS X and Mac OS X where
describing specific older versions and added compatibility methods
for things in the DSL.
2016-09-18 19:57:19 +01:00
Mike McQuaid
fc04d8f4f6 update-report: also create Cellar on migration.
Just on the off chance it doesn't exist (i.e. no-one has installed
anything yet or you're a `test-bot` that's run `git clean -xdf`
recently)
2016-09-18 19:32:29 +01:00
Mike McQuaid
ee0fb3e999 update-report: handle directory not existing.
This shouldn't be possible to occur after #1013 but it makes sense to
add it anyway.
2016-09-18 16:55:59 +01:00
Mike McQuaid
89ebffadec update-report: create top-level directories later.
Otherwise if they are created and empty they may be removed again
before we try to create the `/usr/local/bin/brew` symlink.
2016-09-18 16:06:49 +01:00
Mike McQuaid
72d0154454 update-report: migrate everyone to new repository.
Also migrate people without `HOMEBREW_DEVELOPER` set to the new
location.
2016-09-18 15:44:06 +01:00
Mike McQuaid
e20467971e Merge pull request #963 from MikeMcQuaid/migrate-repository
update-report: migrate /usr/local repository.
2016-09-18 15:41:04 +01:00
Mike McQuaid
ad466452de Merge pull request #1007 from MikeMcQuaid/update-remote-ref
update.sh: turn origin/branch into a variable.
2016-09-18 15:32:44 +01:00
Mike McQuaid
0a09ae30f8 update-report: migrate /usr/local repository.
Migrate a HOMEBREW_REPOSITORY and HOMEBREW_PREFIX of `/usr/local` so
that the HOMEBREW_REPOSITORY is now in `/usr/local/Homebrew`. This gives
us more flexibility on changing the repository layout in future and
avoids putting junk in `/usr/local` when not necessary (e.g. our
`README.md`).
2016-09-18 13:49:02 +01:00
Mike McQuaid
d70841db2b update.sh: turn origin/branch into a variable.
Rather than repeating origin multiple times.
2016-09-18 13:45:32 +01:00
Mike McQuaid
3982950e61 rubocop --auto-correct all hash-rocket usage. 2016-09-17 16:14:13 +01:00
Mike McQuaid
8f1ae3b28b Move LinkedKegs migration.
Move the `LinkedKegs` migration into `utils.rb` so it can also be called
from `brew.rb` on startup.
2016-09-17 15:00:46 +01:00
Mike McQuaid
8aa18510c4 Always run LinkedKegs migration (if needed).
Ensure that `brew update` always runs the LinkedKegs migration if needed
as it may not have been run by `brew update` if it was using `--preinstall` or
a `git pull` etc.

Also, if the old paths still exist: just use them instead.

Finally, always try to unlink/unpin before link/pin.

Fixes https://github.com/Homebrew/homebrew-core/issues/4918.
2016-09-17 13:25:32 +01:00
Mike McQuaid
e3609b6fd4 Move LinkedKegs/PinnedKegs/Locks from Library.
These don't make sense to be tied to the `HOMEBREW_REPOSITORY` but
instead should live in the `HOMEBREW_PREFIX` as they all relate to its
state.
2016-09-16 13:51:56 +01:00
Mike McQuaid
72d10fff0b Use constants for LinkedKegs/PinnedKegs/Locks.
These definitions are scattered throughout the codebase which makes it
hard to refactor them later (my goal is to move them outside of
HOMEBREW_LIBRARY). Unify their definitions for clearer code and easier
movement later.
2016-09-15 18:28:42 +01:00
Zhiming Wang
54884cd9ce Merge pull request #903 from zmwangx/always-show-dev-commands
cmd/commands: always show developer commands
2016-09-14 02:50:32 -04:00
Mike McQuaid
1174264d47 cmd/uses: fix Rubocop warnings. 2016-09-11 17:59:01 +01:00
Mike McQuaid
2c5beb0eff cmd/upgrade: fix Rubocop warnings. 2016-09-11 17:59:01 +01:00
Mike McQuaid
cc526601cf cmd/update-report: fix Rubocop warnings. 2016-09-11 17:59:01 +01:00
Mike McQuaid
49e009df29 cmd/unpack: fix Rubocop warnings. 2016-09-11 17:59:01 +01:00
Mike McQuaid
7b41ccd2ea cmd/unlinkapps: fix Rubocop warnings. 2016-09-11 17:59:00 +01:00
Mike McQuaid
56fc1c725a cmd/uninstall: fix Rubocop warnings. 2016-09-11 17:59:00 +01:00
Mike McQuaid
a0c29eb1af cmd/tap-info: fix Rubocop warnings. 2016-09-11 17:59:00 +01:00
Mike McQuaid
b9b07fc082 cmd/search: fix Rubocop warnings. 2016-09-11 17:59:00 +01:00
Mike McQuaid
f9c621304d cmd/prune: fix Rubocop warnings. 2016-09-11 17:59:00 +01:00
Mike McQuaid
ae43b79ca2 cmd/missing: fix Rubocop warnings. 2016-09-11 17:59:00 +01:00
Mike McQuaid
4e090530b1 cmd/log: fix Rubocop warnings. 2016-09-11 17:59:00 +01:00
Mike McQuaid
9d782454ab cmd/list: fix Rubocop warnings. 2016-09-11 17:58:59 +01:00
Mike McQuaid
5d761f651a cmd/install: fix Rubocop warnings. 2016-09-11 17:58:59 +01:00
Mike McQuaid
990ee4f36c cmd/info: fix Rubocop warnings. 2016-09-11 17:58:59 +01:00
Mike McQuaid
d9b8d0f6b1 cmd/help: fix Rubocop warnings. 2016-09-11 17:58:59 +01:00
Mike McQuaid
c8084b1743 cmd/fetch: fix Rubocop warnings. 2016-09-11 17:58:59 +01:00
Mike McQuaid
c45e36ffde cmd/doctor: fix Rubocop warnings. 2016-09-11 17:58:59 +01:00
Mike McQuaid
5e0c222029 cmd/desc: fix Rubocop warnings. 2016-09-11 17:58:59 +01:00
Mike McQuaid
128729988e cmd/commands: fix Rubocop warnings. 2016-09-11 17:58:58 +01:00
Zhiming Wang
41efd59d2c
cmd/commands: always show developer commands
Per discussion in #900.

Closes #900.
2016-09-09 18:10:10 -04:00
Mike McQuaid
b5a6b4e8e1 Merge pull request #896 from MikeMcQuaid/no-chown-usr-local
Don't require/recommend ownership of /usr/local.
2016-09-09 09:29:46 +01:00
Mike McQuaid
492391f5fe Don't require/recommend ownership of /usr/local.
Apple reset this on every OS X major (and some minor) updates and it
always proves a painful and unnecessary step. Instead just check the
directories we actually care about are writable.

This may mean if these directories do not already exist (although they
are now created by the installed) that `brew link` will fail and require
manual intervention but this seems to be superior for both new and the
majority of existing users.
2016-09-09 08:06:37 +01:00
Mike McQuaid
027086d673 help: rename help section for developers. 2016-09-08 20:48:38 +01:00
Mike McQuaid
ae57057afa help: use Commands module. 2016-09-08 20:46:55 +01:00