aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/migrator.rb
AgeCommit message (Collapse)Author
2018-03-02Merge pull request #3864 from MikeMcQuaid/migrator-upgrade1.5.8ilovezfs
migrator: recommend upgrade.
2018-03-02migrator: recommend `brew upgrade`.Mike McQuaid
You’re in a weird middle state if you run `brew update` but haven’t upgraded a migrated formula.
2018-03-02migrator: overwrite by default.Mike McQuaid
This avoids getting into an invalid state which will and does break for users.
2017-10-18Use “squiggly” heredocs.Markus Reiter
2017-10-08Clean up code style and remove `.rubocop_todo.yml`.Markus Reiter
2017-06-02Re-revert "Fix operator spacing."Markus Reiter
2017-05-25Rename `FormulaLock` to `LockFile`.Markus Reiter
2017-03-31migrator: don't uninstall new_cellar if it existedMike McQuaid
Otherwise we could end up removing files unnecessarily.
2017-03-31migrator: check if taps are from same user insteadMike McQuaid
This avoids needing to use `force: true` and still let's Homebrew do what we want with our own taps.
2017-03-31migrator: relink linked new_cellar kegs.Mike McQuaid
2017-03-31migrator: make headers more consistent.Mike McQuaid
Use `oh1` for moving kegs to a new directory.
2017-03-31migrator: move around some migration logic.Mike McQuaid
Move the checks for moving kegs to a new directory into the relevant method (`move_to_new_directory`) instead. Also, delete duplicated directories when we’ve confirmed they are definitely duplicated rather than telling users to do so.
2017-03-31migrator: add more helper methods.Mike McQuaid
Add methods to determine if a migration is needed and perform it if so (and no-op if not). Additionally, make `ARGV.force?` get passed as a parameter so it can be overridden without requiring users to pass `—force`.
2017-03-30Fix handling of tap migrations to new cask names.Mike McQuaid
Need to check for two `/`s rather than one.
2017-03-23migrator: allow new cellar to exist alreadyilovezfs
Lets us migrate a formula to a name that may have previously been used. If gnupg 1.x is installed as "gnupg" and gnupg 2.x is installed as "gnupg2," it's currently not possible to rename gnupg2 -> gnupg, since the 1.4 keg will already be installed in the "gnupg" Cellar, so in order to reclaim the name "gnupg" to be used for 2.1, either 1.x must be manually uninstalled, or the new cellar needs to be allowed to exist already.
2016-11-03Correct a few typosMandar Gokhale
...and update man pages where applicable
2016-10-01Add `Formatter` module.Markus Reiter
2016-10-01Refactor Tty.Markus Reiter
2016-09-24RuboCop: Style/AccessorMethodNameMarkus Reiter
2016-09-24Fix Style/GuardClause.Markus Reiter
2016-09-23Fix Style/IfUnlessModifier.Markus Reiter
2016-09-17rubocop --auto-correct all hash-rocket usage.Mike McQuaid
2016-09-17rubocop --auto-correct all remaining files.Mike McQuaid
But remove some manual `.freeze`s on constants that shouldn't be constants.
2016-09-15Use constants for LinkedKegs/PinnedKegs/Locks.Mike McQuaid
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-03-08migrator: use Tap#core_tap?Xu Cheng
2016-02-26various: use Tap abstractionXu Cheng
formula_rename and tap_migrations are now handled inside Tap. Closes Homebrew/homebrew#49549. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-12-09migrator: tap is a Tap object nowXu Cheng
2015-12-03centralize the logic of handling `homebrew-` in Tap.fetchXu Cheng
Closes Homebrew/homebrew#46537. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-25migrator: link Cellar and opt before the keg.Mike McQuaid
When there's absolute symlinks in a linked directory in the `keg` (e.g. `bin`)that point to the `Cellar` or `opt` then linking the `keg` will fail before the `Cellar` or `opt` has been linked. Closes Homebrew/homebrew#44306. Closes Homebrew/homebrew#44329. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-09-03fix style problems in migratorVlad Shablinsky
Closes Homebrew/homebrew#43473. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-24migrator: #each.map is redundantMisty De Meo
2015-08-20migrator: skip check for same taps if --forceVlad Shablinsky
2015-08-20lock keg during migrationXu Cheng
2015-08-15migrator: better exception printingXu Cheng
2015-08-15migrator: don't use installed_prefixVlad Shablinsky
Link the keg that was linked before migration. Don't use newformula.installed_prefix to detect keg to link, because it can break things (i.e. if intalled formula is outdated, then newformula.installed_prefix can be not the same as installed prefix before update). Closes Homebrew/homebrew#42857. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-15migrator: don't link newname if oldname isn't linkedVlad Shablinsky
- link newname only if oldname used to be linked - optlink newname only if oldname used to be optlinked.
2015-08-15migrator: check if old_opt_record exist before using realpathVlad Shablinsky
- check if old_opt_record exist before using realpath - don’t check old_opt_record.exist? in link_old_opt because it doesn’t have to exist.
2015-08-14outdated: check if formula needs to be migrated.Mike McQuaid
Closes Homebrew/homebrew#42938.
2015-08-10update tabs only if core formula installedVlad Shablinsky
Closes Homebrew/homebrew#42745. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-10add migrator class for migrating renamed formulaeVlad Shablinsky