yay/pkg/db/executor.go
x1b6e6 de113b87f3 Add support for multiple 'Architecture' values
This allows architecture to be multivalued. On x86-64 machines, this
could be something like:
    Architecture = x86-64-v3 x86-64

We use the first specified Architecture value in mirrorlist $arch
variable replacement, as this is backwards-compatible and sane.

More info:
https://git.archlinux.org/pacman.git/commit/?id=3179db108a83104d9de6d1d607f55f8118e92160

Signed-off-by: x1b6e6 <ftdabcde@gmail.com>
2021-05-04 08:43:56 +02:00

48 lines
1.1 KiB
Go

package db
import (
"time"
alpm "github.com/Jguer/go-alpm/v2"
)
type IPackage = alpm.IPackage
type Depend = alpm.Depend
func VerCmp(a, b string) int {
return alpm.VerCmp(a, b)
}
type Upgrade struct {
Name string
Repository string
LocalVersion string
RemoteVersion string
Reason alpm.PkgReason
}
type Executor interface {
AlpmArchitectures() ([]string, error)
BiggestPackages() []IPackage
Cleanup()
IsCorrectVersionInstalled(string, string) bool
LastBuildTime() time.Time
LocalPackage(string) IPackage
LocalPackages() []IPackage
LocalSatisfierExists(string) bool
PackageConflicts(IPackage) []Depend
PackageDepends(IPackage) []Depend
SatisfierFromDB(string, string) IPackage
PackageGroups(IPackage) []string
PackageOptionalDepends(IPackage) []Depend
PackageProvides(IPackage) []Depend
PackagesFromGroup(string) []IPackage
RefreshHandle() error
RepoUpgrades(bool) ([]Upgrade, error)
SyncPackage(string) IPackage
SyncPackages(...string) []IPackage
SyncSatisfier(string) IPackage
SyncSatisfierExists(string) bool
Repos() []string
}