Documentation ¶
Index ¶
- Variables
- func FilterInstalled[T formula.Formula](p Prefix, list []T) (uninstalled []T, installed []T, err error)
- func KegKegLinkDirectories() []string
- type LinkOptions
- type Prefix
- func (p Prefix) AnyInstalled(f formula.Formula) bool
- func (p Prefix) BrokenLinks() ([]string, error)
- func (p Prefix) Cellar() string
- func (p Prefix) CompatibleWithCellar(f formula.PlatformFormula) error
- func (p Prefix) DataPath() string
- func (p Prefix) FormulaKegPath(f formula.Formula) string
- func (p Prefix) FormulaLink(f formula.Formula, opts *LinkOptions) (int, int, error)
- func (p Prefix) FormulaOutdated(f formula.Formula) (bool, error)
- func (p Prefix) FormulaOutdatedFromName(name, latest string) (bool, error)
- func (p Prefix) InstalledKegs(f formula.Formula) ([]keg.Keg, error)
- func (p Prefix) InstalledKegsByName(names ...string) ([]keg.Keg, error)
- func (p Prefix) KegPath(name, version string) string
- func (p Prefix) Kegs() ([]keg.Keg, error)
- func (p Prefix) Library() string
- func (p Prefix) Link(name, version string, opts *LinkOptions) (int, int, error)
- func (p Prefix) LinkedFiles(kegs ...string) ([]string, error)
- func (p Prefix) LinkedKegRecords() string
- func (p Prefix) Locks() string
- func (p Prefix) MustExistDirectories() []string
- func (p Prefix) MustExistSubdirectories() []string
- func (p Prefix) NewErrNoSuchKeg(name string) error
- func (p Prefix) Opt() string
- func (p Prefix) OptLink(name, version string, opts *symlink.Options) error
- func (p Prefix) OptRecord(name string) string
- func (p Prefix) PinnedKegRecords() string
- func (p Prefix) Pour(btl io.Reader) error
- func (p Prefix) Racks() ([]rack.Rack, error)
- func (p Prefix) ShimsPath() string
- func (p Prefix) String() string
- func (p Prefix) Uninstall(kegs ...string) error
Constants ¶
This section is empty.
Variables ¶
var ( // KegLinkDirectories. KegLinkDirectories = []string{ "bin", "etc", "include", "lib", "sbin", "share", "var", } // MustExistSubdirectories. MustExistSubdirectories = []string{ "bin", "etc", "include", "lib", "sbin", "share", } // These paths relative to the keg's share directory should always be real directories in the prefix, never symlinks. KegSharePaths = []string{ "aclocal", "doc", "info", "java", "locale", "man", "man/man1", "man/man2", "man/man3", "man/man4", "man/man5", "man/man6", "man/man7", "man/man8", "man/cat1", "man/cat2", "man/cat3", "man/cat4", "man/cat5", "man/cat6", "man/cat7", "man/cat8", "applications", "gnome", "gnome/help", "icons", "mime-info", "pixmaps", "sounds", "postgresql", } )
Functions ¶
Types ¶
type Prefix ¶
type Prefix string
Prefix represents a Homebrew prefix.
func Default ¶
func Default() Prefix
Default returns the default Homebrew prefix value. Matches the behavior of the "$(brew --prefix)" command. Obeys the HOMEBREW_PREFIX environment variable to override.
func (Prefix) AnyInstalled ¶
AnyInstalled reports if any versions of the given formula are installed.
func (Prefix) BrokenLinks ¶
BrokenLinks finds all broken links in the prefix.
func (Prefix) CompatibleWithCellar ¶
func (p Prefix) CompatibleWithCellar(f formula.PlatformFormula) error
CompatibleWithCellar reports whether the Formula's Bottle is compatible with the Prefix's Cellar.
func (Prefix) FormulaKegPath ¶
FormulaKegPath produces the keg for a formula.
func (Prefix) FormulaLink ¶
FormulaLink links a keg from the Cellar into the prefix.
func (Prefix) FormulaOutdated ¶
FormulaOutdated reports whether the formula is outdated.
func (Prefix) FormulaOutdatedFromName ¶
FormulaOutdated reports whether the formula is outdated.
func (Prefix) InstalledKegs ¶
InstalledKegs returns all currently installed prefix directories.
func (Prefix) InstalledKegsByName ¶
InstalledPrefixes returns all currently installed prefix directories.
func (Prefix) Link ¶
Link links a keg from the Cellar into the prefix.
TODO: make sure etc and var directories are installed correctly: https://github.com/Homebrew/brew/blob/caff1359de1ae7ac198fa7081d905d2a535af3a1/Library/Homebrew/formula.rb#L1339
func (Prefix) LinkedFiles ¶
LinkedFiles finds all files in the prefix that link into the given kegs.
func (Prefix) MustExistDirectories ¶
MustExistDirectories.
func (Prefix) MustExistSubdirectories ¶
MustExistSubdirectories.
func (Prefix) NewErrNoSuchKeg ¶
NewErrNoSuchKeg creates an error when a keg is not found.