solver

package
v0.40.1-geaaru Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Copyright © 2022-2023 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2022-2023 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2022-2023 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Copyright © 2022-2023 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.

Index

Constants

View Source
const (
	UpdatePackage    = "U"
	AddPackage       = "N"
	RemovePackage    = "D"
	DowngradePackage = "u"
)

Variables

This section is empty.

Functions

func SortOperationsByName

func SortOperationsByName(ops *[]*Operation, reverse bool)

Types

type Operation

type Operation struct {
	Action   string                    `yaml:"action" json:"action"`
	Artifact *artifact.PackageArtifact `yaml:"artefact" json:"artefact"`
}

func NewOperation

func NewOperation(action string, art *artifact.PackageArtifact) *Operation

type PackageSolver

type PackageSolver interface {
	Install(p *[]*pkg.DefaultPackage) (*artifact.ArtifactsPack, *artifact.ArtifactsPack, error)
	Upgrade() (*artifact.ArtifactsPack, *artifact.ArtifactsPack, *artifact.ArtifactsPack, error)
	SetDatabase(pkg.PackageDatabase)
	OrderOperations(p2i, p2u, p2r *artifact.ArtifactsPack) (*[]*Operation, error)
	Orphans() (*[]*pkg.DefaultPackage, error)
}

PackageSolver is an interface to a generic package solving algorithm

func NewSolverImplementation

func NewSolverImplementation(stype string, cfg *config.LuetConfig, opts *SolverOpts) *PackageSolver

type Solver

type Solver struct {
	Config *config.LuetConfig `yaml:",inline" json:",inline"`
	Opts   *SolverOpts        `yaml:"opts" json:"opts"`

	Database pkg.PackageDatabase               `yaml:"-" json:"-"`
	Searcher wagon.Searcher                    `yaml:"-" json:"-"`
	MapRepos map[string]*wagon.WagonRepository `yaml:"-" json:"-"`
	// contains filtered or unexported fields
}

func NewSolver

func NewSolver(cfg *config.LuetConfig, opts *SolverOpts) *Solver

func (*Solver) Install

func (*Solver) OrderOperations

func (s *Solver) OrderOperations(p2i, p2u, p2r *artifact.ArtifactsPack) (*[]*Operation, error)

func (*Solver) Orphans

func (s *Solver) Orphans() (*[]*pkg.DefaultPackage, error)

func (*Solver) SetDatabase

func (s *Solver) SetDatabase(d pkg.PackageDatabase)

type SolverOpts

type SolverOpts struct {
	IgnoreConflicts bool
	Force           bool
	NoDeps          bool
	IgnoreMasks     bool
	Deep            bool
}

func NewSolverOpts

func NewSolverOpts() *SolverOpts

type SolverType

type SolverType int

Jump to

Keyboard shortcuts

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