aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/keg.rb
AgeCommit message (Collapse)Author
2016-11-13keg: don't rely on #to_formulaAlyssa Ross
It doesn't always work. For example, a keg could have been installed with a formula from a URL, which Homebrew now does not know how to access. Fixes #1496.
2016-10-25uninstall: go easier on the integration testsAlyssa Ross
2016-10-25uninstall, keg: update styleAlyssa Ross
2016-10-25uninstall: call Formula#missing_dependencies directlyAlyssa Ross
2016-10-25uninstall: only <=1 Diagnostic.missing_deps callAlyssa Ross
2016-10-25Revert "keg: fallback to missing_deps if deps not in tab"Alyssa Ross
This reverts commit da1caba17c624f03fa8e6fbe59683f57fb7ac17a.
2016-10-25keg: fallback to missing_deps if deps not in tabAlyssa Ross
2016-10-25keg: rename #formula to #to_formulaAlyssa Ross
@vladshablinsky pointed out that other Homebrew classes, like Dependency, use #to_formula.
2016-10-25uninstall: consistent spelling of "dependent"Alyssa Ross
@ilovezfs pointed out that Homebrew generally uses "dependent", rather than "dependant".
2016-10-25uninstall: refuse when dependants still installedAlyssa Ross
Closes #934.
2016-09-24Fix Style/GuardClause.Markus Reiter
2016-09-23Style/Alias: Prefer `alias`.Markus Reiter
2016-09-23Fix Style/RegexpLiteral.Markus Reiter
2016-09-23Fix Style/CaseIndentation.Markus Reiter
2016-09-23Fix Lint/EndAlignment.Markus Reiter
2016-09-18keg: only prune var/homebrew/linked.Mike McQuaid
`var/homebrew` is too broad and ends up deleting and recreating the locks directory repeatedly.
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-16Move LinkedKegs/PinnedKegs/Locks from Library.Mike McQuaid
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-15Merge pull request #966 from MikeMcQuaid/keg-lock-constantsMike McQuaid
Use constants for LinkedKegs/PinnedKegs/Locks.
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-09-15keg: add ALL_TOP_LEVEL_DIRECTORIES constant.Mike McQuaid
This is used in diagnostic (and will be used in other places later) rather than hard-coding other directories later.
2016-09-12keg: make guile's site-dir persistentDominyk Tiller
Things that install Guile scheme objects should be doing so in HOMEBREW_PREFIX/share/guile/site, which should be persistent rather than a symlink to any formulae's Cellar, not even guile's necessarily as https://github.com/Homebrew/homebrew-core/commit/f061d864d99da4064a763ba51a37ecf3cff8943c managed to expose. I believe guile isn't actually configured correctly to expect this directory, but since absolutely nobody has complained to date as far as I can find & `gnutls` seems to be the only formula using it this way the temptation is to leave it misconfigured & use this directory for site schemes. I don't really know the deeper issues around messing with Guile's configuration so going for a minimal fix seems the safest option.
2016-08-05various: eliminate the usage of `any?` (#638)Xu Cheng
`any?` is not the opposite of `empty?`. Besides the case that `[false, nil].any?` will return false, `any?`(O(n)) has much worse performance than `empty?`(O(1)).
2016-07-17Keg#link: run optlink firstXu Cheng
This prevents a link conflict during `brew upgrade` causing opt link stuck to old version. At this point, users will have to run `brew switch` to fix it. Closes #533. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-06-21bottle: delete .pyo files as with .pyc (#382)Luca Favatella
This should make more bottles relocatable e.g. ansible. .pyo files are bytecode as .pyc files but optimized - [ref](https://www.python.org/dev/peps/pep-0488/) Ref https://github.com/Homebrew/homebrew-core/pull/2125#issuecomment-226987124
2016-05-15Synchronize counts for link and unlink (#242)Paolo G. Giarrusso
Closes #239.
2016-01-19keg: mkpath on lua sharesDominyk Tiller
Closes Homebrew/homebrew#48134.
2016-01-09add Keg#empty_installation?Xu Cheng
Avoid using `FormulaAuditor` in `FormulaInstaller`. Closes Homebrew/homebrew#47887. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-12-30pathname: store file count and disk usage.Rakesh
especially for directory instances of `Pathname` class and all instances of `Keg` class.
2015-11-17move more deprecated methods to compat folderXu Cheng
2015-11-07keg: mkpath for share/postgresqlXu Cheng
2015-11-01keg.rb: guard against nonexistent site-lisp subdirAlex Dunn
Fixes Homebrew/homebrew#45596.
2015-11-01stricter audit for Emacs Lisp installsAlex Dunn
Require that the subdirectory in site-lisp match the formula name exactly. This lets us provide better information in the caveats and will make it easier for helper methods to write to the correct location (as in in Homebrew/homebrew-emacs#13).
2015-10-20linkapps: stop linking .app bundles from 'bin/'Martin Afanasjew
`Keg#app_installed?` only checks the formula prefix and `libexec/` for .app bundles to determine if a formula provides any. This is used by `Caveats#app_caveats` to generate an appropriate message. The same list should be used by `brew linkapps` for consistency. Reduce likelihood of future inconsistencies by creating `Keg#apps` and using it in place of the duplicate code. Closes Homebrew/homebrew#45173. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-10-08keg: add java to SHARE_PATHSM Jordan Stanway
Add `java` to `SHARE_PATHS` so that `HOMEBREW_PREFIX/share/java` is a folder with symlinks in it, rather than a symlink to a folder for a specific formula. This way we avoid conflicts if multiple formulas put `jar` files in the standard location `HOMEBREW_PREFIX/share/java`. See also: [pull request 44420](https://github.com/Homebrew/homebrew/pull/44420) Closes Homebrew/homebrew#44456. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-09-06Keg#unlink: prune directory for dry_run as wellXu Cheng
2015-09-06Added --dry-run to unlinkEthan Piekarski
Closes Homebrew/homebrew#43561. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-27keg: mkpath for mecabXu Cheng
2015-08-23keg: mkpath for lib/gioXu Cheng
2015-08-20also lock oldname when appliedXu Cheng
2015-08-17update opt for renamed formulaVlad Shablinsky
After the formula gets renamed oldname opt is created and it points to the linked keg. However if we then upgrade newname oldname opt still points to the same keg it pointed before upgrade. The commit fixes this behaviour thus that oldname opt links at the same keg opt point.
2015-08-15Don't try to link symlinks over their targetsTim D. Smith
If we have lib/python3.4/site-packages, which is a symlink to HOMEBREW_PREFIX/lib/python3.4/site-packages, link will be confused. This only appears after unlinking and relinking because this symlink is created in post_install, which runs after the first link. Fixes Homebrew/linuxbrew#502. Closes Homebrew/homebrew#42891.
2015-08-15make path instead of symlink for lib/RTim D. Smith
Moves us towards being able to support formulae that install R bindings, like nonpareil in homebrew-science. Some discussion in Homebrew/homebrew-science#2559. Closes Homebrew/homebrew#42539.
2015-08-03Core files style updates.BrewTestBot
Closes Homebrew/homebrew#42354. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-01Automatic caveats for emacs lisp filesAlex Dunn
- The name of the subdirectory under site-lisp may not be exactly the same as the name of the package - `(normal-top-level-add-subdirs-to-load-path)` adds every subdirectory of `default-directory` to the load-path, so users don't have to update their load-path for every package they install. Closes Homebrew/homebrew#42309.
2015-07-18keg_relocate: relocate all text files.Mike McQuaid
Work out what's text and what's not using `file`. Also, rename `keg_fix_install_names` to `keg_relocate` because that's a more accurate description of what it does now. Closes Homebrew/homebrew#41663. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-07-18keg: mkpath for fish related directoriesXu Cheng
Fixes Homebrew/homebrew#41742. Closes Homebrew/homebrew#41849. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-06-02Add support for fish shell completionsJohannes Wienke
* Library/Homebrew/caveats.rb: add caveats comparable to other shells * Library/Homebrew/formula.rb: define completion directory along the conventions explained in the fish documentation for $fish_complete_path * Library/Homebrew/keg.rb: add fish shell to check function for installed completions Closes Homebrew/homebrew#39828. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-05-27keg: add rack methodXu Cheng
2015-03-29keg: explicitly create cmake dir under libBen Morgan
Packages supporting CMake may install configuration files for use with CMake's find_package command. A recommended location for these is `<prefix>/lib/cmake` which is not unique across packages. This may cause issues for Formula using this location when their Keg is linked. As with pkg-config, explicitly create the `lib/cmake` folder when linking a Keg that has installed folders/files to this location. Also add testcase. Closes Homebrew/homebrew#38005. Signed-off-by: Xu Cheng <xucheng@me.com>