libalpm

package
v0.0.0-...-339c7a5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2024 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultConfig = "/etc/pacman.conf"

DefaultConfig is the default absolute path to the pacman configuration file.

View Source
const DefaultDBPath = "/var/lib/pacman"

DefaultDBPath is the absolute path to the default location where pacman stores its local and repository databases.

View Source
const DefaultRoot = "/"

DefaultRoot is the default root path of the pacman installation.

Variables

This section is empty.

Functions

func CheckSyncDBs

func CheckSyncDBs(names []string, dbPath string) (found []string)

func CompareVersions

func CompareVersions(a, b string) int

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

func GetConfigRepos(path string) (names []string, err error)

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 GetForeignPackages(root, dbPath string, repos []string) (pkgs map[string]string, err error)

func GetLocalPackages

func GetLocalPackages(root, dbPath string) (pkgs map[string]string, err error)

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.

func GetSyncPackages

func GetSyncPackages(root, dbPath string, repos []string) (pkgs map[string]string, err error)

GetSyncPackages retrieves the list of known packages for the specified repos. Keys are package names and values are their versions. If an error is encountered it is returned in err.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL