Documentation ¶
Index ¶
- Variables
- func FilterInstalled[T formula.Formula](p Prefix, list []T) (uninstalled []T, installed []T, err error)
- func KegKegLinkDirectories() []string
- type Keg
- type LinkOptions
- type Prefix
- func (p Prefix) AnyInstalled(f formula.Formula) bool
- func (p Prefix) BrokenLinks() ([]string, error)
- func (p Prefix) CanPourBottle(ctx context.Context, f formula.PlatformFormula) error
- func (p Prefix) CanPourBottles(ctx context.Context, formulae []formula.PlatformFormula) 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) (links, files int, err 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, error)
- func (p Prefix) InstalledKegsByName(names ...string) ([]Keg, error)
- func (p Prefix) KegPath(name, version string) string
- func (p Prefix) Kegs() ([]Keg, error)
- func (p Prefix) Library() string
- func (p Prefix) Link(name, version string, opts *LinkOptions) (links, files int, err 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, error)
- func (p Prefix) ShimsPath() string
- func (p Prefix) String() string
- func (p Prefix) Uninstall(kegs ...string) error
- type Rack
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 Keg ¶ added in v0.2.0
type Keg string
Keg represents a keg as its path.
type Prefix ¶
type Prefix string
Prefix represents a Homebrew prefix.
func EnvOrDefault ¶ added in v0.2.0
func EnvOrDefault() Prefix
EnvOrDefault returns the Homebrew prefix value set by the HOMEBREW_PREFIX environment variable or the default Homebrew prefix value.
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) CanPourBottle ¶ added in v0.2.0
CanPourBottle verifies that the PlatformFormula's bottle can be poured.
func (Prefix) CanPourBottles ¶ added in v0.2.0
CanPourBottles verifies that all formulae's bottles can be poured.
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 ¶
func (p Prefix) Link(name, version string, opts *LinkOptions) (links, files int, err error)
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.