Documentation ¶
Overview ¶
Package meta binds together the three places a package can reside: filesystem, database, and internet. The filesystem takes first priority.
Index ¶
- Variables
- type Package
- func (mp *Package) HasFiles() bool
- func (mp *Package) HasObsolete() bool
- func (mp *Package) HasPending() bool
- func (mp *Package) HasUpdate() bool
- func (mp *Package) HasUpgrade() bool
- func (mp *Package) IsRegistered() bool
- func (mp *Package) IsSynced() bool
- func (mp *Package) Obsolete() pacman.Packages
- func (mp *Package) Pkg() *pacman.Package
- func (mp *Package) PkgDepends() []string
- func (mp *Package) PkgMakeDepends() []string
- func (mp *Package) PkgName() string
- func (mp *Package) PkgVersion() string
- func (mp *Package) Version() string
- func (mp *Package) VersionRegistered() string
- type Packages
Constants ¶
This section is empty.
Variables ¶
var ErrMultipleDB = errors.New("multiple database files found")
Functions ¶
This section is empty.
Types ¶
type Package ¶
Package binds together the three places a package can reside: filesystem, database, and internet. The filesystem takes first priority.
The packages in Files are guaranteed to be sorted, so that the most recent version is first. It is illegal for neither Files nor Database to contain a valid Package.
func (*Package) HasObsolete ¶
HasObsolete returns true if there are obsolete files to be deleted.
func (*Package) HasPending ¶
HasPending returns true if there are any pending changes to filesystem or database concerning this package. This has nothing to do with whether there is an upgrade available in AUR.
func (*Package) HasUpdate ¶
HasUpdate returns true when there is a newer package file available that hasn't been added to the database. This includes the case where there is no database entry for this package.
func (*Package) HasUpgrade ¶
HasUpgrade returns true when there is a newer version than either file or database.
func (*Package) IsRegistered ¶
IsRegistered returns true when the package registered in the database does not exist or when the package is not registered.
func (*Package) IsSynced ¶
IsSynced returns true when the package is completely up-to-date and there is nothing to do.
func (*Package) Pkg ¶
Package returns the newest actual package available. This disregards whatever is in the database. If there are no files, then the database package is returned.
func (*Package) PkgDepends ¶
PkgDepends returns the dependencies of the package.
func (*Package) PkgMakeDepends ¶
PkgMakeDepends returns the make dependenciess of the package.
func (*Package) PkgVersion ¶
func (*Package) Version ¶
Version returns the newest actual package version available. This disregards whatever is in the database. If there are no files, then an empty string is returned.
func (*Package) VersionRegistered ¶
VersionRegistered returns the version that is registered in the database.
type Packages ¶
type Packages []*Package
func Read ¶
Read reads meta packages in dirpath and using the database at dpbath. If dbpath == "", then no database is read. This function does not recurse.
If no database can be read, the function still continues reading packages from the directory.
func ReadRepo ¶
ReadRepo tries to find a database in the specified directory. In any case, it loads all files it can. If there are multiple databases, it returns (nil, ErrMultipleDB). It does not recurse.
func (Packages) Iterate ¶
func (mps Packages) Iterate(f func(pacman.AnyPackage))