Documentation ¶
Index ¶
- Constants
- func CheckSyncDBs(names []string, dbPath string) (found []string)
- func CompareVersions(a, b string) int
- func GetConfigRepos(path string) (names []string, err error)
- func GetForeignPackages(root, dbPath string, repos []string) (pkgs map[string]string, err error)
- func GetLocalPackages(root, dbPath string) (pkgs map[string]string, err error)
- func GetSyncPackages(root, dbPath string, repos []string) (pkgs map[string]string, err error)
Constants ¶
const DefaultConfig = "/etc/pacman.conf"
DefaultConfig is the default absolute path to the pacman configuration file.
const DefaultDBPath = "/var/lib/pacman"
DefaultDBPath is the absolute path to the default location where pacman stores its local and repository databases.
const DefaultRoot = "/"
DefaultRoot is the default root path of the pacman installation.
Variables ¶
This section is empty.
Functions ¶
func CheckSyncDBs ¶
func CompareVersions ¶
CompareVersions uses libalpm's logic to compare two versions of arbitrary formats. The return value is negative when a is less than b, zero when a and b are equal, and positive when b is greater than a.
func GetConfigRepos ¶
GetConfigRepos loads the specified pacman configuration file at path and extracts any configured repository names. Any error is returned with an explanatory message in err.
func GetForeignPackages ¶
func GetLocalPackages ¶
GetLocalPackages retrieves the list of locally-installed pkgs. Keys are package names and values are their versions. If an error is encountered it is returned in err.
Types ¶
This section is empty.