Versions in this module Expand all Collapse all v0 v0.22.2 Mar 23, 2024 v0.22.1 Mar 20, 2024 Changes in this version + var DebugWriter io.Writer = nil + var PacmanConfPath = "/etc/pacman.conf" + var PacmanLocalDatabasePath = "/var/lib/pacman/local" + var PacmanSyncDatabaseFormat = "/var/lib/pacman/sync/%s.db" + func EnabledRepositories() ([]string, error) + func IsDatabaseLocked(dbpath string) bool + func IsRepositoryEnabled(name string) (bool, error) + func PkgNewer(a, b AnyPackage) bool + func PkgOlder(a, b AnyPackage) bool + func ReadDirApproxOnlyNames(h errs.Handler, dirpath string) ([]string, error) + type AnyPackage interface + Pkg func() *Package + PkgDepends func() []string + PkgMakeDepends func() []string + PkgName func() string + PkgVersion func() string + type AnyPackages interface + Iterate func(func(AnyPackage)) + Len func() int + Less func(i, j int) bool + Pkgs func() Packages + Swap func(i, j int) + type Package struct + Arch string + Backups []string + Base string + BuildDate time.Time + CheckDepends []string + Conflicts []string + Depends []string + Description string + Filename string + Groups []string + License string + MakeDepends []string + MakeOptions []string + Name string + OptionalDepends []string + Origin PackageOrigin + Packager string + Provides []string + Replaces []string + Size uint64 + URL string + Version string + Xdata []string + func Read(filename string) (*Package, error) + func (p *Package) Equals(a *Package) bool + func (p *Package) Pkg() *Package + func (p *Package) PkgDepends() []string + func (p *Package) PkgMakeDepends() []string + func (p *Package) PkgName() string + func (p *Package) PkgVersion() string + func (pkg *Package) Newer(alt *Package) bool + func (pkg *Package) Older(alt *Package) bool + type PackageOrigin int + const AUROrigin + const DatabaseOrigin + const FileOrigin + const LocalOrigin + const UnknownOrigin + type Packages []*Package + func ReadAllSyncDatabases() (Packages, error) + func ReadDatabase(dbpath string) (Packages, error) + func ReadDir(h errs.Handler, dirpath, dbpath string) (Packages, error) + func ReadEveryFileInDir(h errs.Handler, dirpath string) (Packages, error) + func ReadFiles(h errs.Handler, pkgfiles ...string) (Packages, error) + func ReadLocalDatabase(eh errs.Handler) (Packages, error) + func ReadNames(h errs.Handler, dirpath string, pkgnames ...string) (Packages, error) + func ReadSyncDatabase(name string) (Packages, error) + func (pkgs Packages) Iterate(f func(AnyPackage)) + func (pkgs Packages) Len() int + func (pkgs Packages) Less(i, j int) bool + func (pkgs Packages) Pkgs() Packages + func (pkgs Packages) Swap(i, j int) + func (pkgs Packages) ToMap() map[string]*Package